From britenites
Four-phase root cause analysis for bug investigation. Activates when debugging unexpected behavior, failing tests, or production issues — follows reproduce, isolate, analyze, fix with defense-in-depth. Uses condition-based waiting instead of arbitrary delays. Available anytime, not tied to the inner loop sequence.
npx claudepluginhub brite-nites/britenites-claude-pluginsThis skill uses the workspace's default tool permissions.
You are investigating a bug using a structured four-phase process. The goal is to find and fix the root cause, not just suppress the symptom.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
You are investigating a bug using a structured four-phase process. The goal is to find and fix the root cause, not just suppress the symptom.
Before anything else, reliably reproduce the problem.
## Reproduction
Steps: [exact steps]
Expected: [what should happen]
Actual: [what happens instead]
Frequency: [always / intermittent / specific conditions]
Environment: [OS, Node version, browser, etc.]
Narrow down where the bug lives.
git bisect start, git bisect bad, git bisect good [known-good-commit]console.log everywhere)assert statements at key points to catch violations## Isolation
Location: [file:line or module]
Narrowed from: [original scope] → [isolated location]
Method: [how you narrowed it down]
Understand why the bug exists, not just where.
After identifying the root cause, ask:
## Root Cause
Cause: [precise description]
Category: [logic / state / integration / environment / missing handling]
Why it wasn't caught: [gap in testing, types, or review]
Related risks: [other places with similar patterns]
Fix the root cause and prevent regression.
Beyond the immediate fix, consider:
If the bug involves timing or async behavior:
sleep 5, setTimeout(5000))sleep 2 && check_result, use i=0; while ! check_result && [ $i -lt 100 ]; do sleep 0.1; i=$((i+1)); done## Fix
Change: [what was changed and why]
Files: [list of modified files]
Test: [the regression test that was added]
Defense: [additional protective measures added]
Related fixes: [similar patterns fixed elsewhere, or "none"]
Present the full debugging report:
## Debugging Complete: [Brief title]
**Bug**: [one-line description]
**Root cause**: [one-line root cause]
**Fix**: [one-line fix description]
**Reproduction** → **Isolation** → **Analysis** → **Fix**
[Link to each section above]
**Regression test**: [test name and how to run it]
**Tests**: All passing
**Build**: Clean
**Compound learning**: [If this revealed a pattern, it should be captured via compound-learnings]
console.log — add targeted, informative logging