Débogage Systématique

VérifiéPrudence

Diagnostiquer les bugs de manière systématique avant de proposer des correctifs. À utiliser en cas de dysfonctionnement, d'échec, d'erreur ou de comportement inattendu. Ce skill guide à travers la reproduction, l'isolement, le test d'hypothèses et produit un diagnostic structuré avec preuves.

Spar Skills Guide Bot
DeveloppementIntermédiaire
9002/06/2026
Claude Code
#debug#diagnosis#bug-fixing#systematic#troubleshooting

Recommandé pour

Notre avis

Diagnostique systématiquement les bugs avant de proposer des correctifs, en suivant un processus en six étapes.

Points forts

  • Structure claire et reproductible pour le débogage.
  • Encourage la vérification des hypothèses avec des preuves.
  • Évite les correctifs prématurés grâce à une phase de diagnostic distincte.

Limites

  • Peut être trop rigide pour des bugs triviaux ou très simples.
  • Nécessite une compréhension préalable du contexte du projet.
Quand l'utiliser

Utilisez cette compétence lorsqu'un bug est signalé et que vous avez besoin d'une approche méthodique pour en trouver la cause racine.

Quand l'éviter

Ne l'utilisez pas lorsque le correctif est évident et immédiat, ou pour des tâches ne relevant pas du débogage.

Analyse de sécurité

Prudence
Score qualité90/100

The skill instructs using Bash to gather diagnostic evidence, which is legitimate for debugging, but the tool is powerful and could be exploited. No explicit destructive instructions, but caution is warranted.

Points d'attention
  • Bash tool is allowed, which can execute arbitrary commands; used for diagnostic purposes but could be risky if misused.

Exemples

Reproduce and diagnose a crash
The app crashes when I click 'Save'. Please debug this systematically.
Investigate a failed API call
Login endpoint returns 500 error. Diagnose the root cause.
Trace a data processing bug
The report generator produces incorrect totals. Debug the data flow.

name: debug version: 1.0.0 changelog: Initial debug skill with systematic diagnosis description: Diagnose bugs systematically before proposing fixes. Use when something is broken, failing, erroring, or not working as expected. allowed-tools: Read, Grep, Glob, Bash, Task temperature: 0.2 # Mostly systematic, slight exploration

Debug Phase

Diagnose systematically before proposing fixes.

Task

$ARGUMENTS

Instructions

Output: ## Debug Phase

State: At phase start, update STATE.md:

  • Set task: from $ARGUMENTS (if STATE.md is idle/complete or task is "None")
  • Set phase: debug
  • Set status: in_progress

1. Reproduce

  • Confirm the failure exists
  • Identify exact error message/behavior
  • Note environment conditions (versions, config, state)

2. Isolate

  • Narrow to smallest reproducible case
  • Identify which component fails
  • Trace information flow to failure point
  • Use targeted reads/greps, not broad exploration

3. Hypothesize

  • List possible causes (most likely first)
  • For each: what evidence would confirm/reject?
  • Consider: recent changes, dependencies, environment

4. Test Hypotheses

  • Gather evidence systematically
  • Update hypothesis ranking as evidence arrives
  • Stop when root cause is confirmed

5. Produce Diagnosis

Use the diagnosis template:

## Symptom
[What's failing — exact error or behavior]

## Root Cause
[Why it's failing — the actual problem]

## Evidence
- `file:line` — observation
- Command output — what it showed

## Fix Options
1. Option A: [approach] — tradeoffs
2. Option B: [approach] — tradeoffs

## Recommended
[Which option and why]

Context Budget

  • Target: complete diagnosis under 30% context
  • Use subagents for exploration if needed
  • Keep evidence concise — excerpts, not full files

6. Checkpoint

Update STATE.md incrementally:

  • Set phase: debug
  • Add root cause and fix decision to ## Decisions
  • Add investigated files to ## Key Files
  • Update ## Next Steps with recommended fix

Run /checkpoint if context is heavy or taking a break.

Constraints

  • Do not fix yet — diagnosis first
  • If fix is obvious (<5 lines, isolated), may proceed with approval
  • Otherwise, get approval before implementing
  • Don't guess — verify with evidence

Exit Criteria

Root cause identified with evidence. Fix approach clear and approved.

Gate: "Here's the diagnosis. Approve fix approach?"

Skills similaires