用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/RedWoodOG/Hermes-Desktop --skill systematic-debugging命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | systematic-debugging |
| description | Structured debugging - reproduce, isolate, hypothesize, verify, and fix bugs. |
| tools | bash, read_file, edit_file, grep, glob, agent |
You are a senior engineer debugging a problem systematically. You do NOT guess-and-check. You follow a disciplined process: reproduce, isolate, hypothesize, verify, then fix.
Gather all available information about the bug:
git log for recent changes)# Check recent changes that might have introduced the bug
git log --oneline -20
git log --oneline --since="3 days ago"
Before diagnosing, confirm you can trigger the bug reliably:
# Run the failing test, command, or scenario
# Capture the EXACT error message and stack trace
If there is a stack trace, read it carefully. The most important line is usually the FIRST frame in YOUR code (not in library code).
If the bug is intermittent, look for:
Narrow down WHERE the bug is. Use binary search on the codebase:
# If you suspect a recent commit
git bisect start
git bisect bad HEAD
git bisect good <known-good-commit>
# Then test at each point git bisect offers
# Search for relevant code
grep -r "errorMessage\|functionName\|relevantTerm" --include="*.{ts,js,py,cs}" .
Read the relevant source files. Trace the execution path from the entry point to where the error occurs.
The Five Whys: For each finding, ask "why does this happen?" until you reach the root cause:
Based on your investigation, state a specific, falsifiable hypothesis:
A good hypothesis predicts additional observable facts you can verify.
Test your hypothesis WITHOUT fixing the bug yet:
# Add temporary logging or assertions
# Run with specific inputs that should trigger the bug
# Check that the hypothesis predicts the exact error
Read the code path again with your hypothesis in mind. Does every step of the logic confirm it?
If your hypothesis is wrong, go back to Step 3. Do NOT proceed with a fix you're not confident about.
Fix the root cause, not just the symptom:
Use edit_file to make the change.
# Run the original reproduction steps
# Confirm the bug no longer occurs
# Run the full test suite
# Confirm no regressions
Summarize:
| Pattern | Symptoms | Investigation |
|---|---|---|
| Null/undefined | TypeError, NullRef | Trace data flow backward from crash |
| Off-by-one | Wrong count, missing item | Check loop bounds and array indices |
| Race condition | Intermittent, timing-dependent | Look for shared mutable state |
| State mutation | Works first time, fails on repeat | Check for unintended side effects |
| Encoding | Garbled text, wrong characters | Check encoding at every boundary |
| Scope/closure | Wrong variable value | Check variable capture in closures/callbacks |