← Back to Skills Marketplace
aptratcn

Systematic Debugging

by Erwin · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ✓ Security Clean
117
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install xiaobai-systematic-debugging
Description
Systematic Debugging - 4-phase root cause process. No guessing, no random fixes. Trace evidence, identify root cause, fix systematically.
README (SKILL.md)

Systematic Debugging 🔍

4 phases. No guessing. Find root cause.

The 4 Phases

Phase 1: OBSERVE    → What exactly is wrong? (Gather evidence)
Phase 2: ISOLATE    → Where does it go wrong? (Narrow scope)
Phase 3: HYPOTHESIZE → Why does it go wrong? (Form theory)
Phase 4: VERIFY     → Is it actually fixed? (Prove it)

Phase 1: OBSERVE (Don't Skip This)

Before touching any code, answer these:

□ What is the expected behavior?
□ What is the actual behavior?
□ When did it start? (What changed?)
□ Is it reproducible? (100%? Intermittent?)
□ What's the exact error message / log output?
□ What environment? (OS, version, dependencies)

Common mistake: Jumping to "I think it's because..." without observing first.

What to do:

  • Read the actual error (copy-paste, don't paraphrase)
  • Check logs (recent ones first)
  • Reproduce the issue (if possible)
  • Document what you see

Phase 2: ISOLATE (Narrow the Scope)

Binary search for the bug:

1. Is the problem in my code or external?
   → Comment out my code. Still broken? External.

2. Is it in the input, processing, or output?
   → Print/log at each stage.

3. Is it in one specific file/function?
   → Remove files/functions one by one.
   → Bug disappears? That's where it is.

4. Is it a specific condition?
   → Test with different inputs.
   → Pattern emerges? Root cause narrows.

Techniques:

  • git bisect — Find the commit that introduced the bug
  • Print statements at boundaries
  • Comment out code sections
  • Test with minimal reproduction

Phase 3: HYPOTHESIZE (Form a Theory)

Write your hypothesis BEFORE fixing:

I believe [X] is broken because [Y].

Evidence supporting:
- [Observation 1]
- [Observation 2]

Evidence against:
- [Observation 3]

If I change [Z], the fix should:
- Make [test case] pass
- Not break [other thing]

Common mistake: Fixing without understanding. You might "fix" the symptom, not the cause.

Anti-patterns:

  • ❌ "Let me try changing this..." (random fixing)
  • ❌ "This usually works..." (cargo cult debugging)
  • ❌ "It's probably a race condition" (vague guess)

Phase 4: VERIFY (Prove It)

Before claiming "fixed":

□ Original test case now passes
□ Edge cases tested
□ No new regressions introduced
□ Error no longer appears in logs
□ Fix makes sense given the hypothesis

Verification checklist:

# Run the failing test
npm test -- --grep "failing test"
# Check logs for errors
tail -f /var/log/app.log
# Test edge cases
[try empty input, huge input, unicode, etc.]
# Run full test suite
npm test

Real Example

Bug: "User login sometimes fails"

Phase 1 OBSERVE:
- Error: "Invalid token" (not "wrong password")
- Intermittent (10% of logins)
- Started after deploying auth-service v2.3
- Only on mobile, not desktop

Phase 2 ISOLATE:
- Network logs: token arrives intact
- Auth service: token validation fails intermittently
- Added logging: token format varies slightly

Phase 3 HYPOTHESIZE:
- Mobile client generates tokens with different encoding
- v2.3 tightened token validation
- Theory: mobile token format doesn't match new validation

Phase 4 VERIFY:
- Fixed token format in mobile client
- Tested 100 logins on mobile: 100% success
- Tested desktop: still works
- Checked logs: no "Invalid token" errors

Trigger Phrases

  • "bug", "error", "not working"
  • "broken", "debug", "fix this"
  • "doesn't work", "fails", "crash"
  • "调试", "修复", "报错"

Integration

  • EVR Framework — Each phase is Execute/Verify
  • Cognitive Debt Guard — Document bugs in code review
  • Error Recovery — What to do after finding the cause

License

MIT

Usage Guidance
This skill is a methodology guide and is internally coherent. It does not require credentials or install anything automatically. Before you act on its suggestions: (1) avoid blindly running or pasting commands into privileged shells—review them first; (2) if you choose to follow the README's git clone, inspect the cloned repository before running any scripts or code; (3) when editing/commenting code follow normal safety practices (commit or backup first) to avoid accidental data loss. If you allow autonomous agent actions, ensure the agent's execution environment is appropriately restricted so it cannot modify or exfiltrate unrelated sensitive data.
Capability Analysis
Type: OpenClaw Skill Name: xiaobai-systematic-debugging Version: 2.0.0 The skill bundle provides a structured 4-phase debugging methodology (Observe, Isolate, Hypothesize, Verify) for an AI agent to follow. It consists entirely of documentation and instructional markdown (SKILL.md, README.md) without any executable code, scripts, or malicious prompt injection attempts. The suggested commands (e.g., 'npm test', 'tail -f /var/log/app.log') are standard debugging practices and align with the stated purpose of the skill.
Capability Assessment
Purpose & Capability
Name/description (systematic debugging) matches the content of SKILL.md: a 4-phase debugging process. Nothing requested (env, binaries, installs) is unexpected for a debugging guide.
Instruction Scope
Runtime instructions are strictly about observing, isolating, hypothesizing, and verifying bugs. Commands referenced (npm test, tail logs, git bisect, print statements) are appropriate for debugging and do not instruct collection or exfiltration of unrelated data. They do reference local logs (e.g., /var/log/app.log) and editing/commenting code, which are normal debugging actions.
Install Mechanism
There is no install spec (instruction-only), so nothing is written to disk by the skill itself. README suggests a git clone of a GitHub repo — that is an optional manual action and not enforced by the skill, but cloning/running external code carries the usual risks and should be reviewed before use.
Credentials
The skill requests no environment variables, credentials, or config paths. The instructions reference common local artifacts (logs, repo, tests) that are proportional to debugging tasks.
Persistence & Privilege
always is false and the skill has no install or files that persist beyond the SKILL.md/README. It does not request system-wide configuration changes or cross-skill credentials.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install xiaobai-systematic-debugging
  3. After installation, invoke the skill by name or use /xiaobai-systematic-debugging
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.0.0
v2.0: 4-phase framework with real examples
v1.0.0
Initial release: 4-phase root cause debugging process
Metadata
Slug xiaobai-systematic-debugging
Version 2.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Systematic Debugging?

Systematic Debugging - 4-phase root cause process. No guessing, no random fixes. Trace evidence, identify root cause, fix systematically. It is an AI Agent Skill for Claude Code / OpenClaw, with 117 downloads so far.

How do I install Systematic Debugging?

Run "/install xiaobai-systematic-debugging" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Systematic Debugging free?

Yes, Systematic Debugging is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Systematic Debugging support?

Systematic Debugging is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Systematic Debugging?

It is built and maintained by Erwin (@aptratcn); the current version is v2.0.0.

💬 Comments