一键导入
sync-agents
Verify the agent roster is consistent across .github/agents/, AGENTS.md, and .github/copilot-instructions.md — and refuse to silently fix drift
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Verify the agent roster is consistent across .github/agents/, AGENTS.md, and .github/copilot-instructions.md — and refuse to silently fix drift
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | sync-agents |
| description | Verify the agent roster is consistent across .github/agents/, AGENTS.md, and .github/copilot-instructions.md — and refuse to silently fix drift |
The agent roster lives in three places that must stay in lock-step:
.github/agents/*.agent.md — the canonical agent definitions (one file per agent)AGENTS.md — the roster table, model routing, handoff org chart, and org rules.github/copilot-instructions.md — the "Operating Modes" tableIf they drift, agents reading one source will believe a different reality than agents reading another. This skill detects drift and reports it. It does not auto-fix — a human must decide which source is correct, because drift usually means a real intent change that needs review.
.github/agents/, AGENTS.md, or .github/copilot-instructions.mdFor every agent that exists in any of the three sources, all three must agree on:
| Field | Source of truth | Where it must also appear |
|---|---|---|
| Agent name | .github/agents/<name>.agent.md (front-matter name) | AGENTS.md row, copilot-instructions.md row |
| Description | Agent file front-matter description | AGENTS.md "Role" column |
| Preferred model | Agent file front-matter model[0] | AGENTS.md "Model (preferred)", copilot-instructions.md "Model" |
| Fallback model | Agent file front-matter model[1] (if present) | AGENTS.md "Model (fallback)" |
| Edit capability | Agent file presence/absence of tools: codebase/editFiles | AGENTS.md "Can edit code?", copilot-instructions.md "Can edit code?" |
| Handoffs | Agent file handoffs: block | AGENTS.md handoff protocol diagram |
The org-chart diagram in AGENTS.md (Architect → Scaffolder → Builder → Reviewer → merge) must include exactly the agents that exist as files.
Enumerate canonical agents: list every .github/agents/*.agent.md file. This is the source of truth set.
Parse front-matter from each agent file: name, description, model, tools, handoffs.
Parse the AGENTS.md roster table under "Agent Roster". Extract one record per row.
Parse the copilot-instructions.md "Operating Modes" table. Extract one record per row.
Diff the three sets:
.github/agents/ but not in either tableParse the AGENTS.md org-chart code block. Confirm it lists exactly the agents in the file set, in the documented order.
Report:
sync-agents: OK — N agents in sync and exitMissing | Orphan | Mismatch | OrgChart, listing the file, field, and conflicting values for each finding. Do not modify any file.sync-agents report
─────────────────────────────────────────
Canonical agents (from .github/agents/): architect, builder, reviewer, scaffolder
🔴 Mismatch: builder.preferred_model
.github/agents/builder.agent.md → "Codex GPT-5.3"
AGENTS.md → "Claude Sonnet 4.6"
.github/copilot-instructions.md → "Codex GPT-5.3"
🔴 Orphan: AGENTS.md row "Coordinator" has no matching .github/agents/coordinator.agent.md
🟢 Org chart matches file set
Drift usually means someone changed something on purpose and forgot to propagate. Auto-fixing would silently overwrite the intended change. The human reviewer should:
sync-agents to confirm green.Auto-fix is a footgun for a structure where the canonical source is the agent's behavior, not just its name.
A drift-detection skill that gives false-greens is worse than no skill at all. After invoking this skill, the operator must verify the check actually fired.
0, the file scan failed — investigate before trusting any green result.AGENTS.md (e.g., change Builder to Builders), re-run, and confirm the skill reports a 🔴. Revert the test edit. This proves the check actually compares values rather than just claiming success..github/agents/ appears in the report's "Canonical agents" line. A missing file = a broken file scan..github/agents/, AGENTS.md, or copilot-instructions.md./sync prompt can wrap this skill.