← 返回 Skills 市场
aptratcn

Systematic Debugging

作者 Erwin · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ✓ 安全检测通过
117
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install xiaobai-systematic-debugging
功能描述
Systematic Debugging - 4-phase root cause process. No guessing, no random fixes. Trace evidence, identify root cause, fix systematically.
使用说明 (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

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install xiaobai-systematic-debugging
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /xiaobai-systematic-debugging 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
v2.0: 4-phase framework with real examples
v1.0.0
Initial release: 4-phase root cause debugging process
元数据
Slug xiaobai-systematic-debugging
版本 2.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Systematic Debugging 是什么?

Systematic Debugging - 4-phase root cause process. No guessing, no random fixes. Trace evidence, identify root cause, fix systematically. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 117 次。

如何安装 Systematic Debugging?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install xiaobai-systematic-debugging」即可一键安装,无需额外配置。

Systematic Debugging 是免费的吗?

是的,Systematic Debugging 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Systematic Debugging 支持哪些平台?

Systematic Debugging 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Systematic Debugging?

由 Erwin(@aptratcn)开发并维护,当前版本 v2.0.0。

💬 留言讨论