Install
openclaw skills install problem-solving-methodology结构化问题诊断与解决方法论。 Use when: (1) 问题原因不明需要调查/"分析一下这个问题"/"排查一下", (2) 之前的修复尝试失败了, (3) 问题涉及多个组件交互/"为什么会这样"/"调查一下原因", (4) 修改有风险或副作用/"诊断一下", (5) 用户明确要求先分析再修复。 NOT for:...
openclaw skills install problem-solving-methodologyDirect fix (skip this skill):
Use this skill:
Before solving, check if the problem itself is valid. Many problems dissolve when examined properly.
Run these 3 checks sequentially. If any check dissolves the problem, stop and tell the user — a dissolved problem is more valuable than a solved one.
Does the problem statement contain vague, undefined key terms?
Common trap words: "优化" "合适" "更好" "正常" "应该" "稳定"
Test: Can you give a measurable or actionable definition for every key term? If not, the problem can't be solved because it hasn't been stated.
→ If trapped: Ask the user to define the vague term. "你说的'优化'具体指什么?响应时间从 X 降到 Y?还是内存占用?还是用户体验?"
Rewrite the problem as: "This problem assumes X. Is X true?"
Common false assumptions:
→ If assumption is false: Tell the user. "你的问题假设了「X」,但这个前提可能不成立。如果 X 不成立,问题就消失了。"
If the problem survives all 3 checks, proceed to full diagnosis.
Turn vague "something's wrong" into a precise statement.
问题:[一句话]
现象:[具体发生了什么]
预期:[应该是什么样]
影响:[谁受影响,严重程度]
可复现:[是/否,触发条件]
Rules:
Do not skip to fixing. Trace the data flow end-to-end first.
Input → Step A → Step B → Step C → Output
↓ ↓ ↓
Check Check Check
Read actual values (logs, state files, source code). Do not guess.
Find the first step where output diverges from expected. That's where the bug is.
Three questions before you declare root cause:
All three must be answered. If not → keep diagnosing.
Diagnostic tools (prefer in order):
Generate at least 2 candidate solutions. Compare on:
| Dimension | Question |
|---|---|
| Effectiveness | Fixes root cause or just symptom? |
| Risk | Could it break something else? |
| Complexity | How many components touched? |
| Reversibility | Can we roll back if wrong? |
| Durability | Survives restarts / updates? |
| Side effects | Impact on other features? |
Present as:
方案 A:[one line]
✅ [pros] ⚠️ [risks]
方案 B:[one line]
✅ [pros] ⚠️ [risks]
→ 推荐 A,因为 [reason]
Always include the "do nothing / workaround" option if viable.
Pre-flight checklist:
Rules:
Three levels of verification:
Show evidence, don't say "应该好了".
## 复盘:[问题名]
耗时:X 分钟(有效 Y / 弯路 Z)
根因:[一句话]
修复:[一句话]
弯路:[走了什么弯路]
教训:[提炼的规则]
Write lessons to .learnings/ if reusable.
| 信号 | 动作 |
|---|---|
| 同一假设连续 3 次验证无结论 | 停止,换假设或换诊断维度 |
| 累计诊断 >15 分钟无进展 | 暂停,向用户汇报已排除项 + 当前卡点,询问是否有额外线索 |
| 累计尝试 >5 个假设均被否定 | 考虑问题是否需要消解(回 Step 0)或需要更多上下文 |
| 修复后问题复现 | 不叠加补丁,回退到修复前状态,重新走 Step 1 |
| Pattern | What it looks like | Fix |
|---|---|---|
| Guess-and-fix | See symptom → hypothesize → change immediately | Map call chain first |
| One-end-only | Check only input or output | Trace full data flow |
| Surface fix | Change the bad value without asking why it's bad | Ask "why did it become this value?" |
| Multi-change | Change 3 things at once | One variable at a time |
| Premature victory | "Should be fixed now" without checking | Show evidence |
| No rollback | Forget to record original values | Backup before modify |
问题解决后,根据结果判断是否推荐下一步。
| 触发条件 | 推荐 |
|---|---|
| 根因是代码 bug,修复需要多文件改动 | 「根因清楚了,修复交给 coding-agent spawn Claude Code 来做。」 |
| 问题根因值得记录(同类问题可能再犯) | 「这个教训值得记下来,写到 .learnings/ 防止再犯。」 |
| 问题在消解层被消解(问题本身不成立) | 「问题已经消解了。如果背后有更大的决策要做,可以拉出来单独讨论。」 |
| 诊断过程发现系统架构层面的隐患 | 「这次修好了,但架构上还有隐患。要不要排个时间做一次 healthcheck?」 |