跳到正文
cccskills
免费在 GitHub 公开

debugger

Systematic debugging method: 5-step root-cause analysis (capture, isolate, hypothesize, investigate, fix & verify) plus common bug-pattern reference. Use when errors, exceptions, test failures, or unexpected behavior appear. Loaded automatically by the debugger agent.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md3.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Debugger Skill

Director Mode Lite - Debugging Specialist


5-Step Root-Cause Method

1. CAPTURE      → Collect the full error, reproduce, define expected vs actual
2. ISOLATE      → Narrow to the smallest failing case
3. HYPOTHESIZE  → List and rank likely causes
4. INVESTIGATE  → Test hypotheses, inspect state
5. FIX & VERIFY → Apply the minimal fix, confirm, prevent recurrence

Step 1: Capture

  • Collect the complete error message and stack trace
  • Can reproduce the issue with clear steps
  • Identify the input that triggered the error
  • Know expected vs actual behavior

Step 2: Isolate

  • Identify the failure location from the stack trace
  • Which file(s) and function(s) are involved?
  • When did it start? (git bisect, git log)
  • Narrow down to the smallest reproducible case

Step 3: Hypothesize

  • List possible causes based on evidence
  • Rank hypotheses by likelihood
  • Design a test to confirm or eliminate each

Step 4: Investigate

  • Analyze error messages and logs carefully
  • Add strategic debug logging; inspect variable state at key points
  • Check for: null/undefined values, type mismatches, race conditions, resource exhaustion, external service failures

Common Bug Patterns

PatternSignsCommon Fix
Null/UndefinedCannot read property of undefinedAdd null checks / optional chaining
Off-by-oneLoop runs one too many/few timesCheck loop bounds
Race conditionIntermittent failuresAdd synchronization
Type coercion"1" + 1 = "11"Explicit type conversion
Async issuesPromise { <pending> }Await/handle promises

By language and domain:

  • JavaScript/TypeScript: undefined is not a function (binding), Cannot read property of null (optional chaining), promise rejections (async/await handling), type errors (strict mode)
  • Python: AttributeError (init/typos), TypeError (type validation), ImportError (paths, circular imports), KeyError (dict defaults)
  • Database: connection timeouts (pool exhaustion), constraint violations (validation, foreign keys), deadlocks (transaction ordering)
  • API/Network: 4xx (request validation, auth), 5xx (server-side, resource limits), timeouts (network, long-running queries)

Investigation Tools

# Search for error message
grep -r "error message" src/

# Find recent changes
git log --oneline -20
git diff HEAD~5

# Check specific function
grep -r "functionName" src/

Step 5: Fix & Verify

Apply the solution:

  • Make the minimal change; don't refactor while fixing; one fix per commit

Confirm the fix:

  • Original issue is resolved
  • No new issues introduced
  • Tests pass; add a test to prevent recurrence
  • Manual verification done

Output Format

## Debug Report

### Issue
[Description of the bug]

### Reproduction Steps
1. Step one
2. Step two
3. Observe error

### Root Cause
[Explanation of why this happens]

### Location
- **File**: `src/utils/parser.ts`
- **Line**: 45-52
- **Function**: `parseInput()`

### Fix Applied
[Description of the fix]

### Verification
- [x] Issue resolved
- [x] Tests pass
- [x] No regression

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Validate custom agent file format and structure. Use after creating or editing an agent, before committing agent changes, or when an agent fails to load.

中文简介正在准备中。当前显示原文说明。

claude-world/director-mode-lite802026年8月31日 更新

Generate custom agent from template. Use when creating a new subagent from scratch, or scaffolding an agent file with correct frontmatter.

中文简介正在准备中。当前显示原文说明。

claude-world/director-mode-lite802026年8月31日 更新

agents

免费

List all available agents (core, expert, self-evolving). Use when the user asks what agents are available or runs /agents.

中文简介正在准备中。当前显示原文说明。

claude-world/director-mode-lite802026年8月31日 更新

auto-loop

免费

TDD-based autonomous development loop with checkpoint recovery and observability changelog

中文简介正在准备中。当前显示原文说明。

claude-world/director-mode-lite802026年8月31日 更新

changelog

免费

View and manage the runtime changelog for observability

中文简介正在准备中。当前显示原文说明。

claude-world/director-mode-lite802026年8月31日 更新

Track development session events in a daily markdown changelog, including file changes, test results, and key decisions.

中文简介正在准备中。当前显示原文说明。

claude-world/director-mode-lite802026年8月31日 更新

查看 claude-world 的全部技能

报告此技能的问题