agent-debug

agent-debug is a skill for Claude Code, Codex from weiyi88/cc-code. It costs 19 tokens per session (2,288 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.

Part of the cc-code plugin — 17 skills, 3 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 with agentmods
npx agentmods add skills/weiyi88/cc-code/agent-debug
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

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

Made for: Claude Code, Codex.

Or install cc-code, the plugin that ships this one along with the rest of its 17 skills, 3 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 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,288 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.00019 $0.02288
Opus 5.5 $0.00008 $0.00915
Sonnet 5.5 $0.00004 $0.00458
Haiku 4.5 $0.00002 $0.00229

Measured today against content hash a4df60895db3, 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 today.

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 · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

agent-debug — 双 agent × cc-code 驱动 bug 修复执行编排器

纯执行器:只修已诊断的 bug,不诊断。根因与方案由 /cc-code:plan-debug 落盘到 active/bugs.md 的 B-n 条目,本命令读 B-n 直接开发,中途零确认,只在 FAIL 3 轮升级时交人。 与 agent-feature 的分工:feature 是「加一个房间」(执行 F-n 需求增量);本命令是「修房子里的漏水点」(执行 B-n bug 修复)。执行循环、回归策略、结算纪律全部同构。 初衷铁律:完整地修复 bug —— 修复面 = B-n 用例 + affected 影响面,⛔ 无 agent-whole-qa、无全量回归。

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

  1. 确认项目根存在 .cc_code/(否则提示先 /cc-code:init)。
  2. 确认双 agent 可用:dev / qa。
  3. 增量定位(⭐第一动作,见下节)——定位失败即拒跑,后续检查全免。
  4. 确认测试基建:读 project.md §六「测试基建契约」。缺失则把「补齐测试基建」作为 Dev 段首个任务。
  5. 索引体检(静默):codegraph status --json —— pendingChanges 非 0 → 静默 codegraph sync;initialized:false → 报一行(⛔ 不自动重建)。CLI 未装则静默跳过(精准回归降级为全量)。⛔ 健康时一个字都不提。
  6. 执行 /cc-code:cc-code 完成会话开启协议,锁定当前阶段与角色。

⭐ 增量定位(第一动作,纯查表,零推理)

 ① 读 status.md「下一步」
      └─ 期望形态:「B-n 待修复」+(bugs.md 里有对应 OPEN 条目)
           ├─ 没有 B-n / 写的是「未诊断」/ 下一步是别的事
           │     → ⛔ 拒跑:「bug 未诊断,请先走 /cc-code:plan-debug」
           │       (本命令绝不现场诊断根因——根因唯一来源 = B-n 条目)
           └─ 拿到 B 号 + 条目内容(复现/期望出处/根因/方案/影响面)
 ② 读 gates.md → 查该 B-n 是否已有 PASS 记录
 ③ 对账:
      已有 PASS → 报「B-n 已修复,无事可做」,结束
      无 PASS   → B-n 即本次执行范围,进 Dev 段

生命周期总览

启动 → 增量定位 → ①Dev → 校准 → ②QA → 校准
                              │
                    ┌─────────┴──────────┐
                    ▼                    ▼
              FAIL→回Dev(≤3)         PASS→结算→结束
                    │                (⛔ 无全量清算)
            3轮仍FAIL→升级(交人)

阶段执行规范

① Dev 段(agent: dev)

项 内容
读 status, bugs.md(仅 B-n 条目), prd / ux(仅期望出处命中的断言/判定项), project(含实现指引章节), data / api(仅命中契约小节)
做 只按 B-n 方案修:根因处修复 + 按「影响面」清单逐文件核对连带;遵循 project.md 约定;⛔ 不重构无关代码、不改契约
探针 B-n「需加探针」非「无」时:先按其加临时日志,每条带标记 CC-PROBE-B<n>,走 project.md §七 门面(DEBUG 级)→ 复现取证 → 修复 → ⛔ 交 QA 前删光(rg CC-PROBE-B<n> 零命中)
跑 Agent(dev) → 自检:pnpm lint → tsc --noEmit → pnpm test → pnpm test:e2e
输出 修复代码 + 完成报告(文件清单 + pass/fail)
写 src/, project.md §六 声明的测试根
✅ 完成后 执行 /cc-code:cc-code 校准(静默)

Read the full file on GitHub · 102 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. today Changed · +1 lines a4df60895db3
  2. 1mo ago Changed · -143 tokens per session 5e9ee6c5e556
  3. 1mo ago First seen · 101 lines · 162 tokens per session scan A 475d54f9f2fb

Subscribe to this mod's changes

agent-debug is a skill published in the GitHub repository weiyi88/cc-code (5 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 2,288 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

Other skills, from other repositories

debugging-workflow

Find the cause of a defect by hypothesis and bisection rather than by guessing, then fix it behind a regression test. Use when the user reports a bug, a crash, a test that fails intermittently, a performance regression or a production incident, asks why code behaves unexpectedly, or when the task involves reproducing…

personamanagmentlayer/pcl · 91 tokens

engineering-playbook

A generic senior-engineer operating playbook. MANDATORY for every coding task — plan before you type, test before you claim, debug from evidence, review your own diff.

logandoo/vibeweaver · 40 tokens

superpowers-systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

EvovexAI/EvoFlow · 23 tokens

evoflow-debugging

A structured debugging guide for investigating EvoFlow bugs, mismatched behavior, incorrect data, and failed tests.

EvovexAI/EvoFlow · 100 tokens

absolute-deflake

Flaky test fixes: detect nondeterministic tests empirically (repeat/shuffle/parallel runs), diagnose the root cause, fix it — never retry/skip/sleep — and verify across many randomized runs. Triggers on "absolute deflake", "fix flaky tests", "CI is flaky", "this test fails randomly/intermittently".

maddhruv/absolute · 73 tokens

software-development-workflows

Use when planning, debugging, testing, reviewing, simplifying, or spiking code changes across languages: systematic debugging, TDD, debugpy/Node inspectors, code cleanup, and implementation strategy.

dirtybits/agent-skills · 44 tokens