From quiver
Systematic hypothesis-first debugging — collects symptoms, generates and tests hypotheses with conditional agent dispatch, falls back to adaptive exploration, then proposes reviewed fixes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/quiver:hypothesis-debugging <bug description, error message, or 'help me debug X'>When to use
user wants to debug an error, bug, or failure -- '/hypothesis-debugging', 'debug this', 'fix this bug', 'why is this failing', 'help me debug', 'investigate this error'
<bug description, error message, or 'help me debug X'>The summary Claude sees in its skill listing — used to decide when to auto-load this skill
```
!`git rev-parse --is-inside-work-tree 2>/dev/null || echo "NO_GIT"`
!`git branch --show-current 2>/dev/null || echo "NO_GIT"`
!`git log --oneline -20 2>/dev/null || echo "NO_GIT"`
Hypothesis-first debugging orchestrator. Investigates bugs systematically -- generating hypotheses, testing them against the codebase, and proposing reviewed fixes.
You are a senior debugging partner. You investigate bugs systematically -- generating hypotheses, testing them against the codebase, and proposing reviewed fixes. You think like a developer: hypothesize first, explore when hypotheses fail, and always verify before concluding.
If any gather-context block above returned NO_GIT, this directory is not a git repository.
Print: > No git repository detected -- skipping git-dependent features (regression analysis, recent changes scan).
Proceed to Step 0.5. Git-dependent features (regression-finder agent, recent changes scan) are skipped.
If the argument is empty and the conversation has no prior bug context:
Usage:
/hypothesis-debugging <bug description, error message, or 'help me debug X'>Provide an error message, log snippet, bug description, or just describe what's going wrong.
Stop here.
If the argument is present: use it as the initial bug description and proceed to Step 0.7.
Run once before any codebase searching. Cache results for the session.
.codegraph/ directory exists at project root. If yes: codegraph_available=true. If no: codegraph_available=false. No user prompt.skills/code-navigation/SKILL.md. Cache as lsp_available=true|false.These flags govern all codebase navigation in this skill -- both your own searches (Steps 1, 3, 4) and dispatched agent prompts (Step 3c).
When codegraph_available: true: call ToolSearch with query "select:mcp__codegraph__codegraph_search,mcp__codegraph__codegraph_context,mcp__codegraph__codegraph_callers,mcp__codegraph__codegraph_callees,mcp__codegraph__codegraph_impact,mcp__codegraph__codegraph_node" to load schemas. Then use codegraph_search for symbol lookups, codegraph_context for task-relevant files, codegraph_callers/codegraph_callees for call chains. Fall through to LSP then grep if codegraph returns insufficient results. For file discovery and pattern matching: always use Grep/Glob regardless.
When codegraph_available: false and lsp_available: true: use LSP goToDefinition/findReferences/documentSymbol first, grep as fallback.
When both unavailable: use Grep, Glob, and Read.
Gather all available context about the bug:
Parse user input. Extract: error messages, file paths, function names, stack trace fragments, log snippets, and behavioral descriptions. If the input contains error messages, stack traces, or log snippets, extract them verbatim as raw_error_output (preserve formatting). If no structured error output is present, note raw_error_output: none.
Search the codebase using the navigation tier from Step 0.7. Based on extracted keywords:
codegraph_available: use codegraph_search for function/class names, codegraph_context with the bug description to find task-relevant files. Fall back to grep for error strings and text patterns.Recent changes (git only). If git is available:
git diff HEAD~5 --name-onlySummarize. Present findings to the user in 3-5 sentences: what was found in the codebase related to the issue, which files are involved, and what the initial observations suggest. Do NOT show raw grep output or file listings.
Based on symptoms from Step 1, generate 2-4 ranked hypotheses. Each hypothesis:
Present hypotheses to the user as a brief summary. This is NOT a blocking gate -- share thinking and move forward. The user can redirect ("skip hypothesis 2, I already checked that") or let the skill proceed.
Use AskUserQuestion ONLY if the skill genuinely needs critical input to proceed (e.g., "I found 3 possible entry points for this error -- which one are you seeing?"). Otherwise, proceed directly to testing.
Test each hypothesis in order (highest likelihood first).
For each hypothesis, identify what investigation is needed: file reads, call chain tracing, log parsing, git history analysis, config inspection, or direct code inspection.
Evaluate for each hypothesis:
Is the hypothesis about multi-file control flow or a call chain?
YES -> dispatch code-tracer agent
NO -> continue
Did the user provide log output, stack traces, or error dumps?
YES -> dispatch log-analyzer agent
NO -> continue
Is this a regression ("used to work") or does hypothesis point to a recent change?
YES, and git available -> dispatch regression-finder agent
NO -> continue
Does hypothesis involve dependencies, config, or environment setup?
YES -> dispatch environment-checker agent
NO -> continue
None of the above?
-> Handle directly using the navigation tier from Step 0.7
(codegraph_search/codegraph_context when available, then LSP, then grep/Read)
Dispatch qualifying agents in parallel (multiple Agent tool calls in a single response). Each agent prompt must be self-contained and include:
codegraph_available and lsp_available flags from Step 0.7Pass both flags to each dispatched agent. Agents that search the codebase (code-tracer, regression-finder, environment-checker) carry the Code Navigation Strategy block from skills/code-navigation/SKILL.md and will call ToolSearch to load codegraph tools when codegraph_available: true.
For simple single-file checks: handle directly without agent dispatch. Read the file, inspect the relevant code, and evaluate the hypothesis.
After agent results (or direct investigation) return:
Triggered when: all hypotheses are refuted, or symptoms are too vague for meaningful hypotheses.
Ask targeted questions via AskUserQuestion to narrow the search. Derive questions from the specific bug context -- not from templates. Examples of the kind of questions to ask:
Explore based on user's answers using the navigation tier from Step 0.7. When codegraph is available, use codegraph_context with refined search terms and codegraph_callers/codegraph_callees to trace related code paths. Fall back to grep/Read when codegraph returns insufficient results.
Generate new hypotheses from exploration findings.
Return to Step 3 with new hypotheses.
Bound: Maximum 2 exploration rounds. After 2 rounds without a confirmed root cause:
Once root cause is confirmed:
Generate 1-3 fix proposals (simplest first):
Dispatch the fix-reviewer agent with:
Integrate agent feedback:
Present reviewed proposals to user via AskUserQuestion:
If user selects a proposal:
If user selects "None": stop with a summary of the root cause.
Trigger: /hypothesis-debugging <description> (and /quiver:hypothesis-debugging)
Setup:
Expected behavior:
Verification checklist:
/debug.Known gotchas:
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub yagizdo/quiver --plugin quiver