Hypothesis-Driven Debugging
Enforces a structured, scientific approach to troubleshooting errors instead of making random code modifications.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- Hypothesis-Driven Debugging
- description
- Enforces a structured, scientific approach to troubleshooting errors instead of making random code modifications.
03 SKILL.md 正文
Hypothesis-Driven Debugging Instructions
When a script or application fails with an error, DO NOT immediately modify the source code to attempt a random fix.
Instead, execute the following workflow:
1. State the Hypothesis
Analyze the stack trace or error log. Formulate a specific hypothesis about why it failed.
Write your hypothesis into a temporary file using run_command (e.g., echo "Hypothesis: The database connection times out because the async event loop is blocked" > debug_log.txt).
2. Write a Verification Test
Write a small, isolated script or unit test that specifically attempts to trigger the bug described in your hypothesis. Run the test. If it does not reproduce the error, your hypothesis is wrong. Go back to Step 1.
3. Implement the Fix
Once your isolated test successfully reproduces the bug, implement a fix in the main codebase.
4. Verify
Run the exact same isolated test again. It should now pass. Only then can you declare the bug fixed.
04 同仓库更多 Skills
Web Scraper
Scrape text content from URLs without launching a slow GUI browser.
TDD (Test-Driven Development) Workflow
Enforces a strict Test-Driven Development workflow for new features and bug fixes.
Strict Output Formatting
Enforces strict JSON schemas for any data the agent outputs to ensure reliability across systems.
Session Continuity
Maintains state across multiple agent commands to handle complex, multi-step logins or navigate paginated dashboards.
Plan-Before-Code
A workflow that forces the agent to output a structured implementation plan and identify edge cases before writing any production code.
macOS System Admin
Expert commands and workflows for controlling macOS hardware and system settings via CLI.