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.
- License 许可
- GPL-3.0
- 最近更新
- 2026-06-06
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- command-prompt-sync
- description
- 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.
03 SKILL.md 正文
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.
04 同仓库更多 Skills
write-tests
Test implementation skill for HypermediaEngine. Takes a confirmed test plan from design-test-cases and produces compilable, runnable xUnit tests following project conventions. Validates coverage quality through mutation testing. Invoked by the sqa-engineer agent after the test plan is approved.
write-documentation
Structured documentation writing workflow for HypermediaEngine. Writes or updates README.md files at the repo root and in each project directory (src/, tests/, samples/, etc.) based on current implementation, ADRs, and architecture decisions.
write-adr
Writes a numbered Architecture Decision Record (ADR) for a significant architectural choice in the HypermediaEngine project. Invoked by the software-architect agent whenever a consequential design decision is made or ratified. Saves the ADR to docs/architecture/decisions/.
tunit-playwright-ui-testing
Comprehensive guidance for writing coded end-to-end UI tests in C# using TUnit.Playwright. Tests inherit from PageTest — the base class manages all browser lifecycle. Covers NuGet setup, PageTest inheritance, Page Object Model, browser configuration, parallelism limiting, and CI integration. Based on the official TUnit docs at https://tunit.dev/docs/examples/playwright.
triage
Task classification, decomposition, dependency mapping, and routing skill. Invoked by the triage-agent to break any user request into discrete, independently-routable work items with assigned priorities and agent chains.
system-design
Expert system design skill. Use PROACTIVELY to design systems, review architectures, and assist software engineers in learning design principles and implementing them in the code with design patterns.