Synthèse automatique
Correction systématique de bugs en combinant l'exécution de code et l'analyse de la documentation pour identifier la cause racine des problèmes de bout en bout.
Points forts
- Approche structurée avec phases documentées
- Utilise des documents de spécification et d'architecture pour guider l'analyse
- Capable de gérer des problèmes multi-services (backend/frontend)
- Peut fonctionner en mode général même sans documentation
Limites
- Nécessite une documentation spécifique pour un diagnostic complet
- Non adapté aux échecs de tests unitaires (utiliser /test)
- Nécessite l'intervention de l'utilisateur pour certaines commandes ou fichiers
Utilisez ce skill pour corriger des bugs de bout en bout où les tests unitaires passent mais la fonctionnalité échoue, comme des désynchronisations backend-frontend ou des problèmes d'intégration.
Ne l'utilisez pas pour des échecs de tests unitaires simples ; préférez le skill /test pour cela.
Analyse de sécurité
PrudenceThe skill uses Shell to run start commands for BE/FE environments and execute tests, which is legitimate debugging but grants the AI power to run arbitrary commands based on user-provided config files, posing moderate risk if misused or if malicious configs are supplied.
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
Debug the issue where the UI doesn't update after saving settings. Here's the error: 'Failed to update state' in console.Fix bug causing API timeout when fetching a large list of users. The endpoint returns 504 after 30 seconds.Fix bug: Error 'Cannot read property 'x' of undefined' when clicking the submit button. Trace the flow between backend and frontend.id: debug name: debug description: | Systematic bug fixing with direct code execution. Cross-references error with design flow to find root cause. Triggers: debug, fix, bugfix user-invocable: true version: 2.0.0 triggers: ["debug", "fix", "bugfix", "error fix"] requires: ["arch"] platform: all recommended_model: opus allowed-tools: [Read, Write, StrReplace, Glob, Grep, LS, Shell]
Global Rules: Adheres to
rules/archflow-rules.md. Code Mapping#Rule: Always usemax(existing #) + 1for new rows. NEVER reuse deleted numbers.
Model: Try Sonnet first. For complex bugs (multi-file, flow analysis), use Opus.
Debug Workflow
Systematically fix bugs by combining direct code execution with documentation analysis.
Scope
Debug is for E2E issues, not unit test failures.
- Unit test failures -> use
/test - E2E issues (unit tests pass but functionality fails) -> use
/debug
Common E2E issues: BE-FE mismatch, API contract violations, integration timing, environment-specific bugs.
Tool Fallback
| Tool | Alternative | |------|-------------| | Read/Grep | Request file path from user -> ask for copy-paste | | AskQuestion | "Please select: 1) OptionA 2) OptionB 3) OptionC" format | | Shell | Ask user to run commands and paste output |
Document Structure
docs/{serviceName}/
├── spec.md # Input (expected behavior)
├── arch-be.md # Input (flow, Code Mapping)
├── arch-fe.md # Input (flow, Code Mapping)
└── trace.md # Output (this skill produces)
Execution Path Resolution
Read from arch documents (Tech Stack section):
| Field | Source | Example |
|-------|--------|---------|
| BE Path | arch-be.md -> Tech Stack -> BE Path | apps/auth-api |
| FE Path | arch-fe.md -> Tech Stack -> FE Path | apps/auth-web |
| Run Command (BE) | arch-be.md -> Tech Stack -> Run Command | uv run uvicorn main:app |
| Run Command (FE) | arch-fe.md -> Tech Stack -> Run Command | npm run dev |
Phase 0: Skill Entry
0-0. Model and Environment Guidance
Required Documents (
docs/{serviceName}/):
- spec.md (required), arch.md (required), trace.md (optional - created if absent)
0-1. Collect Document Input
{"title":"Start Bug Fix","questions":[{"id":"has_requirements","prompt":"Do you have a requirements document? (docs/{serviceName}/spec.md)","options":[{"id":"yes","label":"Yes - I will provide via @filepath"},{"id":"no","label":"No - I don't have it"}]},{"id":"has_design","prompt":"Do you have a design document? (docs/{serviceName}/arch.md)","options":[{"id":"yes","label":"Yes - I will provide via @filepath"},{"id":"no","label":"No - I don't have it"}]},{"id":"has_changelog","prompt":"Do you have a changelog? (docs/{serviceName}/trace.md)","options":[{"id":"yes","label":"Yes - I will provide via @filepath"},{"id":"no","label":"No - Will be created upon completion"}]}]}
Processing:
- Requirements or design
no-> General Debug (below) - Changelog
no-> Will create in Phase 3 - All
yes-> Request file paths -> Phase 1
General Debug (When documents unavailable)
WARNING: Proceeding without documentation. Bug fixing uses only error log and code analysis. Cannot verify expected behavior or trace design flow.
General Debug Flow:
- Analyze error message/stack trace
- Grep + Read related code
- Estimate cause -> Confirm with user
- Implement fix
- Specify separate location for changelog
0-2. Infer serviceName
From file path: docs/alert/spec.md -> serviceName = "alert" -> Output: docs/alert/trace.md
0-3. Verify Error Information
Collect: error message, stack trace, variable state (if available).
"Please describe the error situation. If you have an error message or stack trace, please share it."
Phase 1: Document Analysis
1-1. Load Documents
| Document | Extract | |----------|---------| | spec.md | Expected behavior, normal scenario | | arch.md | Flow (call order), Code Mapping | | trace.md | Recent changes (possible cause) |
1-2. Cross-reference Error Location with Design Flow
Error Location (stack trace)
-> Check Code Mapping (which method)
-> Check requirements (expected behavior)
-> Identify mismatch
1-3. Report Analysis Results
## Analysis Results
**Error Location**: {file}:{line} - {error message}
**Design Behavior**: {flow from design document}
**Expected Behavior**: {feature description from requirements}
**Recent Changes**: {possibly related recent changes}
**Estimated Cause**: {cause hypothesis}
**Items Requiring Verification**: {additional checks needed}
Confirm with user: "Is this analysis correct? If yes, I will proceed with the fix."
Phase 2: Bug Fix
2-1. Confirm Cause
Read code at error location, verify exact problem point, decide fix direction.
2-2. Implement Fix
Fix matching: requirements, design flow, existing code style.
2-3. E2E Verification (Direct Execution)
Step 1: Read execution config from arch documents (BE/FE Path, Run Commands).
Step 2: Start E2E environment (Shell):
cd {BE Path} && {BE Run Command} &
# Wait for server ready (health check)
cd {FE Path} && {FE Run Command} # or: npm run test:e2e
Step 3: Verify fix:
| Result | Action | |--------|--------| | Success (no errors) | Proceed to Phase 3 | | Same error | Re-analyze -> Return to 2-1 | | New error | Analyze new error -> Return to 2-1 |
Tight feedback loop: See error -> Fix -> Re-run -> Confirm fix immediately.
Phase 3: Call trace Skill (Required)
WARNING: Must call trace skill after analysis/fix completion.
3-1. Call trace Skill
After fix: "Calling trace skill to record this session's results." Or guide: "Analysis complete. Would you like to record this in the changelog?"
3-1.5. Prepare Code Mapping Changes for trace
- Read arch.md Code Mapping table (get current
#numbers) - Identify changes: modified rows (MODIFY), new rows (ADD, # = last+1), deleted rows (DELETE)
- Pass to trace in structured format:
### Code Mapping Changes
| # | Feature | File | Class | Method | Action | Change | Synced |
|---|---------|------|-------|--------|--------|--------|--------|
| 3 | Auth | auth/svc.py | AuthSvc | validate() | Add null check | MODIFY | [ ] |
| 6 | Auth | auth/svc.py | AuthSvc | refresh() | Token refresh | ADD | [ ] |
This structured format enables sync skill to directly apply changes to arch.md
3-2. Recording by Result Type
| Result Type | Content to Record | |-------------|-------------------| | Code fix completed | Symptom, cause, fix content, design impact | | External cause identified | Symptom, external cause, recommended action | | Investigation ongoing/failed | Symptom, investigation content, next steps |
3-3. If Not Called
User can manually call: "trace" or "write changelog". Same session context will be used.
Phase 4: Completion Report
## Bug Fix Complete
### Analysis/Fix Summary
| Item | Content |
|------|---------|
| Symptom | {original bug symptom} |
| Cause | {identified cause} |
| Result Type | Code fix / External cause / Under investigation |
| Modified Files | {file list or "none"} |
### Test Method (if fixed)
1. {Verify with reproduction scenario}
2. {How to verify normal behavior}
### Recurrence Prevention (Required Checklist)
- [ ] Add tests (if applicable)
- [ ] Add guard/validation logic (if applicable)
- [ ] Add logging/monitoring (if applicable)
**Recurrence Probability**: High / Medium / Low
WARNING: Have you recorded this in the changelog? Call "trace" or "write changelog". External causes and investigation failures are also worth recording.
Integration Flow
[spec] -> spec.md -> [arch] -> arch.md -> [build] -> Implementation
-> (Bug occurs) -> [debug] -> Analysis/fix
-> [trace] -> trace.md -> (design impact) -> [sync] -> arch.md
Important Notes
- Runtime Info Helps - Providing error messages and stack traces improves effectiveness
- Documentation Dependency - Docs must be accurate; if doc-impl mismatch, sync first
- Changelog Management - All bug fixes should be recorded in trace
- Complex Bugs - Multi-file bugs -> use Opus; if unresolved, repeat analysis -> confirmation -> re-analysis
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/systematic-debugging-with-direct-code-execution-mm78nnr7/download' --output '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7/SKILL.md.part' && mv '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7/SKILL.md.part' '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7/SKILL.md' && test -s '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/debug' && cp -R '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7' '.claude/skills/debug'Cursor
test -f '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7/SKILL.md' && test -s '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/debug' && cp -R '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7' '.cursor/skills/debug'Codex
test -f '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7/SKILL.md' && test -s '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/debug' && cp -R '.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7' '.agents/skills/debug'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7'openskills read 'systematic-debugging-with-direct-code-execution-mm78nnr7'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/systematic-debugging-with-direct-code-execution-mm78nnr7/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.