debug-root-cause
/debug-root-cause
Systematically find and fix the root cause of bugs, errors, failing tests, and crashes in JavaScript/TypeScript and Python. Use whenever the user pastes an error or stack trace, says something is broken, "not working", "error", "kenapa gagal", "bug", a test fails, or behavior is unexpected — instead of guessing at a fix.
- Author
- KILN-skills ↗
- Repository
- kiln ↗
- Licence
- MIT
- Last repository change
- 09.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 09.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Systematically find and fix the root cause of bugs, errors, failing tests, and crashes in JavaScript/TypeScript and Python. Use whenever the user pastes an error or stack trace, says something is broken, "not working", "error", "kenapa gagal", "bug", a test fails, or behavior is unexpected — instead of guessing at a fix.
Triggers from the description
Original author description
Systematically find and fix the root cause of bugs, errors, failing tests, and crashes in JavaScript/TypeScript and Python. Use whenever the user pastes an error or stack trace, says something is broken, "not working", "error", "kenapa gagal", "bug", a test fails, or behavior is unexpected — instead of guessing at a fix.
How it works
- 1. Reproduce
- 2. Read the error properly
- 3. Hypothesize, then prove
- 4. Fix at the root
- 5. Prevent regression
- 6. Report
SKILL.md preview
--- name: debug-root-cause description: Systematically find and fix the root cause of bugs, errors, failing tests, and crashes in JavaScript/TypeScript and Python. Use whenever the user pastes an error or stack trace, says something is broken, "not working", "error", "kenapa gagal", "bug", a test fails, or behavior is unexpected — instead of guessing at a fix. --- # Debug: Root Cause First The most common debugging failure is patching the symptom. This skill forces a reproduce → hypothesize → prove → fix loop. ## 1. Reproduce - Get the exact failing command (test, script, request). Run it yourself and capture the full output. - If it doesn't reproduce, stop and gather info: environment, versions (`node -v`, `python --version`, lockfile), input data, env vars. Don't fix what you can't see. - Make the reproduction as small and fast as possible (a single test, `pytest path::test_name -x`, `npx vitest run file -t "name"`). ## 2. Read the error properly - Read the **whole** stack trace. The first frame in *the user's own code* (not `node_modules` / `site-packages`) is usually where to look. - Read the actual code at those lines, plus callers. - Common decoders: - `Cannot read properties of undefined (reading 'x')` / `AttributeError: 'NoneType'` → something upstream returned nothing; find where the value came from. - `ERR_MODULE_NOT_FOUND`, `ModuleNotFoundError` → path, ESM/CJS mismatch, virtualenv not active, missing dependency. - `UnhandledPromiseRejection`, `RuntimeWarning: coroutine was never awaited` → missing `await`. - Works locally, fails in CI → env vars, timezone, file ordering, node/python version, test isolation. - Flaky → shared state between tests, time, randomness, network, race conditions. ## 3. Hypothesize, then prove Write down 1–3 hypotheses ranked by likelihood. For each, pick the cheapest experiment that would confirm or kill it: - Add a targeted log/print of the suspicious value (remove it after). - Write a failing test that pins the bug. - `git bisect` if it "used to work": `git bisect start; git bisect bad; git bisect good <sha>` then run the repro at each step. - Check what changed recently: `git log -p --since="3 days ago" -- <file>`. Only move to a fix when one hypothesis is **proven**. If all are killed, go back to step 2 with the new evidence. ## 4. Fix at the root - Fix where the bad value/state is *created*, not where it *explodes*. - Avoid symptom patches: blanket `try/except`, `?.` everywhere, `# type: ignore`, raising timeouts, `retry` on deterministic failures. If a guard really is the right answer, explain why. - Keep the fix minimal; refactors go in a separate step. ## 5. Prevent regression - Add (or keep) the test that failed before the fix and passes after. - Run the related test suite, not just the single test. - Search for the same pattern elsewhere: `grep -rn "<pattern>" src/` — same bug often lives in sibling code. ## 6. Report ``` **Root cause:** <1–2 sentences, name file:line> **Evidence:** <what proves it — output, a test> **Fix:** <what changed and why there> **Prevention:** <test added / similar patterns found> ``` Write the report in the user's language (for example, Indonesian if they wrote in Indonesian); translate the headings too.
Versions
The database has no other skills named debug-root-cause.
Database snapshot: 13.11.2026 · package version a5c684ed7f9b (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100debug-detective
Find the root cause of a bug, crash, error message or failing test, then fix it. Use when the user says "this is broken", "why does this fail", "I get this error", "the test is failing", "it worked yesterday", or pastes a stack trace. - 100systematic-debugging
Debug a bug, test failure, crash, or unexpected behaviour by finding the root cause before changing anything, instead of guessing at fixes. Works in any language or stack. Use when something is broken, a test is failing, behaviour is wrong, or a previous fix didn't hold. - 90Debug
Track a bug to its root cause with a reproducible loop instead of guessing. Use for failing tests, crashes, broken UI, or flaky behavior. - 92debug
Find the root cause of a bug before you fix it. Read this skill before you fix any bug. Read it also when the fix looks obvious. Use it when the user says "fix", "broken", "not working", "error", "failing", or "bug". Use it also when a test fails unexpectedly during other work. - 100systematic-debugging
Use when encountering any bug, error, crash, failing or flaky test, build failure, unexpected behavior, or production incident, before proposing any fix — finds the root cause through evidence (reproduce, trace, compare, hypothesize, test one change at a time) instead of… - 100systematic-debugging
Use when something is broken — an error message, stack trace, failing test, crash, wrong output, "it doesn't work", build failure, or unexpected behavior. Finds the root cause with evidence before changing code, then saves the fix to memory.