← ClaudeAtlas

debugging-testinglisted

Use when the user reports a bug they can't reproduce, asks where to start debugging, or mentions a Heisenbug / production-only failure. Drives the observe→hypothesize→predict→test→iterate scientific method.
Tibsfox/gsd-skill-creator · ★ 61 · Testing & QA · score 80
Install: claude install-skill Tibsfox/gsd-skill-creator
# Debugging & Testing A program without tests is a hypothesis. A program with bugs and no debugging strategy is a mystery. This skill catalogs systematic approaches to both: finding defects (debugging) and preventing them (testing). The emphasis is on method over intuition -- debugging and testing are engineering disciplines with established techniques, not arts that depend on talent. **Agent affinity:** hopper (coined "debugging" when she found a moth in the Mark II), dijkstra (program correctness as a mathematical property) **Concept IDs:** code-debugging-strategies, code-iterative-development, code-peer-review ## Part 1 -- The Debugging Mindset ### Debugging as Scientific Method A bug is a hypothesis falsifier: your mental model of the program says X should happen, but Y happens instead. Debugging is the process of updating your mental model until it matches reality. 1. **Observe** the symptom. What actually happened? What did you expect? 2. **Hypothesize.** What could cause the discrepancy? List at least three candidates. 3. **Predict.** If hypothesis H is true, what would happen if I do experiment E? 4. **Test.** Perform the experiment. Does the result match the prediction? 5. **Iterate.** If the prediction was wrong, the hypothesis is eliminated. Try the next one. This is the scientific method applied to code. The most common debugging mistake is skipping step 2 -- changing things at random hoping the bug disappears. Random changes do not build understanding. Th