Tooluck logoTooluck
SKILL.md

root-cause-analysis

Agent skill fromrohitg00/skillkit

Performs systematic root cause analysis to identify the true source of bugs, errors, and unexpected behavior through structured investigation phases — not just treating symptoms. Use when a user reports a bug, crash, error, or broken behavior and needs to debug, troubleshoot, or investigate why something is not working; especially for complex or intermittent issues across multiple components. Applies the Five Whys method, hypothesis-driven testing, stack trace analysis, git blame/log evidence gathering, and causal chain documentation to isolate and confirm root causes before applying any fix.

How to install root-cause-analysis

install root-cause-analysis
# install the skillkit pack with the skills CLI
npx skills add rohitg00/skillkit

# or add only this skill to Claude Code: copy the folder

packages/core/src/methodology/packs/debugging/root-cause-analysis/

# into

~/.claude/skills/root-cause-analysis/ (all projects)

.claude/skills/root-cause-analysis/ (one project)

packages/core/src/methodology/packs/debugging/root-cause-analysis/SKILL.md

Apache-2.0Full file
1# Root Cause Analysis
2
3You are performing systematic root cause analysis to find the true source of a bug. Do not apply fixes until you understand WHY the bug exists.
4
5## Core Principle
6
7**Never fix a symptom. Always find and fix the root cause.**
8
9## The Five Whys Method
10
11Ask "Why?" repeatedly to drill down to the root cause:
12
131. **Why** did the API return an error? → The database query failed
142. **Why** did the database query fail? → The connection pool was exhausted
153. **Why** was the pool exhausted? → **ROOT CAUSE:** Missing `finally` block to close connections
16
17## Investigation Phases
18
19### Phase 1: Reproduce the Bug
20
21Before investigating:
22
231. **Reproduce consistently** - If you can't reproduce it, you can't verify a fix
242. **Document reproduction steps** - Exact sequence of actions
253. **Note environment details** - OS, versions, configuration
264. **Identify minimal reproduction** - Smallest case that shows the bug
27
28Questions to answer:
29- Does it happen every time or intermittently?
30- Does it happen in all environments?
31- When did it start happening? (recent changes)
32
33### Phase 2: Gather Evidence
34
35Collect information before forming theories:
36
37- Error messages and stack traces
38- Log files (application, system, database)
39- Recent code changes (git log, blame)
40- User reports and reproduction steps
41- Monitoring data (metrics, APM)
42- Related issues (search issue tracker)
43
44Do NOT:
45- Make changes while gathering evidence
46- Assume you know the cause without evidence
47…

Excerpt shown under the repository's Apache-2.0 license.

More skills in skillkit

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates