debugging
FreeNo executable scriptsNot checkedSystematic debugging protocol for finding and fixing bugs. Activates for "debug", "fix bug", "not working", "error", "broken", "issue", "fails", "crash"…
by abdullah1854★ 19 GitHub starsAbout this skill
Debugging Protocol (v2 -- Friction-Hardened)
Built from 169 real sessions. Addresses 38 "wrong approach" events, 30 "buggy code" events, 17 "misunderstood request" events. Every rule below exists because it was violated in production.
When This Skill Activates
- "Debug this", "fix this bug", "not working"
- Error messages, stack traces
- "Undefined", "null", "crash", "fails"
- Unexpected behavior
- Performance issues
- Database query returning wrong data
- "Who changed X?" / audit trail questions
STOP-THINK-ACT Protocol (MANDATORY -- Execute Before EVERY Action)
Origin: 38 sessions had "wrong approach" friction -- Claude jumped to the wrong tool, wrong file, or wrong strategy before understanding context. This protocol is non-negotiable.
STOP -- Before writing code, running commands, or choosing an approach:
| Check | Question | If Unclear |
|---|---|---|
| System | Which system/environment is this? Local app? Remote server? Database? | ASK the user. Never assume. |
| Output format | What format does the user want? SQL? Code fix? Plan document? Working code? | ASK if ambiguous. |
| Target file | Am I editing the right file? Local vs remote? Config vs code? Is there a secondary config file? | Verify path before editing. |
| Database | Which database connection? Which server? | Confirm before querying. |
| Branch/Env | Am I on the right branch? Right environment? | Check with git branch or ask. |
THINK -- Before stating conclusions:
| Check | Question | Violation Example |
|---|---|---|
| Evidence | Do I have concrete evidence? | Saying "User X broke this" without a git blame diff |
| Schema | Have I verified actual schemas via MCP? | Assuming a column TransactionDate exists when it's actually TRANSDATE |
| Scope | Am I about to explore when I should execute, or code when asked for a plan? | Spending 45 minutes reading files when user wants a one-line fix |
| Attribution | Am I about to blame someone/something without proof? | "This was probably caused by the last deployment" -- prove it |
ACT -- Only after confirming context and approach:
- Make the minimal change needed. Don't refactor surrounding code.
- Verify the change works before declaring done. Show proof.
- If something fails, diagnose root cause -- don't retry the same failing approach.
- If unsure, ask the user rather than guessing.
Anti-Hallucination Rules (NEVER violate)
| Rule | Description | Real Violation |
|---|---|---|
| CONFIRM ENVIRONMENT | ALWAYS confirm target system/environment FIRST. Ask: "Which system? Which environment?" Never assume which system or database | Connected to wrong database because system wasn't confirmed |
| EVIDENCE BEFORE CONCLUSIONS | NEVER state a root cause without showing concrete evidence (logs, data, diffs). Show findings FIRST, then interpretation | Claude attributed changes to wrong people without proof |
| SCHEMA FIRST | When debugging database issues, ALWAYS check actual table schemas before writing queries. Never assume column names | Claude assumed column names that didn't exist, wasted entire sessions |
| RIGHT FILE, RIGHT PATH | ALWAYS verify you're editing the correct file. Local vs remote? Config vs code? Check for secondary config files | Claude edited local file when user meant remote VPS config |
| NO PREMATURE FIXES | Don't fix without understanding. Gather evidence, form hypothesis, THEN fix. Never "try and see" without a hypothesis | Claude applied 5 different "fixes" without understanding the actual bug |
| STOP CONDITIONS | If your approach isn't working after 3 attempts, STOP and pivot. Don't retry the same failing approach | Claude retried the same broken query 7 times |
| RESPECT OUTPUT FORMAT | If user asks for SQL, give SQL. Never silently switch formats | Gave wrong output format when user explicitly asked for a specific one |
| NO UNPROVEN ATTRIBUTION | Never say "Person X caused this" or "This happened because of Y" without showing audit trail, git blame, or log evidence | Claude blamed a team member based on assumption, not data |
Multi-System Identification
When debugging involves multiple systems or databases, always confirm which system the user is referring to before querying. Never assume.
Identify the System First
User mentions a bug/issue
|
v
Does the user specify a system?
|
YES -+-> Use that system
|
NO --+-> Look for contextual clues in their message
|
+-- Database-related keywords? --> Confirm which database
+-- Server/infrastructure keywords? --> Confirm which server
+-- None of the above or ambiguous
--> ASK: "Which system should I investigate?"
Schema Verification (MANDATORY)
BEFORE wri
Install debugging in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
ReadGrepGlobBashLSPEditTaskSendMessageFAQ
What does the debugging skill do?
Systematic debugging protocol for finding and fixing bugs. Activates for "debug", "fix bug", "not working", "error", "broken", "issue", "fails", "crash", "undefined", "null" problems. Hardened against 169 sessions of real-world friction data.
How do I install the debugging skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the debugging skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic