greglas75/zuvo/debug

Claude Code and agent skill by greglas75/zuvo

Trust tier 1
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Systematic bug investigation with a five-phase framework: reproduce, narrow, diagnose, fix, verify. Supports automated regression bisect via --regression flag. Produces a structured debug report with root cause analysis, regression test, and CQ/Q self-evaluations.

Install

npx vskill@latest install greglas75/zuvo/debug

SKILL.md

The same SKILL.md was published earlier as greglas75/zuvo/debug.

zuvo:debug — Structured Bug Investigation

A disciplined five-phase process for turning a bug report, error message, or unexpected behavior into a confirmed root cause, verified fix, and permanent regression test.

Scope: Any bug, error, or unexpected behavior that needs investigation. Out of scope: Code quality sweeps (use zuvo:code-audit), general review (use zuvo:review), performance problems without a specific bug (use zuvo:performance-audit).

Argument Parsing

Parse $ARGUMENTS to determine the starting phase:

InputStarting point
_(empty)_Ask the user: "Describe the issue. Share the error message, stack trace, or explain what is happening."
Error message or stack tracePhase 1.5 (Minimal Reproduction) -- verify the error is reproducible before narrowing
Code snippet or file referencePhase 3 (Diagnose) -- read the code, trace the execution path
Description like "why does X" or "X is broken"Phase 1 (Reproduce) -- gather context before proceeding
--regression flag, or words like "bisect", "regression", "this used to work"Phase R (Regression Bisect) -- automated git bisect to find the breaking commit

Environment Compatibility

Dispatch follows ../../shared/includes/execution-policy.md through env-compat. Reuse existing authorization within that policy; session restrictions take precedence. Run each required gate and report its actual independence or an unmet requirement.

Read ../../shared/includes/env-compat.md for agent dispatch patterns, path resolution, and progress tracking across all supported platforms.

CodeSift Integration

Read ../../shared/includes/codesift-setup.md for the full initialization sequence.

Key tools for debugging:

PhaseTaskCodeSift toolFallback
2Identify recent symbol-level changeschanged_symbols(repo, since="HEAD~5")git log --oneline + git diff
2Compact change summarydiff_outline(repo, since="HEAD~5")git diff --stat
2Blast radius of recent changesimpact_analysis(repo, since="HEAD~5", depth=2)Grep for imports of changed files
3Trace callers/callees of buggy functiontrace_call_chain(repo, symbol_name, direction, depth=3)Repeated Grep for function name
3Understand buggy function with imports and siblingsget_context_bundle(repo, symbol_name)Read the entire file
3Find where an error is thrownsearch_text(repo, query="error message", regex=true)Grep
3Read multiple functions along the call pathget_symbols(repo, symbol_ids=[...])Multiple Read calls
3File structure around the bugget_file_outline(repo, file_path)Read the file
AnyBatch 3+ lookupscodebase_retrieval(repo, queries=[...])Sequential Grep/Read

Mandatory File Loading

PHASE 0 — Bootstrap (always, before reading error/file)
1. ../../shared/includes/codesift-setup.md -- [READ | MISSING -> STOP]

This is the ONLY file loaded before reading the error report or target file.

PHASE 0.5 — Classify (read error/file, determine bug category)

After CodeSift setup, read the error, stack trace, or target file. Classify bug category:

  • logic: wrong output, off-by-one, condition error, missing branch
  • async: race condition, unhandled rejection, deadlock, timeout
  • data: wrong query, missing join, constraint violation, data corruption
  • integration: API contract mismatch, version incompatibility, env config error
  • test-failure: existing test broke, flaky test, test infrastructure issue

Print: [CLASSIFIED] Bug category: {logic|async|data|integration|test-failure}

PHASE 1 — Conditional Load (based on bug category)
Includelogicasyncdataintegrationtest-failure
../../rules/cq-patterns.mdFullCQ15,CQ21 focusCQ6,7,9 focusCQ8,CQ19 focusSKIP
../../rules/cq-checklist.mdFullCQ15,CQ21 focusCQ6,7,9 focusCQ8,CQ19 focusSKIP
../../rules/testing.mdSKIPSKIPSKIPSKIPFull

Print loaded files:

PHASE 1 — LOADED:
[list with READ/SKIP status per file]
Optional Files (loaded if available)
../../shared/includes/knowledge-prime.md -- [READ | MISSING -> degraded]
DEFERRED — Load at completion
../../shared/includes/run-logger.md -- [READ at final step]
../../shared/includes/retrospective.md -- [READ at final step]
../../shared/includes/knowledge-curate.md -- [READ at final step | MISSING -> degraded]

If PHASE 0 file missing: Run self-evaluation using the embedded minimal checklist below. Note "DEGRADED — codesift-setup.md unavailable" in the debug report.

Minimal checklist (fallback only):

  1. Error path tested? (Q7)
  2. All branches exercised? (Q11)
  3. Test imports real production code? (Q13)
  4. Assertions verify values, not just shape? (Q15)
  5. Expected values from spec, not copied from implementation? (Q17)
  6. Boundary validation present? (CQ3)
  7. Auth guard paired with query filter? (CQ4)
  8. Infrastructure errors handled with timeout? (CQ8)
  9. No duplicated logic blocks? (CQ14)

Framework: Five Phases

Phase 1: REPRODUCE -- Understand expected vs. actual behavior
Phase 1.5: MINIMAL REPRO -- Verify a stack trace is current and reproducible
Phase 2: NARROW -- Establish baseline, reduce the search space
Phase 3: DIAGNOSE -- Trace the code path, form and test hypotheses
Phase 4: FIX + VERIFY -- Implement fix, regression test, quality gates
Phase R: REGRESSION BISECT -- Alternative path for "this used to work" bugs
Replaces Phases 1-3 with automated git bisect, then joins Phase 4.

Phase 0: Knowledge Prime

Run the knowledge prime protocol from knowledge-prime.md:

WORK_TYPE = "research"
WORK_KEYWORDS = <keywords from the bug description, error messages, affected files>
WORK_FILES = <files mentioned in the bug report, if any>

Known gotchas from prior sessions may directly identify the root cause.


Phase 1: Reproduce

Establish a clear, reproducible failure. Gather from the user if not provided:

  • Expected behavior: What should happen?
  • Actual behavior: What happens instead?
  • Reproduction steps: Exact sequence to trigger the bug
  • Scope: Does it happen always, intermittently, for all users, or under specific conditions?
  • Timeline: When did it start? Was there a recent deploy, config change, or dependency update?

If reproduction is inconsistent, flag as a potential race condition, environment-dependent issue, or test-order dependency.

Phase 1.5: Minimal Reproduction

A stack trace proves an error occurred at some point. It does not prove the error is reproducible right now. Before narrowing:

  1. Run the failing test or hit the failing endpoint. Can you trigger the same error?
  2. If yes: Proceed to Phase 2 with confirmed reproduction.
  3. If no: The trace may be from a different state (stale data, previous deploy, changed config). Go back to Phase 1: gather expected vs actual, steps, scope.
  4. If intermittent: Run 3 times to confirm flakiness, then proceed with a flaky flag.

Skip this phase only when the failure is self-evident (type error visible in code, compilation failure).

Phase 2: Narrow

2.0 Baseline Check

Before changing anything, determine whether this is a new regression or a pre-existing problem.

  1. Run existing tests for the affected area. Are any already failing?
  2. Check recent commits to the affected files: git log --oneline -10 -- [affected-files]
  3. If CodeSift is available: changed_symbols(repo, since="HEAD~5") to see symbol-level changes near the bug. diff_outline(repo, since="HEAD~5") for a compact summary.
  4. Record the current test state as a baseline.

Output:

BASELINE: [N] passing, [M] failing in affected area
REGRESSION: YES (commit [hash]) | NO (pre-existing) | UNKNOWN
2.1 Reduce the Search Space

Work through these in order, stopping when the failure point is identified:

  1. Error message and stack trace -- Read the full trace, not just the last line. The root cause is usually earlier in the chain.
  2. Logs around the failure time -- What happened immediately before the error?
  3. Recent changes -- Commits, deploys, dependency updates, config changes in the relevant window.
  4. Environment comparison -- If it works in one environment but not another, find the difference.
  5. Binary search -- If the code path is long, identify the midpoint and determine whether the bug is upstream or downstream.

Phase 3: Diagnose

Trace the execution path from input to failure.

  1. Entry point -- Where does the triggering action enter the system?
  2. Trace forward -- Follow data through each function and service until the point of failure. If CodeSift is available, use trace_call_chain(repo, symbol_name, direction="callees", depth=3) from the entry point. Use get_context_bundle(repo, symbol_name) to understand the buggy function with its imports and neighbors.
  3. Form hypotheses (max 3) -- List 2-3 possible root causes, ordered by likelihood.
  4. Test each hypothesis -- For each: what evidence would confirm or rule it out? Gather that evidence. If 2 hypotheses fail, pivot: re-read the code path from scratch, add logging, or widen the search scope. Do not keep guessing in the same direction.
  5. Root cause -- Identify the specific line, condition, or assumption that fails. Distinguish root cause from symptoms.
Error-Type Playbooks
Error typeMost common root causes
undefined or nullMissing null guard, wrong property key, async timing issue
Wrong valueOff-by-one, unit mismatch, stale cached data
Permission deniedAuth context not propagated, RBAC misconfigured, missing query filter
TimeoutN+1 query, missing database index, unbounded loop
Flaky / intermittentRace condition, shared global state, test-order dependency
Works in dev, fails in prodMissing env variable, production data edge case, timezone difference
Stack-Specific Diagnostic Sequences

API / Backend:

  1. Reproduce with curl or the test runner against the endpoint
  2. Check request validation -- does the schema reject the input, or does it let bad data through?
  3. Check auth context at the point of failure
  4. Check the database query -- does it return expected data? Run EXPLAIN for slow queries.
  5. Check error handling -- does the catch block swallow, transform, or propagate correctly?

Frontend / UI:

  1. Check browser console for errors, network tab for failed requests
  2. Determine if API data is correct -- if yes, the bug is in rendering or state management
  3. Trace component prop flow to the failing component
  4. Check event handlers -- does the user action trigger the expected dispatch or callback?
  5. Check SSR hydration mismatch if applicable

Database / Performance:

  1. Identify the slow or failing query from logs or ORM debug mode
  2. Run EXPLAIN ANALYZE -- missing index? full table scan? cartesian join?
  3. Check for N+1 patterns (same query executed in a loop)
  4. Check connection pool exhaustion or timeout settings
  5. Check if dataset size has grown beyond what the query handles efficiently

Async / Flaky:

  1. Run the failing test 5 times. How often does it fail?
  2. Check for shared mutable state between tests (globals, singletons, database rows)
  3. Check timing assumptions (setTimeout, sleep, waitFor with insufficient duration)
  4. Check execution-order dependency (does the test rely on another test running first?)
  5. Check resource cleanup (ports, connections, file handles released properly?)

Phase 4: Fix and Verify

4.1 Implement the Fix

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
8
7-day trend score
11

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/greglas75/zuvo/debug/badge)](https://verified-skill.com/skills/greglas75/zuvo/debug)

Something wrong with this skill or its page? Tell us.