← 返回 Skills 市场
maochen1980

Debug Root Cause

作者 MaoChen1980 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
31
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install debug-root-cause
功能描述
Run this when any tool returns an error, debugging stalls, or you're starting a new investigation. Replaces random exploration with systematic RCA methodolog...
使用说明 (SKILL.md)

Debug Root Cause — Systematic Investigation Methodology

Action

Write the problem definition + selected method to a temp file, read it back, then execute the investigation.

  1. Define the problem in writing
  2. Select 1-3 methods from the 20-method catalog below
  3. Write problem + method + plan to a temp file
  4. Read it back
  5. Execute the plan step by step

Phase 1: Define the Problem

Write to /tmp/debug-rca.md:

## Problem
What: \x3Cerror message / unexpected behavior>
Expected: \x3Cwhat should happen>
Frequency: \x3Calways / intermittent / conditions>
Impact: \x3Cwhat broke>

Deailed reference: RCA Methods Reference

Phase 2: Select Methods

Pick 1-3 methods based on your situation:

Situation Best Methods
Unknown cause, many variables Divide & Conquer, Single Variable
Regression (used to work) Rollback, Comparison
Intermittent failure Reproduction, Wait & Observe
Error message points somewhere Reverse Inference, Chain Tracing
Complex system, many layers Layer Stripping, Elimination
Data looks wrong Look Inside, Boundary Testing
Need to understand unknown code Log Injection, Time Travel
Can't find the pattern Outlier Analysis, Hypothesis Testing

Method Catalog

1. 分解法 (Divide & Conquer) — Split the problem space into halves. Test which half contains the bug. Recurse on the failing half.

2. 对比法 (Comparison) — Compare working vs failing case. What differs? Environment, input, config, state, timing?

3. 回退法 (Rollback) — Revert to known-good state. Re-apply changes one by one. Which change reintroduces the problem?

4. 假设法 (Hypothesis Testing) — "If X is true then Y should happen when I Z." Predict, test, confirm or refute.

5. 逆推法 (Reverse Inference) — Start at the failure. Trace backward: what had to be true just before? Before that?

6. 尝试法 (Trial & Error) — When the search space is small and each attempt is fast. Rapid iteration.

7. 透视法 (Look Inside) — Don't trust the surface. Inspect internal state: logs, dumps, debuggers, intermediate values.

8. 单变量法 (Single Variable) — Change exactly one factor between tests. Isolate the variable.

9. 边界法 (Boundary Testing) — Test edge values: empty, null, zero, max, min, overflow.

10. 复现法 (Reproduction) — Find minimal reliable steps to reproduce. Can't fix what you can't reproduce.

11. 排除法 (Elimination) — Disable/remove parts. When the problem goes away, the last removed thing is related.

12. 置换法 (Substitution) — Replace suspicious component with known-good one. Does the problem follow the component or stay?

13. 依赖链追溯 (Chain Tracing) — Walk the full dependency chain. The bug is often not where the symptom appears.

14. 日志注入法 (Log Injection) — Add targeted logging at decision points. What path does execution actually take?

15. 时间回溯法 (Time Travel) — What changed right before the problem? Config deploy? Data update? Dependency release?

16. 静候法 (Wait & Observe) — For intermittent problems with long cycles. Extend observation.

17. 分层剥离法 (Layer Stripping) — Bypass outer layers, test the core directly. Add layers back until failure appears.

18. 离群分析 (Outlier Analysis) — What's special about failing cases vs passing ones? Common thread?

19. 强制失败法 (Force Failure) — Deliberately induce the failure condition. Verify understanding by making it happen on demand.

20. 橡皮鸭法 (Rubber Ducking) — Explain the problem to an imaginary colleague. The act of structuring reveals the answer.

Append to the file:

## Method
Selected: \x3Cmethod name>
Rationale: \x3Cwhy this method fits>
Plan: \x3Cspecific steps>

Phase 3: Execute

After reading the file back, follow the plan:

  1. Execute one investigation step
  2. Record what you learned
  3. Update the file with findings
  4. Continue or switch method if stuck

Pitfalls

  • Write the problem BEFORE investigating — vague problem = vague debugging
  • Pick 1-3 methods and go deep — method-hopping is panic
  • Actively try to disprove your hypothesis, not confirm it
  • The symptom is not the cause ("null pointer" is a symptom, not root cause)
  • If stuck after 2 methods, your problem definition is probably wrong — redo Phase 1

Source: https://github.com/MaoChen1980/think-skills Self-optimization: After using this skill, improve it based on what you learned.

安全使用建议
Reasonable to install if you want a structured debugging workflow. Expect it to create or overwrite /tmp/debug-rca.md during use, and keep any investigation steps or self-improvement edits scoped to the current project and explicitly approved changes.
能力评估
Purpose & Capability
The artifacts coherently match the stated purpose: guiding root-cause analysis with a catalog of debugging methods and step-by-step investigation notes.
Instruction Scope
The trigger language is broad, including any tool error, stalled debugging, or new investigation, so it may be invoked more often than necessary, but the behavior remains disclosed and low impact.
Install Mechanism
The package contains only markdown files, no executable scripts, no package install instructions, and metadata says no API key is required.
Credentials
The skill instructs the agent to write and update /tmp/debug-rca.md and may guide normal debugging actions such as inspecting logs or adding targeted logging; this is expected for debugging but should stay task-scoped.
Persistence & Privilege
There is no background persistence, credential use, or privilege escalation. The only persistent-ish behavior is a temp file and a vague self-optimization note, which is disclosed but should not be treated as automatic permission to modify installed skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install debug-root-cause
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /debug-root-cause 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of "debug-root-cause": a skill for systematic root cause investigation. - Introduces a structured 3-phase approach: define the problem, select investigation methods, and execute the plan while recording findings. - Includes a 20-method catalog tailored to different debugging situations, from regression to intermittent failures. - Emphasizes writing out the problem and plan before acting, and iteratively refining both as insights are gained. - Warns against common pitfalls such as vague definitions and premature method switching.
元数据
Slug debug-root-cause
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Debug Root Cause 是什么?

Run this when any tool returns an error, debugging stalls, or you're starting a new investigation. Replaces random exploration with systematic RCA methodolog... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 31 次。

如何安装 Debug Root Cause?

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

Debug Root Cause 是免费的吗?

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

Debug Root Cause 支持哪些平台?

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

谁开发了 Debug Root Cause?

由 MaoChen1980(@maochen1980)开发并维护,当前版本 v1.0.0。

💬 留言讨论