systematic-debugging
Skill3 starsChanged 7 months agoMITView on GitHub
Structured diagnosis of bugs, errors, and stuck processes. Maps symptoms to hypotheses, uses bounded log reading, and produces actionable reports. Use when debugging errors, investigating stuck processes, diagnosing performance issues, or when something isn't working as expected.
190 other projects use a version of this.
Adopted by
Most recently taken up by
- DemonDamon/AgenticXtheir own version, first seen Nov 9, 2026
- chrysogonus/power-agentstheir own version, first seen Nov 8, 2026
- willy92wins/DayZ-Modding-Knowledge-Packtheir own version, first seen Nov 8, 2026
- roundpilot/superpowers-antigravitytheir own version, first seen Nov 8, 2026
- REPOZY/superpowers-optimizedtheir own version, first seen Nov 8, 2026
- lingyired/status-triotheir own version, first seen Nov 8, 2026
Used with
Projects with it also use chinese-code-review, chinese-commit-conventions and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Leodorareluctant259Skillchinese-code-review
中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈
Also in 8 projects that use this
Leodorareluctant259Skillchinese-commit-conventions
中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化
Also in 8 projects that use this
obraSkilldiagnosing-superpowers
Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
Also in 20 projects that use this
mjunaidcaSkillbuilding-chatgpt-apps
Guides creation of ChatGPT Apps with interactive widgets using OpenAI Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode configuration. NOT when building standard MCP servers without widgets (use building-mcp-servers skill instead).
Also in 4 projects that use this
mjunaidcaSkillbuilding-chat-interfaces
Build AI chat interfaces with custom backends, authentication, and context injection. Use when integrating chat UI with AI agents, adding auth to chat, injecting user/page context, or implementing httpOnly cookie proxies. Covers ChatKitServer, useChatKit, and MCP auth patterns. NOT when building simple chatbots without persistence or custom agent integration.
Also in 4 projects that use this
- +2 more from Leodorareluctant259
- +5 more from mjunaidca
Other versions190 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 190
- obra/superpowers★ 314ksame name
- NousResearch/hermes-agent★ 262ksame name
- open-metadata/OpenMetadata★ 16ksame name
- jnMetaCode/superpowers-zh★ 8.4ksame name
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- openai/plugins★ 7.8ksame name
- ChrisWiles/claude-code-showcase★ 6.1ksame name
- farm-fe/farm★ 5.6ksame name
- microsoft/FluidFramework★ 4.9ksame name
180 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- architectural-planningSkill
- browser-testingSkill
- codebase-explorationSkill
- code-reviewSkill
- code-verificationSkill
- context-summarizationSkill
- disciplined-codingSkill
- effective-tool-useSkill
- knowledge-managementSkill
- prompt-engineeringSkill
- safe-autonomous-modeSkill
- security-reviewSkill
- session-handoffSkill
- task-orchestrationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. 0 are common, 21 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
21
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Don't report when healthy.
- Distinctive: line 15
Don't kill or signal processes unless explicitly asked.
- Distinctive: line 16
Read errors before guessing causes.
- Distinctive: line 21
Start here. Match the symptom to candidate hypotheses, then investigate:
- Distinctive: line 39
Read the error message / stack trace carefully.
- Distinctive: line 40
Check recent changes: git log --oneline -10 and git diff — was something just changed?
- Distinctive: line 41
Read relevant log files. Use bounded reading: tail the last 50-100 lines, don't read the entire log.
- Distinctive: line 44
If the issue isn't visible in current logs:
- Distinctive: line 46
Ask the user to reproduce the issue
- Distinctive: line 52
Run the most discriminating check first.
- Distinctive: line 53
If the first hypothesis is disproven, move to the next — don't cling to your initial guess.
- Very specific: line 56
Use Grep with -C 5 context to search for error patterns in logs and code without reading entire files.
- Very specific: line 57
Use head_limit on Grep to avoid drowning in results.
- Distinctive: line 58
Only Read full files after Grep confirms they're relevant.
- Distinctive: line 59
When debugging spans >5 files, spawn a subagent via the Agent tool for isolated investigation.
- Distinctive: line 63
Verify the fix by reproducing the original failure scenario — it should now succeed.
- Distinctive: line 64
Check for regressions in related functionality.
- Distinctive: line 65
If you can't verify (no repro, no test), say so explicitly.
- Distinctive: line 71
Tail first: Read the last 50-100 lines to find recent errors.
- Very specific: line 72
Grep for severity: Search for [ERROR], [WARN], FATAL, panic, Exception, traceback across the full file.
- Distinctive: line 73
Use offset/limit: When you find a relevant line number, read just that region with surrounding context.
- Distinctive: line 74
Check file size first: If a log is >1MB, definitely use targeted reads, not full file reads.
- Distinctive: line 78
When reporting findings, use this two-part structure:
- Distinctive: line 97
When investigating stuck or slow processes:
- Very specific: line 118
Use codebase-exploration patterns to trace code paths during investigation.
- Very specific: line 119
Use effective-tool-use patterns when running diagnostic commands safely.
- Very specific: line 120
After fixing, apply code-verification patterns to prove the fix works.
- Very specific: line 124
If user-config.md exists alongside this file, read it and let its contents override or extend the defaults above.
“Common” is measured: kept by at least 6 in 10 of the 177 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Systematic Debugging
CRITICAL: This is a diagnostic skill. Investigate first, fix second. Don't guess — gather evidence.
Diagnostic Mindset
- Don't report when healthy. If everything looks fine, say so directly — don't manufacture issues.
- Don't kill or signal processes unless explicitly asked. This is diagnostic only.
- Read errors before guessing causes. The error message is the first evidence.
- Reproduce before fixing. A fix you can't verify is a guess.
Symptom-to-Hypothesis Map
Start here. Match the symptom to candidate hypotheses, then investigate:
| Symptom | Likely Hypotheses | First Investigation |
| High CPU (≥90% sustained) | Infinite loop, runaway regex, tight polling | Sample twice 1-2s apart to confirm sustained; check stack/profile |
| Process in D state (uninterruptible sleep) | I/O hang, disk full, NFS stall, lock contention | Check dmesg, disk usage, mount status |
| Process in T state (stopped) | Accidental Ctrl+Z, debugger attached | Check parent process, fg to resume |
| Zombie process (Z state) | Parent not reaping children | Check parent PID, signal parent |
| High memory (≥4GB RSS) | Memory leak, unbounded cache, large dataset loaded | Check growth over time, heap snapshot if available |
| Slow response | N+1 queries, blocking I/O on hot path, missing index | Profile request, check DB query count and timing |
| Hung child process | Waiting for stdin, deadlock, network timeout | pgrep -lP <pid>, check child's full command line |
| Intermittent failure | Race condition, resource exhaustion, DNS flake | Check timing patterns, add logging, reproduce under load |
| Build failure | Dependency version mismatch, stale cache, missing env var | Clean build, check lock file, diff with working state |
| Test failure (flaky) | Shared state, timing dependency, order dependency | Run test in isolation, check setup/teardown, look for shared mutable state |
Investigation Steps
1. Gather Context
- Read the error message / stack trace carefully. Most errors tell you exactly what's wrong.
- Check recent changes:
git log --oneline -10andgit diff— was something just changed? - Read relevant log files. Use bounded reading: tail the last 50-100 lines, don't read the entire log.
2. Enable Logging If Needed
If the issue isn't visible in current logs:
- Enable debug/verbose logging for the affected component
- Ask the user to reproduce the issue
- Re-read the log after reproduction
3. Form and Test Hypotheses
- Based on symptoms and gathered evidence, form 1-3 hypotheses ranked by likelihood.
- For each hypothesis, identify one specific check that would confirm or eliminate it.
- Run the most discriminating check first.
- If the first hypothesis is disproven, move to the next — don't cling to your initial guess.
4. Narrow Down
- Use Grep with
-C 5context to search for error patterns in logs and code without reading entire files. - Use
head_limiton Grep to avoid drowning in results. - Only Read full files after Grep confirms they're relevant. Glob (near-zero tokens) → Grep (lightweight) → Read (heavy).
- When debugging spans >5 files, spawn a subagent via the Agent tool for isolated investigation.
5. Fix and Verify
- Make the minimal fix that addresses the root cause, not the symptom.
- Verify the fix by reproducing the original failure scenario — it should now succeed.
- Check for regressions in related functionality.
- If you can't verify (no repro, no test), say so explicitly.
Bounded Log Reading
Logs can be enormous. Never read an entire log file.
- Tail first: Read the last 50-100 lines to find recent errors.
- Grep for severity: Search for
[ERROR],[WARN],FATAL,panic,Exception,tracebackacross the full file. - Use offset/limit: When you find a relevant line number, read just that region with surrounding context.
- Check file size first: If a log is >1MB, definitely use targeted reads, not full file reads.
Bug Report Format
When reporting findings, use this two-part structure:
Short Summary (1-2 sentences)
What's wrong, which component, and the severity. This is what the reader sees first.
Example: "Auth service returning 500 on /login — null pointer at session.validate()
when session cookie is expired but token is still cached."Detailed Thread
- Symptom: What was observed (exact error messages, status codes, behavior)
- Root cause: What's actually wrong and why (with evidence — file paths, line numbers, log excerpts)
- Evidence: Commands run and their output (copy-paste, not paraphrased)
- Fix: What was changed or what should be changed (specific files and lines)
- Verification: How the fix was verified, or why it couldn't be verified
Process Diagnostics
When investigating stuck or slow processes:
# List processes with CPU, memory, state, and uptime
ps -axo pid=,pcpu=,rss=,etime=,state=,comm=,command= | grep -E '<process_name>'
# Check child processes
pgrep -lP <pid>
# Sample CPU usage (confirm sustained, not transient)
# Check twice with 1-2s gap- Filter to relevant processes. Don't dump the entire process table.
- Sample CPU twice to confirm sustained high usage (transient spikes are normal).
- For hung children, get the full command line:
ps -p <child_pid> -o command=
CRITICAL REMINDER: Investigate before fixing. Bound your log reads. Report only real issues — don't manufacture problems from healthy systems. Reproduce, then fix, then verify.
Related Skills
- Use
codebase-explorationpatterns to trace code paths during investigation. - Use
effective-tool-usepatterns when running diagnostic commands safely. - After fixing, apply
code-verificationpatterns to prove the fix works.
Project Customization
If user-config.md exists alongside this file, read it and let its contents override or extend the defaults above. Common customizations:
- Project-specific log locations and formats
- Common failure modes for this system
- Diagnostic commands specific to the tech stack
- Escalation procedures for production issues
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

