mcpbeat

Mutation Test Suite Optimizer

arabelatso/mutation-test-suite-optimizer

Optimize test suites using mutation testing to maximize mutation kill rate with minimal tests. Use when you need to reduce test suite size while maintaining quality, identify redundant tests, improve mutation coverage, or validate test effectiveness. The skill analyzes test coverage, execution intervals, and redundancy using mutation operators, selects or generates a minimal subset of tests that maximizes mutation kill rate, and outputs an optimized test suite with detailed reports showing killed and surviving mutants. Supports multiple programming languages and mutation testing frameworks.

710 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
141
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill mutation-test-suite-optimizer

The instruction itself

8 sections, as written by the author

Mutation Test Suite Optimizer

Overview

This skill optimizes test suites using mutation testing, selecting a minimal subset of tests that maximizes mutation kill rate while reducing execution time and redundancy.

Quick Start

# Optimize test suite with mutation testing
python scripts/optimize.py /path/to/repo --tests tests/

# Use specific mutation operators
python scripts/optimize.py repo/ --tests tests/ --operators AOR,ROR,COR

# Generate optimization report
python scripts/optimize.py repo/ --tests tests/ --output report.json

What Gets Optimized

  • Test Selection - Identify minimal test subset for maximum coverage
  • Redundancy Removal - Eliminate tests that kill same mutants
  • Mutation Coverage - Maximize mutants killed
  • Execution Time - Reduce overall test execution time
  • Test Quality - Identify weak or ineffective tests

Mutation Operators

Supports common mutation operators:

  • AOR - Arithmetic Operator Replacement
  • ROR - Relational Operator Replacement
  • COR - Conditional Operator Replacement
  • SOR - Shift Operator Replacement
  • LOR - Logical Operator Replacement
  • ASR - Assignment Operator Replacement

Optimization Report

Generates detailed report with:

  • Optimized Test Suite - Minimal test subset
  • Mutation Kill Rate - Percentage of mutants killed
  • Killed Mutants - List of detected mutants
  • Surviving Mutants - Mutants that escaped detection
  • Redundant Tests - Tests that can be removed
  • Execution Time Savings - Time reduction achieved

Example report:

{
  "original_tests": 150,
  "optimized_tests": 45,
  "mutation_kill_rate": 92.5,
  "killed_mutants": 185,
  "surviving_mutants": 15,
  "time_savings": "67%"
}

Usage

python scripts/optimize.py <repo_path> --tests <test_dir> [--operators <ops>] [--output <report.json>]

Tips

  • Run regularly to maintain test suite quality
  • Focus on high-value tests that kill unique mutants
  • Remove redundant tests to speed up CI/CD
  • Use surviving mutants to guide new test creation
  • Balance mutation score with execution time
  • Integrate into continuous testing pipeline

How to use it

Copy the folder

Take arabelatso/mutation-test-suite-optimizer from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.