debug

Diagnose root causes of bugs through hypothesis-driven evidence gathering and minimal fixes.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/real-case/marvin-toolkit --skill debug-real-case
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: debug
Source: https://github.com/real-case/marvin-toolkit/tree/main/plugins/marvin/skills/debug
Command: npx skills add https://github.com/real-case/marvin-toolkit --skill debug-real-case

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging often devolves into guesswork and premature fixes that waste time and introduce new issues. This Skill enforces a systematic, evidence-first methodology that finds the actual root cause before any code is changed. ## Core Features & Use Cases - Hypothesis-Driven Analysis: Gathers evidence from stack traces, logs, git history, and code paths, then ranks 2-3 hypotheses with verification steps before fixing anything. - Agent-Backed Investigation: Dispatches the marvin-debugger agent for isolated, read-mostly analysis returning a structured report with root cause, fix approach, regression test, and sibling occurrences. - Regression Test First: Requires a failing regression test before applying the minimal fix, then confirms the test goes green and the original reproducer is gone. - Use Case: A user pastes a stack trace from a flaky test failure. The Skill reproduces the failure, anchors it in git history, verifies the most likely hypothesis, applies a minimal fix with a regression test, and captures the bug pattern as a lesson for future tasks. ## Quick Start Ask the assistant to debug the pasted error message or stack trace and find the root cause before fixing it.

Frequently Asked Questions about debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a test failure systematically?▼

Start by reproducing the failure reliably, then gather evidence from the full stack trace, git log, and the execution path before forming hypotheses. Rank 2-3 hypotheses with evidence for and against each, verify them one at a time, and only apply a fix after the root cause is confirmed.

How to find the root cause of a regression in git?▼

Use git log, git bisect, and git blame to anchor when the behavior changed, since most bugs are regressions caused by a recent delta. Comparing the working and broken states narrows the search space before reading the implicated code paths.

Does this debugging approach work for any programming language?▼

Yes, the methodology is language-agnostic and applies to any framework or runtime. It relies on universal evidence sources like stack traces, logs, version control history, and code reading rather than language-specific tooling.

Why should I write a regression test before fixing a bug?▼

A regression test that fails on the current code proves you found the actual root cause rather than a coincidental fix. After the fix, the test going green confirms the bug is resolved and protects against the same failure returning later.

What happens when the debugging agent cannot confirm a root cause?▼

The agent returns its best-supported hypothesis along with the exact next evidence-gathering step. You gather that evidence or re-dispatch the agent with it, and never apply an unconfirmed fix to the code.