anotherben/claude-enterprise-skills/enterprise-debug
Claude Code and agent skill by anotherben/claude-enterprise-skills
- community
Checking that the SKILL.md file is still in the repository.
4-phase systematic debugging: investigate, blast radius scan, root cause identification, TDD fix. Finds root causes not symptoms. Blast radius scan catches sibling bugs. 3-fail circuit breaker prevents fix-forward loops. Use for any bug, test failure, or unexpected behavior.
Install
npx vskill@latest install anotherben/claude-enterprise-skills/enterprise-debugSKILL.md
The same SKILL.md was published earlier as anotherben/claude-enterprise-skills/enterprise-debug.
Enterprise Debug — 4-Phase Systematic Debugging
Philosophy
Bugs are never unique. If it is a bug here, it is a bug elsewhere. The blast radius scan is what separates enterprise debugging from guessing.
Three rules:
- Find the root cause, not the symptom. A symptom fix creates two future bugs.
- Scan the blast radius. The same class of bug exists in sibling functions, sibling files, and validation code.
- Prove the fix with TDD. A fix without a failing test is a guess.
STACK RESOLUTION
Read .claude/enterprise-state/stack-profile.json at skill start. Extract:
$TEST_CMD=commands.test_all$TEST_SINGLE=commands.test_single$SOURCE_DIR=structure.source_dirs.backend$TENANT_FIELD=multi_tenancy.field$FILE_EXTENSIONS=conventions.file_extensions
If no profile exists: BLOCKED — run /enterprise-discover first.
Phase 1: INVESTIGATE (5-15 minutes)
Goal: reproduce the bug, trace the execution path, form a hypothesis.
Step 1: Reproduce
Get the exact error. Not a description of the error — the actual error.
If you cannot reproduce, you cannot fix. Spend time here.
For test failures: run the failing test and paste the full output.
For runtime errors: find the error in logs or reproduce via API call.
For "wrong data" reports: query the database directly to confirm the data is wrong (not just the display).
Step 2: Trace the Execution Path
Follow the data end-to-end. Every layer. No shortcuts.
Read every file in the trace. Do not skip layers. The bug is often NOT where you think it is.
Step 3: Form a Hypothesis
Run the verification. If the hypothesis is wrong, form a new one. Do not proceed to Phase 2 until the hypothesis is verified.
Step 4: Find Working Examples
Search for similar code that works correctly. This reveals what the buggy code is missing.
Compare the working version with the broken version. The difference is often the fix.
Phase 2: BLAST RADIUS SCAN (5-10 minutes)
This phase is MANDATORY. Do not skip it. Do not abbreviate it. The blast radius scan is the single highest-value activity in debugging.
2a: Same-File Siblings
If the buggy function belongs to a group of similar functions in the same file, check EVERY sibling.
Example: If searchSuppliers() is missing a WHERE is_active = true filter, check searchOrders(), searchProducts(), searchCustomers() — every search function in the same file.
2b: Cross-File Siblings
Search the ENTIRE module/service directory for functions doing the same logical operation.
2c: Validation and Consumer Functions
Find every function that consumes or validates the same data.
2d: Edge Cases
For each bug, systematically check boundary conditions:
Blast Radius Summary
Phase 3: ROOT CAUSE (2-5 minutes)
Identify the Single Root Cause
The root cause is ONE thing. Not "multiple issues" — one thing that, when fixed, resolves all manifestations.
Verify the Root Cause
Ask: "If I fix ONLY this one thing, does every manifestation resolve?"
- YES: proceed to Phase 4.
- NO: you found a symptom, not the root cause. Go deeper.
The Circuit Breaker (NON-NEGOTIABLE)
Track your fix attempts — persisted in JSON so the count survives context compression:
If 3 fix attempts fail: STOP. Do not try fix #4. Instead:
- Question the architecture. The bug may be a design problem, not a code problem.
- Widen the investigation. You may be looking at the wrong layer entirely.
- Ask for help. Describe what you've tried and why each attempt failed.
- Consider rewriting. If the code is unmaintainable, a targeted rewrite may be cheaper than a 4th patch.
The circuit breaker exists because fix-forward loops are the most expensive failure mode in debugging. Each failed attempt adds complexity, introduces regression risk, and burns context. Three attempts is the limit.
Phase 4: FIX — TDD (5-20 minutes)
Every bug fix follows the TDD sequence. No exceptions.
Step 1: Write the Reproduction Test
Write a test that proves the bug exists by asserting the WRONG behavior.
Step 2: Run the Test — Watch it PASS
The test MUST pass. This proves the bug is real and the test catches it.
Step 3: Invert the Assertion
Change the test to assert the CORRECT behavior.
Step 4: Run the Test — Watch it FAIL
The test MUST fail. This proves the test will catch regressions.
Step 5: Write the Fix
Fix the root cause identified in Phase 3.
Step 6: Run the Test — Watch it PASS
The test MUST pass. The bug is fixed.
Step 7: Blast Radius Postconditions
Every finding from Phase 2 becomes a test:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/enterprise-debug/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/anotherben/claude-enterprise-skills/enterprise-debug)