A collection of PowerShell scripts to automatically sync, combine, and publish GitHub Copilot resources from the awesome-copilot community repository to your local VS Code profiles.
These scripts automate the management of VS Code Copilot custom instructions, chat modes, prompts, and collections by:
- Syncing resources from the awesome-copilot GitHub repository
- Combining multiple resource categories into a unified structure
- Publishing to your VS Code profile(s) via symbolic links or file copies
- Normalizing file organization to prevent duplicates
- Automating the entire process via Windows Task Scheduler
- Windows with PowerShell 7+ (Download here)
- VS Code with GitHub Copilot extension installed
- Internet connection for GitHub API access
- Administrator privileges (for creating scheduled tasks)
# Clone this repository
git clone <your-repo-url>
cd scripts# Sync resources from GitHub
.\sync-awesome-copilot.ps1
# Combine resources into unified folder
.\combine-and-publish-prompts.ps1# Install scheduled task (runs every 4 hours by default)
.\install-scheduled-task.ps1
# Or customize the interval
.\install-scheduled-task.ps1 -Interval "2h" # Every 2 hours
.\install-scheduled-task.ps1 -Interval "1d" # Once daily$HOME\.awesome-copilot\ # Local cache
βββ chatmodes\ # Chat mode definitions
βββ instructions\ # Custom instructions
βββ prompts\ # Prompt templates
βββ collections\ # Resource collections
βββ combined\ # Unified resources (all categories)
βββ manifest.json # Sync state tracking
%APPDATA%\Code\User\ # VS Code global config
βββ prompts\ # Junction/symlink to combined folder
%APPDATA%\Code\User\profiles\ # VS Code profiles
βββ <profile-name>\
βββ chatmodes\ # Linked/copied resources
βββ instructions\
βββ prompts\
Syncs resources from the awesome-copilot GitHub repository.
Features:
- Downloads latest resources via GitHub API
- SHA256 hash-based change detection
- Incremental updates (only downloads changed files)
- Manifest tracking for sync state
- Optional GITHUB_TOKEN support for higher rate limits
Usage:
.\sync-awesome-copilot.ps1Environment Variables:
GITHUB_TOKEN(optional) - Personal access token for higher API rate limits
Combines resources from all categories into a unified folder and publishes to VS Code.
Features:
- Merges chatmodes, instructions, and prompts into single directory
- Creates junction/symlink to VS Code prompts directory
- Automatic fallback to file copy if linking fails
- Preserves user-created custom files
Usage:
.\combine-and-publish-prompts.ps1
# Publish to specific profile
.\combine-and-publish-prompts.ps1 -ProfileName "MyProfile"
# Publish to global VS Code config only
.\combine-and-publish-prompts.ps1 -GlobalOnlyPublishes resources to VS Code profile(s) via symbolic links or copies.
Features:
- Creates symbolic links (junctions) for efficient syncing
- Automatic fallback to file copy
- Supports multiple profiles or global config
Usage:
.\publish-to-vscode-profile.ps1
# Publish to specific profile
.\publish-to-vscode-profile.ps1 -ProfileName "Work"
# Publish to global config
.\publish-to-vscode-profile.ps1 -GlobalOnlyCleans up misplaced or duplicated files in VS Code directories.
Features:
- Moves files to correct category folders based on suffix
- Removes duplicate files (keeps newest version)
- Handles renamed copies (file.1.md, chatmodes__file.md)
Usage:
.\normalize-copilot-folders.ps1
# Normalize specific profile
.\normalize-copilot-folders.ps1 -ProfileName "MyProfile"Creates a Windows scheduled task for automatic syncing.
Features:
- Runs sync and combine scripts on a schedule
- Default: every 4 hours
- Customizable interval
- Runs as current user (no SYSTEM account needed)
Usage:
# Install with default 4-hour interval
.\install-scheduled-task.ps1
# Custom intervals
.\install-scheduled-task.ps1 -Interval "2h" # Every 2 hours
.\install-scheduled-task.ps1 -Interval "30m" # Every 30 minutes
.\install-scheduled-task.ps1 -Interval "1d" # Once daily
# Check task status
Get-ScheduledTask -TaskName "AwesomeCopilotSync"Interval Format:
30m- Minutes2h- Hours1d- Days
Removes the scheduled task.
Usage:
.\uninstall-scheduled-task.ps1Without authentication, GitHub API allows 60 requests/hour. For heavy usage:
- Create a Personal Access Token (no scopes needed for public repos)
- Set environment variable:
# Temporary (current session)
$env:GITHUB_TOKEN = "ghp_your_token_here"
# Permanent (user environment)
[Environment]::SetEnvironmentVariable("GITHUB_TOKEN", "ghp_your_token_here", "User")By default, scripts sync from github/awesome-copilot. To use a different source:
Edit sync-awesome-copilot.ps1 line 57:
$Repo = "your-username/your-repo"Resources follow naming patterns for automatic categorization:
*.chatmode.md- Chat mode definitions*.instructions.md- Custom instructions*.prompt.md- Prompt templates*.collection.yml- Resource collections
Files without these suffixes in the combined folder are preserved (assumed to be user-created).
# Check PowerShell version (must be 7+)
$PSVersionTable.PSVersion
# Set execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserScripts automatically fall back to copying files. Check logs for details.
# Check task status
Get-ScheduledTask -TaskName "AwesomeCopilotSync" | Get-ScheduledTaskInfo
# View logs
Get-Content "$HOME\.awesome-copilot\logs\sync-*.log" -Tail 50
# Manually run task
Start-ScheduledTask -TaskName "AwesomeCopilotSync"- Restart VS Code
- Check VS Code profile is correct:
Ctrl+Shift+Pβ "Preferences: Show Profiles" - Verify files exist in
%APPDATA%\Code\User\prompts\
Sync logs are stored in $HOME\.awesome-copilot\logs\:
# View latest sync log
Get-Content "$HOME\.awesome-copilot\logs\sync-*.log" -Tail 20Log format: sync-YYYYMMDD-HHMMSS.log
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Test your changes thoroughly
- Submit a pull request
MIT License - See LICENSE file for details
- awesome-copilot - Community resource repository
- GitHub Copilot - AI pair programmer
These scripts are community-maintained and not officially supported by GitHub or Microsoft. Use at your own risk. Always review synced content before using in production environments.
Made with β€οΈ for the VS Code + Copilot community