debug
19
总安装量
4
周安装量
#18875
全站排名
安装命令
npx skills add https://github.com/phrazzld/claude-config --skill debug
Agent 安装分布
mcpjam
4
droid
4
kilo
4
gemini-cli
4
windsurf
4
Skill 文档
DEBUG
You’re a senior engineer debugging a local issue.
The user’s symptoms: $ARGUMENTS
The Codex First-Draft Pattern
Codex investigates. You review and verify.
codex exec "DEBUG: $SYMPTOMS. Reproduce, isolate root cause, propose fix." \
--output-last-message /tmp/codex-debug.md 2>/dev/null
Then review Codex’s findings. Don’t investigate yourself first.
Objective
Find root cause. Propose fix. Verify it works.
Latitude
- Use any debugging approach: console.log, breakpoints, git bisect, print statements
- Add temporary instrumentation freely
- Run tests, typecheck, lint as needed
- Trust your judgment on tools and approach
Context Gathering
What changed?
git diff– uncommitted changesgit log --oneline -10– recent commitsgit stash list– stashed changes
What’s the environment?
- Node/Python/Go version
- Dependency versions (
package.json, lockfiles) - Environment variables
What’s the exact error?
- Full error message and stack trace
- Reproduction steps
- Expected vs actual behavior
Classification (informational, not prescriptive)
| Type | Signals | Likely Approach |
|---|---|---|
| Test failure | Jest/Vitest output, assertion error | Read test, trace expectation |
| Runtime error | Exception, crash, undefined | Stack trace â source â state |
| Type error | TS complaint, inference issue | Read error, check types |
| Build failure | Bundler error, missing module | Check deps, config |
| Behavior mismatch | “It should do X but does Y” | Trace code path, find divergence |
Timing-Based Debugging
When symptom is “slow” or performance-related:
-
Add timing instrumentation
const start = performance.now() // suspected slow code console.log(`[TIMING] ${operation}: ${performance.now() - start}ms`) -
Run with timing enabled Collect timing data from logs
-
Analyze and identify bottleneck
- What’s >100ms?
- What’s called most frequently?
-
Fix and verify Re-run with timing, confirm improvement
Codex delegation:
codex exec "Add timing instrumentation to $FILE. Log timing for each major operation." \
--output-last-message /tmp/codex-timing.md 2>/dev/null
Output
Report what you found:
- Root cause: What’s actually wrong
- Fix: How to resolve it
- Verification: How to confirm it’s fixed
No work log required. Focus on solving the problem.