From hive
Systematic debugging — prevents jumping to fixes without root cause analysis. Use when debugging errors, analyzing failures, or investigating unexpected behavior. Forces evidence-based investigation before any code changes.
npx claudepluginhub skywalking-dev/hiveThis skill uses the workspace's default tool permissions.
Evidence-first debugging. No code changes until root cause is confirmed.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Evidence-first debugging. No code changes until root cause is confirmed.
Core principle: Investigate first, code later. A wrong fix costs more than the original bug.
Before touching any code:
What changed last?
git log --oneline -20
git log --oneline --since="48 hours ago"
git diff HEAD~1 HEAD --stat
Check deployments, env var changes, dependency upgrades, config changes. Most bugs live here.
Cannot reproduce = cannot fix.
If you cannot reproduce: collect more data (logs, error traces, request IDs) before proceeding.
Narrow down when the bug was introduced.
# Find the commit that broke it
git bisect start
git bisect bad HEAD
git bisect good <last-known-good-sha>
# git will checkout commits — test each, mark good/bad
git bisect good # or: git bisect bad
git bisect reset # when done
If bisect is too slow, check the diff of the most suspect commit:
git show <commit-sha>
git diff <before>..<after> -- path/to/file
Gather evidence. Do not form conclusions before this is complete.
Key questions:
Techniques by layer:
| Layer | Tools |
|---|---|
| Application logs | Structured logs, correlation IDs, error traces |
| Network | Request/response inspection, status codes, latency |
| Database | Query logs, slow query analysis, migration history |
| Auth | Token state, session validity, RLS policies (Supabase) |
| External services | Status pages, API response payloads, rate limits |
| Frontend | Browser console, network tab, component state |
Before writing any fix:
"I believe the bug is caused by [X] because [evidence Y]. The fix is [Z]."
If you cannot complete this sentence with concrete evidence, go back to Step 4.
One hypothesis at a time. Never test two variables simultaneously.
Max 2 blind attempts. If the second fix does not work → Step 8 (Escalate).
Before merging:
Proof = test output, log showing correct behavior, or clear explanation of runtime behavior.
After 2 failed attempts, stop and escalate to Gonza with:
What I tried:
1. [attempt 1] — outcome
2. [attempt 2] — outcome
What I observed:
- [logs, errors, behavior]
What I still don't understand:
- [the gap in knowledge]
Do not push a third speculative fix. The 71h micelio outage (2026-03-30) was caused by 13 speculative fixes without root cause analysis.
When production breaks after a deploy:
git revert. Restore service first./api/health returns 200 (or equivalent health signal).Timeline target: service restored <15 min, root cause fix within 24h.
Never diagnose in production while the service is down.
After root cause is confirmed, classify the fix:
Is it a regression (worked before)?
├── Yes → Bug fix. Minimal change. Tests first.
└── No → Was it ever specified?
├── No → Potential feature. Shape a Linear issue.
└── Yes → Implementation gap. Improvement.
Escalate immediately if:
| Anti-pattern | Why it fails |
|---|---|
| Fixing without reproducing | You might be fixing the wrong thing |
| Multiple changes per attempt | Can't tell which change worked |
| Deleting and re-creating to "reset state" | Masks the root cause |
| Blaming infra before ruling out code | Wrong escalation path |
| Copy-pasting fixes from similar bugs | Context differs, cause differs |
| Pushing to production to test | Turns a bug into an outage |
At start:
During investigation:
Before fixing:
Bug reported
→ /investigate ← you are here
→ root cause found
→ /shape (if new issue needed)
→ fix branch
→ /push_it
→ /pr-review
→ /ship_it