command-prompt-sync
Detects and resolves drift between .claude/commands/*.md (Claude commands) and .github/prompts/*.prompt.md (Copilot prompt files). Ensures every command has a matching prompt and vice versa. Invoked exclusively by the agent-manager agent.
Install
mkdir -p .claude/skills/command-prompt-sync && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14953" && unzip -o skill.zip -d .claude/skills/command-prompt-sync && rm skill.zipInstalls to .claude/skills/command-prompt-sync
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Detects and resolves drift between .claude/commands/*.md (Claude commands) and .github/prompts/*.prompt.md (Copilot prompt files). Ensures every command has a matching prompt and vice versa. Invoked exclusively by the agent-manager agent.About this skill
Command or Prompt Sync
Use this skill when command and prompt files have drifted apart, when a command was added to one platform but not the other, or when a full inventory audit is needed. Parse the args to determine the operation mode, then execute the corresponding procedure.
Phase 0 — Context Load (silent)
- Read
.claude/CLAUDE.mdandAGENTS.mdto internalize project conventions and portability rules. - Invoke
Skill("manage-memory", args: "agent-manager")to load persistent memory (prior sync decisions, known naming conventions). - Glob
.claude/commands/*.mdand.github/prompts/*.prompt.mdto build the current command/prompt inventory.
Mode: audit
Args: audit
Scan all commands and prompts, flag orphans and content drift.
- Glob
.claude/commands/*.md— for each file read frontmatter and extract:name(derived from filename),description. - Glob
.github/prompts/*.prompt.md— for each file read frontmatter and extract:name(derived from filename, strip.promptsuffix),description,agent,argument-hint. - Normalise names: strip
.md/.prompt.mdextensions to get the bare skill name. - Build a cross-reference map keyed on bare name.
- Classify each entry:
- present-both — command exists in
.claude/commands/and prompt exists in.github/prompts/ - command-only —
.claude/commands/<name>.mdexists but no.github/prompts/<name>.prompt.md - prompt-only —
.github/prompts/<name>.prompt.mdexists but no.claude/commands/<name>.md - drifted — both files exist but
descriptiondiffers significantly
- present-both — command exists in
- For drifted pairs, show the description from each side.
- Output a structured audit report:
## Command / Prompt Drift Report
| Name | Claude command | Copilot prompt | Status | Drift |
|------|---------------|----------------|--------|-------|
| <name> | ✅ | ✅ | in sync | — |
| <name> | ✅ | ❌ | — | missing prompt |
| <name> | ❌ | ✅ | — | missing command |
| <name> | ✅ | ✅ | drifted | description mismatch |
- Summarise counts: total pairs, fully in sync, drifted, orphans.
Mode: sync
Args: sync <name>
Sync a single named command→prompt pair, using the Claude command as the authoritative source.
- Read
.claude/commands/<name>.md; fail with a clear error if it does not exist. - Extract frontmatter
descriptionfrom the Claude command. - Read
.github/prompts/<name>.prompt.mdif it already exists (to detect what would change). - Derive the Copilot prompt content from the Claude command:
- Frontmatter: set
descriptionto match Claude command'sdescription; preserve or setagent: "agent"andargument-hint - Body: adapt the Claude command body for Copilot prompt format (see Phase 3 templates in command-management skill)
- Frontmatter: set
- Write
.github/prompts/<name>.prompt.md. - Confirm: "Command
<name>synced to.github/prompts/<name>.prompt.md."
Mode: sync-all
Args: sync-all
Run sync <name> for every command currently in the Claude commands directory.
- Glob
.claude/commands/*.md— collect all bare names. - For each name, execute Mode: sync in sequence.
- Produce a summary: pairs synced, any errors encountered.
Mode: diff
Args: diff <name>
Show a structured diff between the Claude command and Copilot prompt for a single name.
- Read
.claude/commands/<name>.md; fail if it does not exist. - Read
.github/prompts/<name>.prompt.md; fail if it does not exist. - Compare frontmatter:
description— show both; flag if differentagent— Copilot only; note presence/absenceargument-hint— Copilot only; note presence/absence
- Compare body sections: identify headings present in one file but absent from the other.
- Output:
## Command/Prompt Diff: <name>
### Frontmatter
| Field | Claude command | Copilot prompt |
|-------|---------------|----------------|
| description | <val> | <val> |
| agent | n/a | <val> |
| argument-hint | n/a | <val> |
### Body Sections
| Section heading | Claude command | Copilot prompt |
|-----------------|---------------|----------------|
| ## Usage | ✅ | ✅ |
| ## Modes | ❌ | ✅ |
- Conclude with: In sync / Drifted — run
sync <name>to resolve.
Validation Rules
- Both
.claude/commands/<name>.mdand.github/prompts/<name>.prompt.mdmust exist as a pair. descriptionfrontmatter is required in both files.- Copilot prompt files must have
agent: "agent"in frontmatter. - Never delete any command or prompt file — use deprecation patterns when retiring.
- Never read or modify
.envfiles or sensitive configuration.