copilot-sync
About
This skill syncs GitHub Copilot configuration files (agents, prompts, skills, instructions) from a base template to your existing codebase. It automatically creates backups before overwriting files to ensure safety. Use it when updating Copilot settings or bringing a project's configuration up to date.
Quick Install
Claude Code
Recommended/plugin add https://github.com/majiayu000/claude-skill-registrygit clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/copilot-syncCopy and paste this command in Claude Code to install this skill
Documentation
Copilot Sync Skill
Synchronize GitHub Copilot configuration files from the base template to existing codebases.
Triggers
Activate this skill when user mentions:
- "sync copilot", "copilot sync"
- "update copilot files", "update copilot configuration"
- "sync copilot config", "sync configuration"
- "bring project up to date with copilot"
- "#copilot-sync"
Description
The Copilot Sync skill synchronizes all Copilot-related files from the github-copilot-base template to an existing codebase:
- Agents - All
.github/agents/*.mdfiles - Prompts - All
.github/prompts/*.prompt.mdfiles - Skills - All
.github/skills/*/directories - Instructions -
.github/copilot-instructions.md - PRP Framework -
PRPs/templates - Supporting Docs - Background workflow, style guides
Key Features:
- πΎ Automatic backups before overwriting
- ποΈ Dry-run mode for previewing changes
- β Validation of target repository
- π Detailed sync statistics
Workflow Steps
1. Gather Information
Collect the following using ask_user:
| Question | Purpose | Validation |
|---|---|---|
| Target path | Codebase to sync to | Must exist, must be Git repo |
| Dry run? | Preview changes first | Yes/No |
2. Validate Target
# Check path exists
if (-not (Test-Path $TargetPath -PathType Container)) {
Write-Error "Path does not exist"
}
# Check it's a Git repository
if (-not (Test-Path (Join-Path $TargetPath ".git"))) {
Write-Error "Not a Git repository"
}
3. Execute Sync
Dry Run (Preview):
$TemplateRepo = "E:\Repos\HouseGarofalo\github-copilot-base"
& "$TemplateRepo\scripts\sync-copilot.ps1" -TargetPath $TargetPath -DryRun
Apply Changes:
$TemplateRepo = "E:\Repos\HouseGarofalo\github-copilot-base"
& "$TemplateRepo\scripts\sync-copilot.ps1" -TargetPath $TargetPath
Force (No Prompts):
& "$TemplateRepo\scripts\sync-copilot.ps1" -TargetPath $TargetPath -Force
4. Post-Sync Guidance
After sync, guide user to:
- Review copilot-instructions.md - Add project-specific context
- Check backups - In
.copilot-backup/folder - Commit changes:
git add .github PRPs docs git commit -m "chore: sync Copilot configuration from github-copilot-base"
5. Output Summary
Provide completion summary with:
- Files synced count
- New files count
- Backups created
- Next steps
What Gets Synced
| Category | Path | Description |
|---|---|---|
| Agents | .github/agents/ | 44+ custom agents |
| Prompts | .github/prompts/ | 50+ prompt files |
| Skills | .github/skills/ | 80+ skill definitions |
| Chat Modes | .github/chatmodes/ | Chat mode configs |
| Instructions | .github/copilot-instructions.md | Main instructions |
| Background Workflow | .github/BACKGROUND_WORKFLOW.md | Multi-agent docs |
| Copilot Config | .github/copilot/ | Copilot settings |
| VS Code Settings | .vscode/ | Settings, extensions, MCP config |
| Copilot Ignore | .copilotignore | Files excluded from Copilot |
| Git Attributes | .gitattributes | Line endings and file handling |
| Pre-commit Config | .pre-commit-config.yaml | Secret detection (gitleaks) |
| Worktree Helper | scripts/worktree-helper.ps1 | Git worktree utilities |
| PRP Framework | PRPs/ | Templates & docs |
| Style Guide | docs/STYLE_GUIDE.md | Doc standards |
Options
| Option | Description | Default |
|---|---|---|
-TargetPath | Path to target codebase | Required |
-DryRun | Preview only, no changes | False |
-NoBackup | Skip creating backups | False |
-Force | Skip confirmation prompts | False |
Backup & Recovery
Backup Location:
<target>\.copilot-backup\
βββ .github\
β βββ copilot-instructions.md.<timestamp>.backup
β βββ agents\*.backup
βββ PRPs\*.backup
Restore a File:
Copy-Item "<backup_file>" "<original_path>" -Force
Error Handling
| Error | Resolution |
|---|---|
| Path doesn't exist | Provide valid path |
| Not a Git repo | Initialize with git init |
| Permission denied | Check write access |
| Backup failed | Use -NoBackup or check disk space |
Prerequisites
- Git installed
- Target must be an existing Git repository
- Write access to target directory
Example
User: #copilot-sync E:\Repos\MyOrg\my-project
Copilot: π Copilot Sync
Validating target... β
Target is a Git repository... β
Would you like to preview changes first?
> Yes
π Dry Run:
Would sync: 150 files
New: 45 | Updated: 105
Apply changes?
> Yes
Syncing... β
Backing up existing files... β
π Sync Complete!
Files synced: 150
Backups: .copilot-backup/
Next steps:
1. Review .github/copilot-instructions.md
2. Commit changes
Related
- Copilot Sync Agent
- Copilot Sync Prompt
- Sync Script
- Project Wizard - For new projects
GitHub Repository
Related Skills
algorithmic-art
MetaThis Claude Skill creates original algorithmic art using p5.js with seeded randomness and interactive parameters. It generates .md files for algorithmic philosophies, plus .html and .js files for interactive generative art implementations. Use it when developers need to create flow fields, particle systems, or other computational art while avoiding copyright issues.
subagent-driven-development
DevelopmentThis skill executes implementation plans by dispatching a fresh subagent for each independent task, with code review between tasks. It enables fast iteration while maintaining quality gates through this review process. Use it when working on mostly independent tasks within the same session to ensure continuous progress with built-in quality checks.
executing-plans
DesignUse the executing-plans skill when you have a complete implementation plan to execute in controlled batches with review checkpoints. It loads and critically reviews the plan, then executes tasks in small batches (default 3 tasks) while reporting progress between each batch for architect review. This ensures systematic implementation with built-in quality control checkpoints.
cost-optimization
OtherThis Claude Skill helps developers optimize cloud costs through resource rightsizing, tagging strategies, and spending analysis. It provides a framework for reducing cloud expenses and implementing cost governance across AWS, Azure, and GCP. Use it when you need to analyze infrastructure costs, right-size resources, or meet budget constraints.
