Claude-skill-registry copilot-sync
Synchronize GitHub Copilot configuration files (agents, prompts, skills, instructions) from github-copilot-base template to existing codebases. Creates backups before overwriting. Use when updating Copilot configuration, syncing Copilot files, or bringing a project up to date. Triggers on sync copilot, update copilot, copilot sync, sync configuration.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/copilot-sync" ~/.claude/skills/majiayu000-claude-skill-registry-copilot-sync && rm -rf "$T"
manifest:
skills/data/copilot-sync/SKILL.mdsource content
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
files.github/agents/*.md - Prompts - All
files.github/prompts/*.prompt.md - Skills - All
directories.github/skills/*/ - Instructions -
.github/copilot-instructions.md - PRP Framework -
templatesPRPs/ - 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
folder.copilot-backup/ - 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 | | 44+ custom agents |
| Prompts | | 50+ prompt files |
| Skills | | 80+ skill definitions |
| Chat Modes | | Chat mode configs |
| Instructions | | Main instructions |
| Background Workflow | | Multi-agent docs |
| Copilot Config | | Copilot settings |
| VS Code Settings | | Settings, extensions, MCP config |
| Copilot Ignore | | Files excluded from Copilot |
| Git Attributes | | Line endings and file handling |
| Pre-commit Config | | Secret detection (gitleaks) |
| Worktree Helper | | Git worktree utilities |
| PRP Framework | | Templates & docs |
| Style Guide | | Doc standards |
Options
| Option | Description | Default |
|---|---|---|
| Path to target codebase | Required |
| Preview only, no changes | False |
| Skip creating backups | False |
| 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 |
| Permission denied | Check write access |
| Backup failed | Use 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