systematic-debugging

A step-by-step method for investigating and fixing software bugs: reproduce the problem, find its root cause, assess what it may affect, fix it, and test again.

In plain words
What is it for?
Use it to investigate bug reports, trace the code path that fails, record a root-cause analysis, assess affected areas, and verify that a fix works.
Why use it?
It reduces guesswork and helps prevent a quick fix from creating another problem. It also makes unclear or unreproducible bug reports easier to handle.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/ryanzhao1011/workframe/systematic-debugging
Any agent
npx skills add ryanzhao1011/workframe --skill systematic-debugging
Clone the repo
git clone --depth 1 https://github.com/ryanzhao1011/workframe

Made for: Claude Code, Codex.

Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,614 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00040 $0.01614
Opus 5 $0.00020 $0.00807
Sonnet 5 $0.00008 $0.00323
Haiku 4.5 $0.00004 $0.00161

Measured yesterday against content hash 32d8574dd905, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

systematic-debugging 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 yesterday.

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.

plugins/core/skills/systematic-debugging/SKILL.md · 157 lines

How it starts

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

系统化调试技能

产物去向

RCA / 调试结论默认只在响应中呈现。需要留痕时:修复本身进 commit message; 值得跨需求复用的根因结论按 skill: document-norms §1 落 <sub>/decisions/; 线上故障走 projects/issues/BUG-*.yaml不默认写文件。

适用场景

  • @dev 收到 Bug/Issue 报告时(来自 @qa、用户反馈、线上监控等)
  • 禁止"头痛医头脚痛医脚"式的随意修改

核心原则

先理解,再修复。修复前必须能回答三个问题:

  1. 为什么会出现这个 Bug?(根因)
  2. 这个修复会不会引入新 Bug?(影响面)
  3. 修复后如何验证确实修好了?(回归)

五步流程

第 1 步:复现确认

目标:确认问题存在且能稳定复现

步骤 动作
读取 Issue projects/issues/{issue-id}.yaml 读取问题描述、复现步骤(issue-id 是全局唯一扁平 ID,例:BUG-001 / SEC-001;issues 目录是扁平结构,不按模块分子目录)
解析归属 读取 Issue 的 area / module / component / spec_ref 字段,决定影响面分析的起点(例:area=backend, module=auth 提示先排查 auth 模块代码与相关 spec)
构造复现条件 按 Issue 描述构造输入数据、执行环境、操作序列
执行复现 运行并观察实际输出 vs 期望输出
复现结论 ✅ 能稳定复现 / ⚠️ 偶发 / ❌ 无法复现

如果无法复现:

  • 向 Issue 报告者询问更详细的复现步骤
  • 检查环境差异(版本、配置、数据)
  • 不要立即关闭 Issue——保持 status: open,把「待补充的复现信息」写进 issue 的复现步骤/描述字段(issue schema 无 tags 字段,见 projects/issues/TEMPLATES.md

第 2 步:根因分析(RCA)

目标:定位问题代码并理解"为什么会出错"

## 根因分析

### 症状
{Bug 的外在表现}

### 触发路径
{代码执行的调用链:A → B → C → 出错}

### 根因
{具体哪行代码、哪个逻辑导致问题}

### 为什么会写成这样
{原作者的意图 / 遗漏的边界条件 / 错误的假设}

### 为什么之前没暴露
{之前的使用场景为何没触发此问题}

第 3 步:影响面评估

目标:评估修复可能波及的其他模块(Blast Radius)

评估维度 说明
代码依赖 谁调用了这段出错代码?改动后他们会受影响吗?
数据影响 修复会改变数据结构/存储吗?老数据需要迁移吗?
接口变更 是否改变了对外 API 行为?调用方需要知晓吗?
性能影响 修复引入的新逻辑是否影响性能?
安全影响 修复是否引入新的安全隐患?

第 4 步:修复与自测

目标:执行修复并验证修复有效

  1. 实施修复:最小范围修改,不做无关重构
  2. 复现步骤重跑:确认原问题不再出现
  3. 边界测试:测试修复逻辑的边界条件(空值、极值、并发等)
  4. 影响面验证:对 Step 3 识别的影响模块做快速验证

第 5 步:回归标注

目标:为 @qa 标注此次修复的回归测试要点

## 回归测试要点

### 必测(直接相关)
- [ ] 原 Bug 复现场景已修复
- [ ] 修复代码的边界条件测试

### 建议测(影响面)
- [ ] {被影响的模块 A}
- [ ] {被影响的模块 B}

### 关注点(潜在风险)
- {需要长期观察的性能/稳定性指标}

输出模板

## RCA 报告:{Issue-ID}

### 1. 复现确认
- 复现结果:{✅ 稳定复现 / ⚠️ 偶发 / ❌ 无法复现}
- 复现步骤:{...}

### 2. 根因分析
- 症状:{...}
- 触发路径:{...}
- 根因:{具体代码位置 + 错误逻辑}
- 为什么会写成这样:{...}

### 3. 影响面评估
- 代码依赖:{...}
- 数据影响:{...}
- 接口变更:{...}

### 4. 修复方案
- 修改文件:{路径}
- 修改内容:{具体改动}
- 自测结果:{...}

### 5. 回归测试要点
- 必测:{...}
- 建议测:{...}

Read the full file on GitHub · 157 lines

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. yesterday First seen · 157 lines · 40 tokens per session scan A 32d8574dd905

Subscribe to this mod's changes

systematic-debugging is a skill published in the GitHub repository ryanzhao1011/workframe (4 stars, last pushed 14d ago), licensed MIT. It adds 40 tokens to every session and 1,614 once invoked, about $0.0002 per session on Opus 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-08-31.

Related

Other skills, from other repositories

check-understanding

Phase quiz for AI Engineering from Scratch. Trigger with "quiz me", "test phase", "check my understanding", "do I know phase 3", or /check-understanding .

fancyboi999/ai-engineering-from-scratch-zh · 44 tokens

find-your-level

Interactive quiz that maps your AI/ML knowledge to a starting point in the 260-lesson, 20-phase AI Engineering from Scratch curriculum. Trigger phrases: "where should I start", "find my level", "what do I know", "which phase", "assess my knowledge", "placement test", "skip ahead".

fancyboi999/ai-engineering-from-scratch-zh · 71 tokens

agent-memory-mcp

A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).

lingxling/awesome-skills-cn · 26 tokens

eval-agents

Audit Claude Code agents defined in .claude/agents/ for description specificity, model tier appropriateness, tools scoping, and system prompt quality. Detects dispatch ambiguity between agents, flags over-permissive tool grants, and checks for human-in-the-loop patterns that break programmatic orchestration. Use when…

FlorianBruniaux/claude-code-plugins · 93 tokens

check-cache-bugs

Audit Claude Code setup for cache bugs (CC#40524): sentinel, --resume/--continue, attribution header + ArkNill B3/B4/B5.

FlorianBruniaux/claude-code-plugins · 38 tokens

autoresearch

Autonomous improvement loop: scan codebase metrics, scaffold experiment files, run agent-driven iterations until metric improves.

FlorianBruniaux/claude-code-plugins · 24 tokens