用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dicklesworthstone/pi_agent_rust --skill root-cause-tracing命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | root-cause-tracing |
| description | Trace bugs backward to their origin, not just symptoms |
| version | 1.0.0 |
| author | Ariff |
| when_to_use | When fixing bugs - trace to source before patching |
TRACE BACKWARD TO THE BUG'S ORIGIN
Don't patch symptoms - fix the disease
SYMPTOM
↓ Where does this value come from?
IMMEDIATE CAUSE
↓ What set that to wrong value?
DEEPER CAUSE
↓ Why did that happen?
ROOT CAUSE ← Fix HERE
Q: What exactly went wrong?
→ Document the exact symptom
→ Note file, line, error message
Q: Where does this value/state come from?
→ Find the direct source
→ Check: is THIS the bug or just a carrier?
Q: What set THAT to the wrong value?
→ Follow the data flow backward
→ Each step: is this the origin or just passing it along?
SIGNS YOU'VE FOUND ROOT:
- Logic error in requirements interpretation
- Initial state incorrectly set
- Wrong assumption in algorithm
- Missing validation at entry point
- Broken invariant at creation
You've found root cause when:
You're still at symptoms if:
| Bug Pattern | Root Usually At |
|---|---|
| Wrong value displayed | Data calculation, not display code |
| Null pointer | Where object should've been created |
| Off-by-one | Loop bounds definition, not body |
| Race condition | Shared state design, not specific access |
| Invalid state | State transition logic, not current handler |
❌ Symptom Patching
// Bad: Fix where error happens
if (value === undefined) value = defaultValue
// Good: Find why value is undefined
❌ Guard Stacking
// Bad: Add guards everywhere
if (x) if (y) if (z) doThing()
// Good: Ensure x, y, z correct at source
❌ Quick Fix Pressure
"Just make it work" → Technical debt
Better: "5 more minutes tracing saves 5 hours debugging later"
After identifying root cause:
Use with:
assumption-checker → Was root cause an assumption?dependency-validator → Was root cause a broken dependency?pre-action-verifier → Verify root cause fix before applying