# Evidence-First Debugger

> Debug with evidence, not guesses: ranked hypotheses, a minimal fix, and a regression test for every bug.

Evidence-First Debugger is a free AI agent skill on Agensi by maroofiums, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [maroofiums](https://www.agensi.io/creators/maroofiums)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-19
- Security: scan passed (2026-10-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/evidence-first-debugger
- Tags: testing, code-review, prompt-engineering, python, pytest

## About this skill

Evidence-First Debugger makes your agent debug the way a careful engineer does,
instead of guessing and patching.

### What it does
1. Reproduces the failure and captures the exact error, inputs, and environment.
2. Collects evidence (stack traces, logs, failing tests, relevant code paths).
3. Lists ranked hypotheses, each with the evidence for and against it.
4. Runs the cheapest experiment that separates the top hypotheses.
5. Applies the smallest fix that addresses the confirmed root cause.
6. Adds a regression test that fails before the fix and passes after.

### Why use it
- Stops the "change five things and hope" loop
- Keeps diffs small and reviewable
- Leaves behind a test so the bug stays fixed

### Best for
Failing tests, runtime exceptions, flaky behavior, and unexpected output in
Python, JavaScript, and other codebases an agent can run locally.

## Requires

- Python
- Git

## Known limitations

Requires execution access for full verification. When execution is unavailable, fixes are marked UNVERIFIED. Intermittent bugs may require multiple iterations to capture evidence.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Evidence-First Debugger skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill prevent the agent from suggesting plausible-sounding but incorrect code fixes?

This skill prevents 'hallucinated fixes' by requiring the agent to generate a minimal reproduction case and verify the patch with successful test execution before reporting the bug as resolved.

### Which programming languages and frameworks are optimized for this debugging workflow?

The skill includes specialized diagnostic procedures for Python environments, including frameworks like Django, FastAPI, and PyTorch, as well as testing tools like pytest.

### Can this skill handle non-obvious bugs like flaky tests or machine learning training errors?

Yes, it is specifically designed to handle complex issues like race conditions in concurrent code and silent failures in ML pipelines, such as NaN loss or tensor shape errors.

### What happens if the agent doesn't have the necessary environment to run the code?

If an execution environment is unavailable, the agent will provide the manual commands needed for you to run the verification yourself and will label the fix as UNVERIFIED.

### What is included in the purchase of the Evidence First Debugger skill?

You receive the complete Evidence First Debugger skill package, including the structured triage protocols, hypothesis ranking logic, and specialized diagnostic scripts for all supported frameworks.

### Which AI agents is this skill compatible with?

This skill is compatible with major AI agents that support tool-use and code execution capabilities, allowing the agent to run the reproduction scripts and tests it generates.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
