skills/debug/SKILL.md
Systematic root-cause debugging for any bug — backend, frontend, logic, integration. Hypothesis-driven investigation with evidence collection. Use when the user says 'debug', 'investigate', 'why is this broken', 'root cause', 'trace this bug', 'figure out why', 'this doesn't work', or 'unexpected behavior'. For frontend-specific runtime debugging with a log server, use /debug-mode instead.
npx skillsauth add vltansky/skills debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find the root cause. Don't guess, don't patch symptoms.
Reproduce → Hypothesize → Investigate → Isolate → Fix → Verify → Prevent
For frontend/UI runtime debugging with browser log collection, use /debug-mode.
This skill handles everything else.
Before investigating, confirm the bug is real and reproducible.
Get the exact error. Read the full error output — stack trace, exit code, failing assertion, log output. Not a summary. The actual output.
Reproduce it.
# Run the exact command that fails
If it passes now, it's intermittent. Note that — intermittent bugs need different strategies (timing, state, concurrency).
Minimize the reproduction. Can you trigger it with a smaller input? A single test? A simpler scenario? The smaller the repro, the faster the investigation.
Generate 3-5 specific hypotheses. Each must be testable.
H1: The function receives null because the caller doesn't check the return value
Test: add assertion at function entry, run the failing case
H2: The config file is missing in CI but present locally
Test: check if the file exists in the CI environment / test context
H3: Race condition — async operation completes before the setup finishes
Test: add deterministic ordering or log timestamps at both points
Order hypotheses by likelihood. Start with the most probable.
Common root cause categories:
For each hypothesis (most likely first):
Use the right tool for the bug type:
Code path tracing:
# Find where the value comes from
# Search for the function, trace callers, check the data flow
Test isolation:
# Run just the failing test with verbose output
# e.g.: npx jest --verbose path/to/test
# e.g.: pytest -xvs path/to/test
State inspection:
Diff analysis (for "it used to work"):
# What changed recently?
git log --oneline -20 -- <affected-files>
git diff <last-known-good>..HEAD -- <affected-files>
Environment comparison:
# Compare local vs CI / vs other environment
node --version
cat .env # (don't log secrets)
ls -la <expected-file>
If all hypotheses are rejected or inconclusive:
Max 3 investigation rounds. If still stuck after 3 rounds, summarize what you know and what you've ruled out, and ask the user for additional context.
You've confirmed a hypothesis. Now isolate the root cause precisely:
Apply the fix using TDD discipline when possible:
If TDD isn't practical (environment bug, config issue, infra problem):
Prove the fix works:
# The specific failing command now passes
# The full test suite passes
# Build passes (if applicable)
If the bug was intermittent: run the reproduction multiple times.
After fixing, spend 60 seconds on prevention:
Do NOT:
After the investigation, summarize:
## Debug Report
### Bug
[One-line description]
### Root Cause
[What was actually wrong and why]
### Evidence
[The specific evidence that confirmed the root cause]
### Fix
[What was changed — files and lines]
### Prevention
[Test added? Pattern searched? Guard added?]
### Ruled Out
[Hypotheses that were rejected and why — saves time if the bug recurs]
tools
Prepare a Hetzner Cloud VPS for secure Codex remote SSH access. Use when the user wants to create or configure a Hetzner server for Codex remote control, fix "No codex found in PATH" on a remote machine, install agent development tooling on a VPS, harden SSH access to a Hetzner server, or connect the server through Codex Settings, Connections, Add SSH.
data-ai
Summarize your GitHub activity from the last 24 hours across all repos. Use when user says "what did I do", "my activity", "standup", "recap", "summarize my day", "what-i-did", "git activity", "daily summary".
development
Test-driven development loop. Write failing test first, then implement to make it pass. Use when the user says 'tdd', 'test first', 'write the test first', 'failing test', 'red green refactor', or for any bug fix where the fix should be proven by a test. Also use when autopilot or other skills need test-first execution.
development
Review changed code for reuse, quality, and efficiency, then fix any issues found. Use when the user says "simplify", "simplify this", "review changes", "clean up my code", "check for duplicates", "code reuse review", or wants a post-change quality sweep.