debug-loop — Claude Code skill: hypotheses, not guessing
debug-loop — a skill for step-by-step debugging of errors through real commands, not simulations. Forms hypotheses, validates them against live data, identifies root cause, and only then fixes the code.
MIT 117 installs ★ 533 updated 2026-10-25
npx skills add proffesor-for-testing/agentic-qe --skill debug-loop -a claude-codeWhat debug-loop does
debug-loop works in five phases. It first reproduces the bug by running the command that exposes it. Then it proposes a hypothesis about the cause and tests it with a real command: checking SQLite tables, dependency versions, or variable states. Each result either confirms the hypothesis or points to the next one. Only after identifying the root cause does the skill modify code—minimally, precisely.
After the fix, it runs the same command from phase one and verifies the output changed. Then it runs the full test suite to ensure nothing else broke. If tests fail, it fixes them before committing.
The skill refuses to guess or simulate: every output comes from an actual command run. If no root cause emerges after five hypotheses, it asks for your help rather than continuing blind.
What it helps with
- identify the root cause of failing tests
- trace logic when output doesn't match expectations
- find where a wrong value originates in code or database
- confirm a fix doesn't break other code paths
- distinguish the real problem from its symptoms
Example prompts for the agent
- Debug a falling test
npm test -- users.test.jsthat shows the wrong record count - The backend returns 404 instead of data even though the endpoint exists—find out why
- A database migration script hangs silently—figure out where it gets stuck
How to install debug-loop
1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill debug-loop -a claude-code2Manually: put the files in place
~/.claude/skills/debug-loop/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/debug-loop/
1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill debug-loop -a codex2Manually: put the files in place
.agents/skills/debug-loop/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill debug-loop -a cursor2Manually: put the files in place
.cursor/skills/debug-loop/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install proffesor-for-testing/agentic-qe assets/skills/debug-loop2Manually: put the files in place
.github/skills/debug-loop/SKILL.md1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill debug-loop -a gemini-cli2Platform CLI
gemini skills install https://github.com/proffesor-for-testing/agentic-qe --path assets/skills/debug-loopManually: put the files in place
.devin/skills/debug-loop/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill debug-loop -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about debug-loop
How do I install debug-loop in Claude Code?
Run npx skills add proffesor-for-testing/agentic-qe --skill debug-loop -a claude-code, then open ~/.claude/skills/debug-loop/SKILL.md. Other editors use different commands: for Cursor, npx skills add proffesor-for-testing/agentic-qe --skill debug-loop -a cursor; for GitHub Copilot, gh skill install proffesor-for-testing/agentic-qe debug-loop.
What does debug-loop do?
It debugs errors through real commands and hypothesis testing. It reproduces the bug, checks database tables, dependency versions, and variable values as they actually exist, not theoretically. It finds the root cause before touching the code.
What happens if debug-loop can't narrow down the cause after five attempts?
It stops and asks you for help—details on where it's stuck, logs, extra context. That way it doesn't waste iterations guessing.
Source text
SKILL.md · MIT
--- name: debug-loop description: "Use when debugging a failing test or runtime error with hypothesis-driven investigation, autonomous command validation, and systematic root cause elimination." trust_tier: 0 domain: debugging --- # Debug Loop Autonomous hypothesis-driven debugging against real data. No guessing, no simulating. ## Arguments - `<symptom>` — Description of the bug or unexpected behavior. If omitted, prompt the user. ## Phases ### Phase 1 — Reproduce Run the exact command that shows the bug. Capture and display the REAL output. Confirm the bug is visible. If the bug cannot be reproduced, stop and explain what was tried. ### Phase 2 — Hypothesize and Test (up to 5 iterations) For each iteration: 1. State a specific hypothesis (e.g., "the query targets v2 tables but data is in v3 tables") 2. Run a REAL command to test it (e.g., `sqlite3 [db path] '.tables'` then `SELECT COUNT(*) FROM [table]`) 3. Record whether the hypothesis was confirmed or rejected 4. If rejected, form the next hypothesis based on what you learned **Do NOT make code changes until you have a confirmed root cause.** Important checks: - Always check both v2 and v3 SQLite tables when data issues are suspected - Check dependency versions (e.g., sqlite3 vs better-sqlite3) - Check for hardcoded values that may have been missed ### Phase 3 — Fix Make the minimal targeted fix. Explain: - What the root cause was - What you're changing and why - What the blast radius is (which other code paths are affected) Before applying, grep for ALL instances of the problematic pattern across the entire codebase. ### Phase 4 — Verify Run the SAME reproduction command from Phase 1. The output must now show correct values. If it doesn't, go back to Phase 2. Show before/after output comparison. ### Phase 5 — Regression ```bash npm test ``` Run the full test suite. If tests fail, fix them before committing. ## Rules - NEVER guess or simulate output — always run real commands - NEVER make code changes before confirming root cause - Always check for the pattern across the entire codebase, not just one file - If blocked after 5 hypotheses, stop and ask the user for guidance
© proffesor-for-testing · MIT · proffesor-for-testing/agentic-qe