技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
root-cause-analysis【数据与研究】Deep root cause analysis using the 5 Whys and Fishbone techniques. Use when systematic debugging hasn't found the cause, or for complex systemic issues. Keywords: root cause, why, underlying, fundamental, systemic, deep, origin
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Philosophy: Don't stop at the first "why" — dig until you hit bedrock.
Use this skill when:
Do NOT use this skill when:
Before starting:
Goal: Clearly define what we're analyzing.
Steps:
State the Problem Precisely
Template:
"When [condition], the system [actual behavior]
instead of [expected behavior]."
Example:
"When a user submits a login form with special characters,
the system returns a 500 error instead of validating input."
Gather Impact Data
Document Timeline
Output: Clear problem statement with context.
Goal: Drill down to fundamental causes.
Method:
Start: Problem Statement
│
├─ Why? → First-level cause
│ │
│ ├─ Why? → Second-level cause
│ │ │
│ │ ├─ Why? → Third-level cause
│ │ │ │
│ │ │ ├─ Why? → Fourth-level cause
│ │ │ │ │
│ │ │ │ └─ Why? → ROOT CAUSE
Rules:
Example:
Problem: Login fails with special characters
Why #1: Server returns 500 error
→ Because: Unhandled exception in auth.service.ts
Why #2: Why is there an unhandled exception?
→ Because: SQL query fails with syntax error
Why #3: Why does SQL have syntax error?
→ Because: User input is concatenated directly into query
Why #4: Why is input concatenated directly?
→ Because: Developer didn't use parameterized queries
Why #5: Why didn't developer use parameterized queries?
→ Because: No code review caught it, and no security guidelines exist
ROOT CAUSE: Missing security coding standards and review process
Goal: Explore contributing factors systematically.
Categories to Examine:
┌──────────┐
┌──────────────────►│ │
│ Environment │ │
│ │ │
┌─────────┴───┐ │ PROBLEM │
│ Methods ├──────────────►│ │
└─────────────┘ │ │
│ │
┌─────────────┐ │ │
│ Machines ├──────────────►│ │
│ (Systems) │ │ │
└─────────────┘ └─────┬────┘
│
┌───────────────────────────┘
│
┌────┴────┐ ┌──────────┐ ┌──────────┐
│ People │ │Materials │ │Measurement│
│(Process)│ │ (Data) │ │ (Metrics)│
└─────────┘ └──────────┘ └──────────┘
For Each Category, Ask:
| Category | Questions to Ask |
|---|---|
| Methods | Is the process correct? Is it followed? Is it documented? |
| Machines | Is the system configured correctly? Dependencies up to date? |
| Environment | Dev vs Prod differences? External factors? |
| People/Process | Training adequate? Communication clear? Handoffs smooth? |
| Materials/Data | Data quality? Input validation? Edge cases? |
| Measurement | Are we monitoring correctly? Are we measuring the right things? |
Goal: Weight and prioritize contributing factors.
Steps:
List All Contributing Factors Combine findings from 5 Whys and Fishbone
Score Each Factor
scoring:
frequency: 1-5 (how often does this contribute?)
detectability: 1-5 (how hard to detect? 5=very hidden)
severity: 1-5 (how much impact when it contributes?)
risk_score: frequency × detectability × severity
Create Priority Matrix
High Frequency + High Severity → Address immediately
High Frequency + Low Severity → Address soon
Low Frequency + High Severity → Create safeguards
Low Frequency + Low Severity → Monitor only
Goal: Confirm the root cause is correct.
Validation Questions:
Causation Test
Completeness Test
Actionability Test
Proportionality Test
Goal: Prevent recurrence.
Recommendation Types:
Immediate Fix
Root Cause Fix
Systemic Improvement
Detection Improvement
Example Recommendations:
for_the_sql_injection_example:
immediate:
- Fix the specific query to use parameters
- Add input sanitization
root_cause:
- Establish secure coding guidelines
- Require security review for auth code
systemic:
- Enable SQL injection detection in SAST tooling
- Add security-focused code review checklist
- Security training for developers
detection:
- Add SQL injection tests to CI pipeline
- Monitor for unusual database queries
# Root Cause Analysis Report
## Problem Statement
[Clear statement of the problem]
## Timeline
- First observed: [date]
- Recent changes: [list]
- Frequency: [how often]
## 5 Whys Analysis
1. Why? → [answer]
2. Why? → [answer]
3. Why? → [answer]
4. Why? → [answer]
5. Why? → [answer]
## Contributing Factors
| Factor | Category | Risk Score | Priority |
|--------|----------|------------|----------|
| [factor] | [cat] | [score] | [priority] |
## Root Cause
[Clear statement of root cause]
## Validation
- [ ] Causation confirmed
- [ ] Complete (no other causes)
- [ ] Actionable
- [ ] Proportional
## Recommendations
### Immediate
- [action]
### Root Cause Fix
- [action]
### Systemic
- [action]
### Detection
- [action]
Before claiming analysis complete:
skills/kilo-kit/debugging/systematic/ - For initial bug identificationskills/kilo-kit/debugging/verification/ - For validating fixesskills/kilo-kit/quality/code-review/ - For review improvementsRoot Cause Analysis Skill v1.0.0 — Dig until you hit bedrock