{"id":"84842d85-34f2-4399-a347-f39e285a3e1c","shortId":"nZx6Ys","kind":"skill","title":"phase-gated-debugging","tagline":"Use when debugging any bug. Enforces a 5-phase protocol where code edits are blocked until root cause is confirmed. Prevents premature fix attempts.","description":"# Phase-Gated Debugging\n\n## Overview\n\nAI 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.\n\nBased on [claude-debug](https://github.com/krabat-l/claude-debug) (full plugin with PreToolUse hook enforcement).\n\n## When to Use\nUse this skill when:\n\n- a bug keeps getting \"fixed\" without resolving the underlying issue\n- you need to slow an agent down and force disciplined debugging before code edits\n- the failure is intermittent, a regression, performance-related, or otherwise hard to isolate\n- you want an explicit user confirmation checkpoint before any fix is applied\n\n## The Protocol\n\n### Phase 1: REPRODUCE\nRun the failing command/test. Capture the exact error. Run 2-3 times for consistency.\n- Do NOT read source code\n- Do NOT hypothesize\n- Do NOT edit any files\n\n### Phase 2: ISOLATE\nRead code. Add diagnostic logging marked `// DEBUG`. Re-run with diagnostics. Binary search to narrow down.\n- Only `// DEBUG` marked logging is allowed\n- Do NOT fix the bug even if you see it\n\n### Phase 3: ROOT CAUSE\nAnalyze WHY at the isolated location. Use \"5 Whys\" technique. Remove debug logging.\n\nState: \"This is my root cause analysis: [explanation]. Do you agree, or should I investigate further?\"\n\n**WAIT for user confirmation. Do NOT proceed without it.**\n\n### Phase 4: FIX\nRemove all `// DEBUG` lines. Apply minimal change addressing confirmed root cause.\n- Only edit files related to root cause\n- Do NOT refactor unrelated code\n\n### Phase 5: VERIFY\nRun original failing test — must pass. Run related tests. For intermittent bugs, run 5+ times.\nIf verification fails: root cause was wrong, go back to Phase 2.\n\n## Bug-Type Strategies\n\n| Type | Technique |\n|------|-----------|\n| Crash/Panic | Stack trace backward — trace the bad value to its source |\n| Wrong Output | Binary search — log midpoint, halve search space each iteration |\n| Intermittent | Compare passing vs failing run logs — find ordering divergence |\n| Regression | `git bisect` — find the offending commit |\n| Performance | Timing at stage boundaries — find the bottleneck |\n\n## Key Rules\n\n1. NEVER edit source code in phases 1-3 (except `// DEBUG` in phase 2)\n2. NEVER proceed past phase 3 without user confirmation\n3. ALWAYS reproduce before investigating\n4. ALWAYS verify after fixing\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["phase","gated","debugging","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding"],"capabilities":["skill","source-sickn33","skill-phase-gated-debugging","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/phase-gated-debugging","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34616 github stars · SKILL.md body (2,753 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-23T00:51:23.432Z","embedding":null,"createdAt":"2026-04-18T21:42:21.996Z","updatedAt":"2026-04-23T00:51:23.432Z","lastSeenAt":"2026-04-23T00:51:23.432Z","tsv":"'-3':161,375 '/krabat-l/claude-debug)':82 '1':149,367,374 '2':160,179,311,380,381 '3':215,386,390 '4':257,395 '5':12,58,225,283,298 'add':183 'address':266 'agent':36,111 'agre':241 'ai':34 'allow':203 'alway':391,396 'analysi':237 'analyz':218 'appli':145,263 'ask':433 'attempt':28 'back':308 'backward':321 'bad':324 'base':75 'binari':193,331 'bisect':352 'block':19 'bottleneck':364 'boundari':361,441 'bug':9,97,208,296,313 'bug-typ':312 'cannot':63 'captur':155 'caus':22,70,217,236,269,276,304 'chang':265 'checkpoint':140 'clarif':435 'claud':78 'claude-debug':77 'clear':408 'code':16,35,43,66,118,169,182,281,371 'command/test':154 'commit':356 'compar':341 'confirm':24,74,139,250,267,389 'consist':164 'crash/panic':318 'criteria':444 'debug':4,7,32,79,116,187,199,229,261,377 'describ':412 'diagnost':184,192 'disciplin':115 'diverg':349 'edit':17,42,64,119,175,271,369 'enforc':10,55,88 'environ':424 'environment-specif':423 'error':39,158 'even':209 'exact':157 'except':376 'expert':429 'explan':238 'explicit':137 'fail':153,287,302,344 'failur':121 'file':177,272 'find':347,353,362 'fix':27,47,100,143,206,258,399 'forc':114 'full':83 'gate':3,31 'get':48,99 'git':351 'github.com':81 'github.com/krabat-l/claude-debug)':80 'go':307 'guess':45 'halv':335 'hard':131 'hook':87 'hypothes':172 'identifi':72 'immedi':41 'input':438 'intermitt':123,295,340 'investig':245,394 'isol':133,180,222 'issu':105 'iter':339 'keep':98 'key':365 'limit':400 'line':262 'locat':223 'log':185,201,230,333,346 'mark':186,200 'match':409 'midpoint':334 'minim':264 'miss':446 'must':289 'narrow':196 'need':107 'never':368,382 'offend':355 'order':348 'origin':286 'otherwis':130 'output':330,418 'overview':33 'pass':290,342 'past':384 'perform':127,357 'performance-rel':126 'permiss':439 'phase':2,13,30,59,148,178,214,256,282,310,373,379,385 'phase-g':29 'phase-gated-debug':1 'plugin':84 'prematur':26 'pretoolus':86 'prevent':25 'proceed':253,383 'protocol':14,60,147 're':189 're-run':188 'read':167,181 'refactor':279 'regress':125,350 'relat':128,273,292 'remov':228,259 'reproduc':150,392 'requir':437 'resolv':102 'review':430 'root':21,69,216,235,268,275,303 'rule':366 'run':151,159,190,285,291,297,345 'safeti':440 'scope':411 'search':194,332,336 'see':37,212 'skill':54,94,403 'skill-phase-gated-debugging' 'slow':109 'sourc':65,168,328,370 'source-sickn33' 'space':337 'specif':425 'spiral':52 'stack':319 'stage':360 'state':231 'stop':431 'strategi':315 'strict':57 'substitut':421 'success':443 'task':407 'techniqu':227,317 'test':288,293,427 'time':162,299,358 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'trace':320,322 'treat':416 'type':314,316 'under':104 'unrel':280 'use':5,91,92,224,401 'user':138,249,388 'valid':426 'valu':325 'verif':301 'verifi':284,397 'vs':343 'wait':247 'want':135 'whys':226 'without':101,254,387 'wrong':50,306,329","prices":[{"id":"19ac6e5a-e9ba-4035-94f5-2a574131aedb","listingId":"84842d85-34f2-4399-a347-f39e285a3e1c","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:42:21.996Z"}],"sources":[{"listingId":"84842d85-34f2-4399-a347-f39e285a3e1c","source":"github","sourceId":"sickn33/antigravity-awesome-skills/phase-gated-debugging","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/phase-gated-debugging","isPrimary":false,"firstSeenAt":"2026-04-18T21:42:21.996Z","lastSeenAt":"2026-04-23T00:51:23.432Z"}],"details":{"listingId":"84842d85-34f2-4399-a347-f39e285a3e1c","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"phase-gated-debugging","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34616,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-22T06:40:00Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"df87cdc0ff6c9818a58c2265cc00404e22216983","skill_md_path":"skills/phase-gated-debugging/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/phase-gated-debugging"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"phase-gated-debugging","description":"Use when debugging any bug. Enforces a 5-phase protocol where code edits are blocked until root cause is confirmed. Prevents premature fix attempts."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/phase-gated-debugging"},"updatedAt":"2026-04-23T00:51:23.432Z"}}