gstack-openclaw-investigate
Ce qu’il fait
Cette skill guide le débogage avec une règle : la cause doit être trouvée avant toute correction. Elle s'adresse aux développeurs confrontés à des erreurs, à des comportements inattendus ou à une fonctionnalité qui a cessé de marcher.
Quand l’utiliser
- ✓Quand vous demandez à votre agent de corriger un bogue ou d'enquêter sur une erreur.
- ✓Quand une trace d'exécution ou un comportement inattendu apparaît dans votre projet.
- ✓Quand quelqu'un signale qu'une fonctionnalité a cessé de marcher.
Lien du skill
https://github.com/garrytan/gstack/blob/main/openclaw/skills/gstack-openclaw-investigate/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Quelque chose a cessé de fonctionner après la mise à jour d'hier. Je veux que vous trouviez la cause racine avant que nous modifiions quoi que ce soit.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent rassemble les symptômes, suit le chemin du code, examine les modifications récentes et reproduit le bogue. Il énonce une hypothèse précise avant de tester et de corriger.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Systematic Debugging
Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.
Fixing symptoms creates whack-a-mole debugging. Every fix that doesn't address root cause makes the next bug harder to find. Find the root cause, then fix it.
Phase 1: Root Cause Investigation
Gather context before forming any hypothesis.
Collect symptoms: Read the error messages, stack traces, and reproduction steps. If the user hasn't provided enough context, ask ONE question at a time. Don't ask five questions at once.
Read the code: Trace the code path from the symptom back to potential causes. Search for all references, read the logic around the failure point.
Check recent changes:
git log --oneline -20 -- <affected-files>Was this working before? What changed? A regression means the root cause is in the diff.
Reproduce: Can you trigger the bug deterministically? If not, gather more evidence before proceeding.
Check memory for prior debugging sessions on the same area. Recurring bugs in the same files are an architectural smell.
Output: "Root cause hypothesis: ..." ... a specific, testable claim about what is wrong and why.
Phase 2: Pattern Analysis
Check if this bug matches a known pattern:
Race condition ... Intermittent, timing-dependent. Look at concurrent access to shared state.
Nil/null propagation ... NoMethodError, TypeError. Missing guards on optional values.
State corruption ... Inconsistent data, partial updates. Check transactions, callbacks, hooks.
Integration failure ... Timeout, unexpected response. External API calls, service boundaries.
Configuration drift ... Works locally, fails in staging/prod. Env vars, feature flags, DB state.
Stale cache ... Shows old data, fixes on cache clear. Redis, CDN, browser cache.
Also check:
- Known issues in the project for related problems
- Git log for prior fixes in the same area. Recurring bugs in the same files are an architectural smell, not a coincidence.
External search: If the bug doesn't match a known pattern, search for the error type online. Sanitize first: strip hostnames, IPs, file paths, SQL, customer data. Search the error category, not the raw message.
Phase 3: Hypothesis Testing
Before writing ANY fix, verify your hypothesis.
Confirm the hypothesis: Add a temporary log statement, assertion, or debug output at the suspected root cause. Run the reproduction. Does the evidence match?
If the hypothesis is wrong: Search for the error (sanitize sensitive data first). Return to Phase 1. Gather more evidence. Do not guess.
3-strike rule: If 3 hypotheses fail, STOP. Tell the user:
"3 hypotheses tested, none match. This may be an architectural issue rather than a simple bug."
Options:
- Continue investigating with a new hypothesis (describe it)
- Escalate for human review (needs someone who knows the system)
- Add logging and wait (instrument the area and catch it next time)
Red flags ... if you see any of these, slow down:
- "Quick fix for now" ... there is no "for now." Fix it right or escalate.
- Proposing a fix before tracing data flow ... you're guessing.
- Each fix reveals a new problem elsewhere ... wrong layer, not wrong code.
Phase 4: Implementation
Once root cause is confirmed:
Fix the root cause, not the symptom. The smallest change that eliminates the actual problem.
Minimal diff: Fewest files touched, fewest lines changed. Resist the urge to refactor adjacent code.
Write a regression test that:
- Fails without the fix (proves the test is meaningful)
- Passes with the fix (proves the fix works)
Run the full test suite. No regressions allowed.
If the fix touches >5 files: Flag the blast radius to the user before proceeding. That's large for a bug fix.
Phase 5: Verification & Report
Fresh verification: Reproduce the original bug scenario and confirm it's fixed. This is not optional.
Run the test suite.
Output a structured debug report:
DEBUG REPORT
- Symptom: what the user observed
- Root cause: what was actually wrong
- Fix: what was changed, with file references
- Evidence: test output, reproduction showing fix works
- Regression test: location of the new test
- Related: prior bugs in same area, architectural notes
- Status: DONE | DONE_WITH_CONCERNS | BLOCK
Questions fréquentes
Corrige-t-elle les symptômes rapidement ?
Non. Elle est conçue pour trouver d'abord la cause racine, afin d'éviter les corrections au coup par coup.
Vérifie-t-elle les modifications récentes ?
Oui. Elle examine l'historique récent des commits pour les fichiers concernés.
Pose-t-elle des questions ?
Oui, une à la fois, lorsqu'elle a besoin de plus de contexte.
Détails
Description originale de l’auteur
Use when asked to debug, fix a bug, investigate an error, or do root cause analysis, and when users report errors, stack traces, unexpected behavior, or say something stopped working.
repo: garrytan/gstack
Popularité
- Étoiles GitHub
- 139k
- Position au classement
- #713
- Licence
- MIT
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
autoplan
139kAide votre agent à relire un plan sous plusieurs angles en une seule passe : produit, design, ingénierie et expérience développeur.
benchmark
139kAide votre agent à détecter les régressions de performance web en mesurant la vitesse d'une page avant et après une modification.
browse
139kAide votre agent à ouvrir un vrai navigateur, parcourir un enchaînement de pages, prendre des captures d'écran et vérifier les erreurs de la console.
hackernews-frontpage
139kAide votre agent à récupérer la page d'accueil de Hacker News : rang, titre, lien, points et nombre de commentaires de chaque article.
Skills similaires
diffs
394kPermet à votre agent de produire un diff réel et partageable de vos modifications, sous forme de lien ou d'image, plutôt qu'un résumé écrit à la main.
coding-agent
394kAide votre agent à confier une tâche de programmation plus importante à Codex, Claude Code ou OpenCode comme travailleur en arrière-plan, puis à suivre sa progression.
gh-issues
394kAide votre agent à trouver des tickets GitHub, choisir ceux à traiter et ouvrir des pull requests avec des correctifs, y compris le suivi des commentaires de relecture.