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/plan-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/plan-debug)<a href="https://agentmods.dev/skills/weiyi88/cc-code/plan-debug"><img src="https://agentmods.dev/badge/skills/weiyi88/cc-code/plan-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/plan-debug"><img src="https://agentmods.dev/badge/skills/weiyi88/cc-code/plan-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.00070 | $0.06658 |
| Opus 5.5 | $0.00028 | $0.02663 |
| Sonnet 5.5 | $0.00014 | $0.01332 |
| Haiku 4.5 | $0.00007 | $0.00666 |
Grade A, and why
plan-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 — 256 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/cc-code:plan-debug — bug 诊断编排器(不进 plan 模式,bugs.md 自动整理)
⚠️ 暂停(1.17.0 起):本命令依赖旧 qa 的全量验收 / 复现取证职责;qa 已改造为检测员(只比对本次改动),本命令待重新设计,暂勿使用。日常交付走
/cc-code:check-fix。
⭐ 不进 plan 模式,没有「批准方案」这道门。 诊断是收集事实,不是做决定;plan 模式会让 qa 写不了文件,中途一断线记录就丢。所以 qa 复现一成功就写 B-n,诊断每推进一步就地补全,记录不等主人批准。 定位:技术诊断编排器,不是需求规划器。 与
/cc-code:plan-feature的分界:那个处理「需求模糊」,本命令处理「需求明确但实现错了」—— bug 本身就是需求,期望行为要么主人说了,要么prd.md已有断言、ux.md已有交互判定、design.md已有设计数值、ui-gates.md已有视觉规则、.cc-code/test/visual/baseline/已有冻结基线。 主控只传话:主控是编排者,不扮演任何角色——不读src/、不跑 codegraph、不思考根因、不替主人回答、不写bugs.md。复现取证与 B-n 登记归qa,根因与方案归dev(只读,不改任何文件)。 配对:本命令把 B-n 整理到待修复后,修复执行走/cc-code:agent-debug(增量定位 B-n → dev 修 → qa 复测 → affected 精准回归)。视觉规格本身写错 → 先走/cc-code:plan-uiux(模式二)改规格;页面 / 交互规格(ux.md)要改 → 交回/cc-code:plan-feature由 uiux 补,再回agent-debug。本命令 ⛔ 不直接派 uiux、⛔ 不让 pm 写ux.md。
⛔ 五条铁律(违反任一即本次诊断无效)
铁律 1:期望行为唯一来源 = 主人原话 + 既有断言 / 判定 / 设计数值 / 视觉规则 / 基线
诊断时最容易犯的错就是拿实现当期望。
期望行为的合法出处:
✅ 主人在对话里的原话
✅ prd.md §1.5 的既有 A 断言
✅ ux.md 的既有 U 判定项(五态矩阵、页面结构与断点声明)
✅ design.md 的已锁设计数值与组件长相
✅ ui-gates.md 的视觉规则与阈值(规则号唯一出处)
✅ .cc-code/test/visual/baseline/ 的已冻结截图基线(只在视觉地基过门或「定了」后冻结)
⛔ 绝不许从「代码现状」反推「所以期望应该是 X」
⛔ 绝不许从 codegraph / 日志产出反推期望 —— 它们只答「代码 / 运行时现在是什么样」
⛔ 绝不许拿「当前页面看起来正常」当期望 —— 视觉期望来自 design.md 与基线,不来自现状
出处由 qa 定位并写进 B-n(写清文件 + 小节 / 规则号 / 基线文件名);dev 诊断时期望行为一律取自 qa 报告里的出处,不自己推。
铁律 2:只有四种情况停下交人(裁决门)
qa 把 B-n 的状态写成 待裁决,并用业务语言写一句要主人回答的问题(写进 B-n 的「待裁决」字段);主控把这句话原样问主人,⛔ 主控不自己判、不自己改。除这四种,一律自动往下走,不问主人。
| 编号 | 命中情形 | 谁发现 | 主人裁决后,主控派谁 |
|---|---|---|---|
| ① | 根因是契约错(api / data / project 本身错) | qa(读 dev 诊断后) | architect 改 L3 对应小节 |
| ② | 根因是需求或视觉规格错(prd / ux 的行为半边 / design.md 本身错) | qa(读 dev 诊断后) | prd → pm 改对应小节;ux → ⛔ 本命令不改、不派 uiux,交回 /cc-code:plan-feature 由 uiux 补(或主人裁决后走 /cc-code:plan-uiux 模式二);design.md → 先跑 /cc-code:plan-uiux(模式二,锁后只有它能改 design.md),改完回 agent-debug 重判 |
| ③ | prd / ux / design / api 里找不到期望出处,无法判定是不是 bug | qa(复现阶段) | 主人说「这是新需求」→ 交回 /cc-code:plan-feature(业务需求由 pm 补,页面 / 交互规格由 uiux 在同一次落盘);主人说「不是 bug」→ qa 把条目原文搬 backup/retired/bugs.md 后从 active 移除 |
| ④ | 复现不了 | qa(复现阶段) | 主人补充信息 → 续接原 qa 重新复现 |
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 · +11 lines a3e696daec31
- 27d ago Changed · +2 lines · +3 tokens per session c1bd6630b9a9
- 1mo ago Changed 31be86c8e936
- 1mo ago Changed · +1 lines 8ed7aed968e6
- 1mo ago Changed · +17 lines · +3 tokens per session a6c7ac7bb0c8
- 1mo ago Changed · +1 lines 8cfb37c38e74
- 1mo ago Changed · +3 lines · +40 tokens per session 8ff70f514170
- 1mo ago Changed · +2 lines 18f81d294b13
- 1mo ago Changed · +5 lines da5f507943ac
- 2mo ago First seen · 214 lines · 24 tokens per session scan A 37524a28046a
plan-debug is a skill published in the GitHub repository weiyi88/cc-code (5 stars, last pushed 27d ago), licensed MIT. It adds 70 tokens to every session and 6,658 once invoked, about $0.0003 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.
plan-debug compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| plan-debugweiyi88/cc-code | Skill | 5 | 27d ago | MIT | A | 70 | 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 |