# MutantGate: Diff Mutation Testing for PRs

> Mutation testing for pull requests: run Stryker only on the lines a PR changed, get a diff mutation score, and see the surviving mutants your tests missed. Works in GitHub Actions and with Claude Code or Cursor.

MutantGate: Diff Mutation Testing for PRs is a free AI agent skill on Agensi by luckystore1, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [luckystore1](https://www.agensi.io/creators/luckystore1)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Version: 1.1
- Last updated: 2026-12-05
- Security: scan passed (2026-12-05); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/mutantgate-diff-mutation-testing-for-prs
- Tags: testing, code-review, devops, typescript, javascript, qa-automation, stryker, mutation-testing

## What it does

- Calculates a mutation score for only the lines of code you recently changed
- Identifies specific "survivors" where your tests failed to catch an injected bug
- Provides a clear table of exactly which file and line needs a better test assertion
- Checks if your test suite is strong enough to meet a specific quality threshold
- Works with your existing test runners (requires a Stryker config file)

## Who it's for

- **Founders building their first app with AI assistance:** Make sure the code your AI agent wrote actually works and has tests that catch real mistakes. Try: "Check if the tests for my new login feature actually catch bugs."
- **Freelance developers and contractors:** Prove your code quality to clients by showing your tests pass a stress test. Try: "Run a mutation scan on my latest pull request against the main branch."
- **Tech leads reviewing team code:** Spot exactly which parts of a code change are untested before you hit merge. Try: "Show me the survivors from the last test run on the pricing logic."

## About this skill

When you write tests for your code, a green checkmark usually just means the code ran. It does not mean the tests are actually good at finding bugs. This skill runs a "stress test" for your tests by putting tiny, intentional errors into your new code and seeing if your tests notice. If a test still passes even with a bug in the code, this skill tells you exactly where the hole is.

### How it works
1. You ask your AI agent to check the quality of tests in your current work.
2. The skill finds exactly which lines of code you changed.
3. It runs a tool that injects small bugs, like changing a "greater than" to a "greater than or equal to".
4. It reports a score showing what percentage of these bugs your tests caught.
5. You get a list of "survivors," which are specific lines where a bug was missed, so you can add a better test.

### Frameworks & tools
This skill works with TypeScript and JavaScript projects. It uses the StrykerJS tool to run the tests and requires a configuration file in your project.
### Why this beats prompting it yourself
A regular AI agent can only guess if a test is good by reading the code. This skill actually runs the code with bugs inside it to prove whether the tests work. It gives you a real math-based score for your specific changes rather than just looking at the whole project.

### Use cases
- Verifying that an AI agent's suggested tests are actually useful.
- Finding hidden gaps in your testing before a big product launch.
- Reviewing a teammate's work to see if they missed any edge cases.
- Ensuring new features are fully protected against future code changes.

### Known limitations
This skill only works for TypeScript and JavaScript code. It cannot test files that have no tests at all, and it does not work on documentation or plain text files.

### Source code & package
The skill drives the open-source `mutantgate` CLI (MIT). The same engine is published on npm as `mutantgate` (`npx mutantgate`, Node.js 20.11+) and its source is on GitHub as luckystore1/mutantgate, so you can read it before you run it.
### Related skills

- [MutantGate Survivor Pack: Test-Gen Prompts & PR Gate Kit](https://www.agensi.io/skills/mutantgate-survivor-pack-test-gen-prompts-pr-gate-kit) ($12) - template pack that turns these survivors into tests, with a GitHub Actions gate workflow, a monorepo preset and review templates.
- [MCP Security Audit & PR Gate: Claude Code & Cursor](https://www.agensi.io/skills/mcp-security-audit-pr-gate-claude-code-cursor) ($9) - audit and pull-request gate for MCP config, agent settings and unpinned actions.

## Requires

- Node.js 20.11+
- mutantgate
- Stryker (with stryker.conf.json)
- Git

## Technical details

Orchestrates StrykerJS via a CLI or MCP server. Requires @stryker-mutator/core and a compatible runner (Vitest/Jest) installed in the repository. Uses git to determine the diff between the current HEAD and a base branch to scope mutations. Outputs results in JSON or clear-text table format. Includes an MCP tool for automated scanning and fix suggestions.

## 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 MutantGate: Diff Mutation Testing for PRs 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 is this different from regular code testing?

While typical testing tools only check if your code runs, this skill identifies if your tests actually catch bugs. It does this by injecting small errors into your new code to see if your tests notice and fail, ensuring your work is truly protected against future mistakes.

### What do I need to have in my project to use this?

This skill works with projects using TypeScript or JavaScript. You will need the StrykerJS tool and a specific configuration file already set up in your project for the skill to run the tests.

### What kind of results will I see?

You get a percentage score showing how many injected bugs were caught by your tests, along with a list of survivors. Survivors are the specific lines of code where a bug was missed, giving you a clear list of exactly where you need to add better tests.

### Are there any types of files this skill cannot check?

This skill is designed for code files only. It cannot analyze projects written in languages like Python, Go, or Rust, and it will not work on documentation, plain text, or code files that do not have any existing tests.

### How should I tell my agent to use this skill?

You can ask your agent to check the quality of the tests in your current work or to find gaps in your testing. It is especially useful to ask your agent to verify that its own suggested tests are effective before you finish a task.

---

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.
