# Mutation Probe

> Find out if your Python tests actually catch bugs by purposely breaking your code and seeing if they notice.

Mutation Probe is a free AI agent skill on Agensi by Ronan, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Ronan](https://www.agensi.io/creators/ronan)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Version: 1.0
- Last updated: 2026-12-03
- Security: scan passed (2026-12-03); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/mutation-probe
- Tags: testing, python, code-review, qa-automation, mutation-testing, test-quality, pytest, unittest

## What it does

- Injects small faults into your code to see if your tests are alert enough to catch them
- Lists the exact lines where code was changed but the tests still passed anyway
- Calculates a quality score based on how many intentional bugs were detected
- Suggests new test cases to cover the gaps found during the probing process
- Works in a temporary folder so your original source code stays safe and untouched

## Who it's for

- **Python developers who want to prove their tests work:** Show exactly which lines of code your tests are ignoring by trying to break them on purpose. Try: "Check if my tests for the payment module actually catch mistakes."
- **Technical founders auditing an outsourced codebase:** Get a real quality score for the code you paid for, beyond just seeing green checkmarks. Try: "Verify the test quality of this new Python backend."
- **Lead engineers reviewing team pull requests:** Find weak assertions and missing edge cases before they reach production. Try: "Run a mutation probe on the recent changes in the user-auth file."

## About this skill

The problem. Passing tests do not show that the tests check anything. Background: a 2025 empirical study of more than 1.2 million commits across 2,168 TypeScript, JavaScript and Python repositories (Hora and Robbes, arXiv 2602.00409) found that 36 % of coding-agent commits add mocks, against 26 % for non-agent commits. The study measures mocks, not bug-detection quality; it is background, not proof that agent-written tests are weak. Line coverage cannot tell you whether the assertions would notice a wrong result.

How it works, in 4 steps.

Frame: --list-only shows the faults that would be injected, without running any test or any project code.
Run: the script copies the project to a temporary directory, injects one fault at a time (8 operators: comparisons, arithmetic, and/or, not, True/False, integer literals, return values, if conditions) and runs your test command (unittest or pytest, autodetected or given with --test-cmd).
Read: survivors (faults the tests did not notice) come with the exact diff, the enclosing function, the category, and a hint for the test to write. JSON output is available for agents.
Fix and repeat: the agent writes one test per useful survivor, explains equivalent mutants instead of writing absurd tests, re-runs, and stops after 3 rounds at most. It never edits the source code to "kill" a mutant and never claims a high score proves the absence of bugs.

What you get. SKILL.md (agent procedure, exit-code table, hard rules), README.md with a worked example, and one standard-library Python script (no dependency, no network, no API key). Built-in checks: the reference suite runs twice, a canary verifies the copied file is the one executed, bytecode caches are neutralised. Worked example on a constructed fixture: a weak test suite scores 35.0 % (7 of 20 faults caught) and a stronger one 90.0 %, with the two remaining survivors being equivalent mutants. This is a constructed example, not a measurement on real projects.

Note on language. The tool's report (summary, hints, notes, error messages) is written in French. SKILL.md, README and the option names are in English.

## Requires

- Runs on Linux only
- Python

## Known limitations

Only works for Python on Linux. It runs your actual test code, so only use it on code you trust. It does not support Windows.

## 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 Mutation Probe 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 help me find bugs that my tests might be missing?

This skill identifies holes in your Python test suite by purposely breaking parts of your code. If your tests still pass even though the code is broken, it reveals specific lines where you need stronger checks to prevent real bugs.

### What do I need to provide to get started?

You only need a Python project folder and the specific file you want to check. The skill handles the rest by creating a safe copy of your code to test against so your original work stays untouched.

### What kind of results will I see after the skill runs?

You get a report showing a test quality score and a list of surviving mutants, which are the specific spots where code was broken but tests failed to notice. This list includes the exact code changes and hints on why the tests might have failed to catch them.

### Are there any types of code or systems this skill cannot check?

This skill is currently for Python projects on Linux systems only. It does not work on Windows and it focuses on eight specific types of code changes, so it won't catch every possible type of logic error or work on non-Python languages.

### How should I ask my AI agent to start the evaluation?

You can tell your AI agent that you want to check your test quality or get a mutation score for a specific Python file. You should also mention if you want to focus only on recently changed lines or a specific part of your project.

### Is it safe to run this skill on any code I find online?

It is not safe to use this skill on untrusted code because it must run the project tests to work. Since the tests have access to your files and network, you should only use it on code you know is safe.

---

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.
