Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/weiyi88/cc-codenpx agentmods add skills/weiyi88/cc-code/agent-debugWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/weiyi88/cc-code/agent-debug)<a href="https://agentmods.dev/skills/weiyi88/cc-code/agent-debug"><img src="https://agentmods.dev/badge/skills/weiyi88/cc-code/agent-debug/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/weiyi88/cc-code/agent-debug"><img src="https://agentmods.dev/badge/skills/weiyi88/cc-code/agent-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00022 | $0.04384 |
| Opus 5.5 | $0.00009 | $0.01754 |
| Sonnet 5.5 | $0.00004 | $0.00877 |
| Haiku 4.5 | $0.00002 | $0.00438 |
Grade A, and why
agent-debug scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 26d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
agent-debug — 双 agent × cc-code 驱动 bug 修复执行编排器
⚠️ 暂停(1.17.0 起):本命令依赖旧 qa 的全量验收 / 复现取证职责;qa 已改造为检测员(只比对本次改动),本命令待重新设计,暂勿使用。日常交付走
/cc-code:check-fix。
纯执行器:只修已诊断的 bug,不诊断。根因与方案由
/cc-code:plan-debug经 qa 自动整理进active/bugs.md的 B-n 条目,只接 状态 = 待修复 的条目(状态定义见templates/bugs.md),本命令读 B-n 直接开发,运行中零提问:撞上需求 / 契约冲突的 B-n 挂起、3 轮仍不过的项记账,其余 B-n 照修,结尾一次交人(唯一出处 =../cc-code/references/dev-qa-loop.md§九)。 主控是编排者,不扮演任何角色:派哪个 agent 就是哪个角色;角色权限唯一出处 =active/Agent.md§三。主控的写权限见active/Agent.md§一,⛔ 不写gates.md/bugs.md/ L1~L3 文件。 与 agent-feature 的分工:feature 是「加一个房间」(执行 F-n 需求增量);本命令是「修房子里的漏水点」(执行 B-n bug 修复)。执行循环、回归策略同构;结算不同——本命令由 qa 把 B-n 搬 retired。 初衷铁律:完整地修复 bug —— 修复面 = B-n 用例 + affected 算出的爆炸半径,⛔ 无 agent-whole-qa、无全量回归。 视觉缺陷同一链路:视觉 bug 也走本命令的既有 B 序列(不另开链路)。期望出处可以是 A/U 断言、V 规则(../cc-code/references/ui-gates.md)、design.md数值或已冻结基线;循环唯一出处 =../cc-code/references/dev-qa-loop.md。⛔ 本命令不派 uiux。
前置检查(启动时一次性)
- 确认项目根存在
.cc-code/(否则提示先/cc-code:init)。 - 确认双 agent 可用:
dev/qa。 - 增量定位(⭐第一动作,见下节)——定位失败即拒跑,后续检查全免。
- 确认测试基建:读
project.md§六「测试基建契约」(测试 / 构建 / 自检命令的唯一来源)。契约不存在或未填实 → ⛔ 不猜命令,⛔ 拒跑,按dev-qa-loop.md§九 出交人报告(下一步/cc-code:plan-feature,补契约归architect);契约已填实但测试基建尚未落地 → 把「按契约搭测试基建」作为 Dev 段首个任务。视觉缺陷另需project.md§六 的界面驱动工具 / 视觉测试位置 / 基线目录 / 视口集合 / 亮暗模式,缺任一 → ⛔ 拒跑,同上出交人报告。 - 索引体检(静默):
codegraph status --json——pendingChanges非 0 → 静默codegraph sync;initialized:false→ 报一行(⛔ 不自动重建)。CLI 未装则静默跳过(精准回归降级为全量)。⛔ 健康时一个字都不提。 - 执行
/cc-code:cc-code完成会话开启协议,锁定当前坐标。
⭐ 增量定位(第一动作,纯查表,零推理)
① 读 status.md「下一步」
└─ 期望形态:「B-n 待修复」+(bugs.md 里有对应条目,状态 = 待修复)
├─ 没有 B-n / 下一步是别的事
│ → ⛔ 拒跑:「没有待修复的 bug,请先走 /cc-code:plan-debug」
│ (本命令绝不现场诊断根因——根因唯一来源 = B-n 条目)
└─ 拿到 B 号 + 条目内容(现象 / 复现 / 期望出处 / 根因 / 爆炸半径 / 方案)
(期望出处可为:prd / ux 的 A、U 断言;主人原话;V 规则与 `design.md` 数值;已冻结基线)
② 对账(B-n 修复 PASS 时 qa 已把条目搬 retired,所以仍在 bugs.md 的就是没修好的):
条目已不在 bugs.md → 报「B-n 已修复,无事可做」,结束
条目在 bugs.md,按状态分流:
├─ 待修复 → B-n 即本次执行范围,进 Dev 段
├─ 待诊断 → ⛔ 拒跑:「诊断还没做完,请先走 /cc-code:plan-debug」
└─ 待裁决 → ⛔ 拒跑:按 §九 出交人报告(待你补答 = 条目里「待裁决」那句话,下一步 /cc-code:plan-debug)
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 26d ago Changed 2baf093dd40c
- 27d ago Changed · +2 lines · +3 tokens per session 286d7f6005ce
- 1mo ago Changed 73ac10f5e5e2
- 1mo ago Changed 6988225410a0
- 1mo ago Changed · +8 lines f8dacc69245c
- 1mo ago Changed · +4 lines 1675ffde9756
- 1mo ago Changed · +20 lines 799560cc6e00
- 1mo ago Changed · +2 lines 7cfb338d9052
- 1mo ago Changed · +1 lines a4df60895db3
- 2mo ago First seen · 101 lines · 19 tokens per session scan A 5e9ee6c5e556
agent-debug is a skill published in the GitHub repository weiyi88/cc-code (5 stars, last pushed 27d ago), licensed MIT. It adds 22 tokens to every session and 4,384 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-13.
agent-debug compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agent-debugweiyi88/cc-code | Skill | 5 | 27d ago | MIT | A | 22 | Claude Code, Codex |
| rethink-unblocktae0y/python-project-template | Skill | 15 | 3mo ago | none | A | 45 | Claude Code |
| checktae0y/python-project-template | Skill | 15 | 3mo ago | none | A | 30 | Claude Code |
| n8n-docs-assistantn8n-io/n8n | Skill | 213k | today | none | A | 71 | Claude Code, Codex |
| dorodangoathola/claude-night-market | Skill | 358 | today | MIT | A | 31 | Claude Code |
| sentry-sdk-upgradegetsentry/sentry-for-ai | Skill | 283 | 5d ago | MIT | A | 48 | Claude Code |
| debugRune-kit/rune | Skill | 96 | today | MIT | A | 76 | Claude Code |