agent-debug

agent-debug is a skill for Claude Code, Codex from weiyi88/cc-code. It costs 22 tokens per session (4,384 once invoked), scanned A, original, MIT.

An execution workflow for repairing a bug that has already been diagnosed and recorded. It coordinates a developer and tester, then reruns the bug check and the code areas affected by the repair.

In plain words
What is it for?
Use it to implement a recorded bug fix, run its focused tests, repair failures through a limited loop, and perform targeted regression testing.
Why use it?
It prevents the repair step from guessing at the cause or changing the product requirements. It also checks that a bug fix did not break related behaviour.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **纯执行器**:只修已诊断的 bug,**不诊断**。根因与方案由 `/cc-code:plan-debug` 经 qa 自动整理进 `active/bugs.md` 的 B-n 条目,**只接 状态 = 待修复 的条目**(状态定义见 `templates/bugs.md`),本命令读 B-n 直接开发,**运行中.

Part of the cc-code plugin — 19 skills, 6 agents, 1 hook shipped together

Good fit Use it to implement a recorded bug fix, run its focused tests, repair failures through a limited loop, and perform targeted regression testing.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/weiyi88/cc-code
agentmods
npx agentmods add skills/weiyi88/cc-code/agent-debug

Made for: Claude Code, Codex.

Or install cc-code, the plugin that ships this one along with the rest of its 19 skills, 6 agents, 1 hook.

Wrote 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.

agentmods badge for agent-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/weiyi88/cc-code/agent-debug/github.svg)](https://agentmods.dev/skills/weiyi88/cc-code/agent-debug)
Your own site
<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.

agentmods 80×15 button for agent-debug

Your own site · 80×15
<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>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,384 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 26d ago against content hash 2baf093dd40c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

skills/agent-debug/SKILL.md · 138 lines

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。

前置检查(启动时一次性)

  1. 确认项目根存在 .cc-code/(否则提示先 /cc-code:init)。
  2. 确认双 agent 可用:dev / qa。
  3. 增量定位(⭐第一动作,见下节)——定位失败即拒跑,后续检查全免。
  4. 确认测试基建:读 project.md §六「测试基建契约」(测试 / 构建 / 自检命令的唯一来源)。契约不存在或未填实 → ⛔ 不猜命令,⛔ 拒跑,按 dev-qa-loop.md §九 出交人报告(下一步 /cc-code:plan-feature,补契约归 architect);契约已填实但测试基建尚未落地 → 把「按契约搭测试基建」作为 Dev 段首个任务。视觉缺陷另需 project.md §六 的界面驱动工具 / 视觉测试位置 / 基线目录 / 视口集合 / 亮暗模式,缺任一 → ⛔ 拒跑,同上出交人报告。
  5. 索引体检(静默):codegraph status --json —— pendingChanges 非 0 → 静默 codegraph sync;initialized:false → 报一行(⛔ 不自动重建)。CLI 未装则静默跳过(精准回归降级为全量)。⛔ 健康时一个字都不提。
  6. 执行 /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)

Read the full file on GitHub · 138 lines

Files

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.

Changes

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.

  1. 26d ago Changed 2baf093dd40c
  2. 27d ago Changed · +2 lines · +3 tokens per session 286d7f6005ce
  3. 1mo ago Changed 73ac10f5e5e2
  4. 1mo ago Changed 6988225410a0
  5. 1mo ago Changed · +8 lines f8dacc69245c
  6. 1mo ago Changed · +4 lines 1675ffde9756
  7. 1mo ago Changed · +20 lines 799560cc6e00
  8. 1mo ago Changed · +2 lines 7cfb338d9052
  9. 1mo ago Changed · +1 lines a4df60895db3
  10. 2mo ago First seen · 101 lines · 19 tokens per session scan A 5e9ee6c5e556

Subscribe to this mod's changes

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.

Related

agent-debug compared with skills from other repositories

agent-debug next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agent-debugweiyi88/cc-codeSkill527d agoMITA22Claude Code, Codex
rethink-unblocktae0y/python-project-templateSkill153mo agononeA45Claude Code
checktae0y/python-project-templateSkill153mo agononeA30Claude Code
n8n-docs-assistantn8n-io/n8nSkill213ktodaynoneA71Claude Code, Codex
dorodangoathola/claude-night-marketSkill358todayMITA31Claude Code
sentry-sdk-upgradegetsentry/sentry-for-aiSkill2835d agoMITA48Claude Code
debugRune-kit/runeSkill96todayMITA76Claude Code