skills-sync
Detects and resolves drift between .claude/skills/<name>/SKILL.md and .github/skills/<name>/SKILL.md. Also validates that every skill has a matching command (.claude/commands/<name>.md) and prompt (.github/prompts/<name>.prompt.md). Invoked exclusively by the agent-manager agent.
- License 许可
- GPL-3.0
- 最近更新
- 2026-06-06
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- skills-sync
- description
- Detects and resolves drift between .claude/skills/<name>/SKILL.md and .github/skills/<name>/SKILL.md. Also validates that every skill has a matching command (.claude/commands/<name>.md) and prompt (.github/prompts/<name>.prompt.md). Invoked exclusively by the agent-manager agent.
03 SKILL.md 正文
Skills Sync
Use this skill when skill definitions on Claude Code and GitHub have drifted apart, when a skill directory was added to one platform but not the other, or when a full skill 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 skill names, naming conventions). - Glob
.claude/skills/*/SKILL.mdand.github/skills/*/SKILL.mdto build the current skill inventory. - Glob
.claude/commands/*.mdand.github/prompts/*.prompt.mdto build the command/prompt inventory.
Mode: audit
Args: audit
Scan all skill directories, report missing counterparts and content drift.
- Glob
.claude/skills/*/SKILL.md— for each file extract: skill name (from parent directory name),name,description,model,toolsfrom frontmatter. - Glob
.github/skills/*/SKILL.md— for each file extract: skill name (from parent directory name),name,descriptionfrom frontmatter. - Glob
.claude/commands/*.md— collect bare names. - Glob
.github/prompts/*.prompt.md— collect bare names (strip.prompt.md). - Build a 4-column cross-reference map keyed on skill name.
- Classify each entry:
- complete — all four files exist:
.claude/skills/<name>/SKILL.md,.github/skills/<name>/SKILL.md,.claude/commands/<name>.md,.github/prompts/<name>.prompt.md - missing-github-skill —
.claude/skills/<name>/SKILL.mdexists but no.github/skills/<name>/SKILL.md - missing-claude-skill —
.github/skills/<name>/SKILL.mdexists but no.claude/skills/<name>/SKILL.md - missing-command — both SKILL.md files exist but no
.claude/commands/<name>.md - missing-prompt — both SKILL.md files exist but no
.github/prompts/<name>.prompt.md - drifted — both SKILL.md files exist but
description,model, ortoolsdiffer
- complete — all four files exist:
- For drifted skills, enumerate the specific field-level differences.
- Output a structured audit report:
## Skills Drift Report
| Skill | .claude/skills | .github/skills | Command | Prompt | Status | Drift |
|-------|---------------|----------------|---------|--------|--------|-------|
| <name> | ✅ | ✅ | ✅ | ✅ | complete | — |
| <name> | ✅ | ❌ | ✅ | ✅ | — | missing .github/skills |
| <name> | ✅ | ✅ | ❌ | ✅ | — | missing command |
| <name> | ✅ | ✅ | ✅ | ✅ | drifted | description mismatch |
- Summarise counts: total skills, complete, drifted, files missing.
Mode: sync
Args: sync <name>
Sync a single named skill — copy .claude/skills/<name>/SKILL.md to .github/skills/<name>/SKILL.md.
- Read
.claude/skills/<name>/SKILL.md; fail with a clear error if it does not exist. - Check whether
.github/skills/<name>/directory exists; create it if not via Bash:mkdir -p .github/skills/<name>. - Write
.github/skills/<name>/SKILL.mdwith content identical to the Claude version. - Validate that the written file's frontmatter contains
name,description,model, andtools. - Validate that Phase 0 is present in the written file (contains the string
Phase 0). - Confirm: "Skill
<name>SKILL.md synced to.github/skills/<name>/SKILL.md."
Mode: sync-all
Args: sync-all
Sync all skills found in the Claude skills directory.
- Glob
.claude/skills/*/SKILL.md— collect all skill names from parent directory names. - Filter out skills with
status: deprecatedin frontmatter (skip deprecated, report them separately). - For each remaining skill name, execute Mode: sync in sequence.
- Produce a summary: skills synced, skills skipped (deprecated), any errors encountered.
Mode: diff
Args: diff <name>
Show a structured diff for one skill name across Claude and GitHub directories.
- Read
.claude/skills/<name>/SKILL.md; fail if it does not exist. - Read
.github/skills/<name>/SKILL.md; note if it does not exist. - Compare frontmatter field by field:
name— must be identicaldescription— show both; flag if differentmodel— show both valuestools— list tools present in one but not the other
- Compare Phase 0 section: verify both files invoke
manage-memory. - Compare body sections: identify headings present in one file but absent from the other.
- Also report:
.claude/commands/<name>.md— exists / missing.github/prompts/<name>.prompt.md— exists / missing
- Output:
## Skill Diff: <name>
### SKILL.md Frontmatter
| Field | .claude/skills | .github/skills |
|-------|---------------|----------------|
| name | <val> | <val> |
| description | <val> | <val> |
| model | <val> | <val> |
| tools | <val> | <val> |
### Phase 0 Present
| | .claude/skills | .github/skills |
|-|---------------|----------------|
| manage-memory call | ✅ / ❌ | ✅ / ❌ |
### Companion Files
| File | Status |
|------|--------|
| .claude/commands/<name>.md | ✅ / ❌ |
| .github/prompts/<name>.prompt.md | ✅ / ❌ |
- Conclude with: In sync / Drifted — run
sync <name>to resolve.
Validation Rules
- Every skill must have all four files:
.claude/skills/<name>/SKILL.md,.github/skills/<name>/SKILL.md,.claude/commands/<name>.md,.github/prompts/<name>.prompt.md. - All SKILL.md files must have frontmatter:
name,description,model,tools. - All SKILL.md files must have a Phase 0 that reads CLAUDE.md and calls
manage-memory. - Never delete any skill 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.