bundled-skills/phase-gated-debugging/SKILL.md
Use when debugging any bug. Enforces a 5-phase protocol where code edits are blocked until root cause is confirmed. Prevents premature fix attempts.
npx skillsauth add FrancoStino/opencode-skills-antigravity phase-gated-debuggingInstall 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.
AI coding agents see an error and immediately edit code. They guess at fixes, get it wrong, and spiral. This skill enforces a strict 5-phase protocol where you CANNOT edit source code until the root cause is identified and confirmed.
Based on claude-debug (full plugin with PreToolUse hook enforcement).
Use this skill when:
Run the failing command/test. Capture the exact error. Run 2-3 times for consistency.
Read code. Add diagnostic logging marked // DEBUG. Re-run with diagnostics. Binary search to narrow down.
// DEBUG marked logging is allowedAnalyze WHY at the isolated location. Use "5 Whys" technique. Remove debug logging.
State: "This is my root cause analysis: [explanation]. Do you agree, or should I investigate further?"
WAIT for user confirmation. Do NOT proceed without it.
Remove all // DEBUG lines. Apply minimal change addressing confirmed root cause.
Run original failing test — must pass. Run related tests. For intermittent bugs, run 5+ times. If verification fails: root cause was wrong, go back to Phase 2.
| Type | Technique |
|------|-----------|
| Crash/Panic | Stack trace backward — trace the bad value to its source |
| Wrong Output | Binary search — log midpoint, halve search space each iteration |
| Intermittent | Compare passing vs failing run logs — find ordering divergence |
| Regression | git bisect — find the offending commit |
| Performance | Timing at stage boundaries — find the bottleneck |
// DEBUG in phase 2)development
Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.
development
Passive income portfolio analysis — activate when user asks about dividend yields, Treasury rates, REIT income, monthly passive income goals, or portfolio yield optimization. Scans 4 asset classes, ranks by risk-adjusted return, and builds allocations targeting a specific monthly income.
devops
End-to-end production QA, build verification, and launch-readiness checklist for fullstack Next.js apps. Covers TypeScript, linting, tests, build, SEO tags, route regression, and sitemap validation.
development
Safe production cleanup and hardening for vibe-coded fullstack apps (Next.js, React, Node.js, etc.). Removes dead imports, unused files, and broken references without breaking routes or APIs.