Skip to content
Skillpedia
Testing8.0k Β· #12728

genotoxic

What it does

This skill reviews the results of mutation testing, where small changes are made to code to check whether the tests catch them. It helps developers decide which surviving changes matter. It is for teams working on test quality.

When to use it

  • βœ“When mutation testing reports many surviving mutants and you need to decide which ones matter.
  • βœ“When you want to find where new unit tests would have the biggest effect.
  • βœ“When you want to find functions that would benefit from fuzz testing rather than more unit tests.

Skill link

https://github.com/trailofbits/skills/blob/main/plugins/trailmark/skills/genotoxic/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/trailofbits/skills/blob/main/plugins/trailmark/skills/genotoxic/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œMy mutation test left 40 survivors. Can you tell me which ones point to real gaps in my tests?”

5 new skills a week. 1 minute to read.

How it works

It runs mutation testing and a tool that removes test lines, then uses the code graph to sort the results into false alarms, missing tests, and fuzzing targets.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Genotoxic

Combines mutation testing and necessist (test statement removal) with code graph analysis to triage findings into actionable categories: false positives, missing unit tests, and fuzzing targets.

When to Use

  • After mutation testing reveals survived mutants that need triage
  • Identifying where unit tests would have the highest impact
  • Finding functions that need fuzz harnesses instead of unit tests
  • Prioritizing test improvements using data flow context
  • Filtering out harmless mutants from actionable ones
  • Finding unnecessary test statements that indicate weak assertions (necessist)

When NOT to Use

  • Codebase has no existing test suite (write tests first)
  • Pure documentation or configuration changes
  • Single-file scripts with trivial logic

Prerequisites

  • trailmark installed β€” if uv run trailmark fails, run:
    uv tool install trailmark
    

Python snippets: uv run --with trailmark python - (a tool env is not importable)

**DO NOT** fall back to "manual verification" or "manual analysis"
as a substitute for running trailmark. Install it first. If installation
fails, report the error instead of switching to manual analysis.
- A **mutation testing framework** for the target language β€” if the framework
command fails (not found, not installed), install it using the instructions
in [references/mutation-frameworks.md](references/mutation-frameworks.md).
**DO NOT** fall back to "manual mutation analysis" or skip mutation testing.
Install the framework first. If installation fails, report the error
instead of switching to manual mutation analysis.
- **necessist** (optional, recommended) β€” if the target language is
supported (Go, Rust, Solidity/Foundry, TypeScript/Hardhat,
TypeScript/Vitest, Rust/Anchor), install with `cargo install necessist`.
See [references/mutation-frameworks.md](references/mutation-frameworks.md)
for details.
- An existing test suite that passes
- **macOS environment**: Run `ulimit -n 1024` before any `mull-runner`
invocation. macOS Tahoe (26+) sets unlimited file descriptors by
default, which crashes Mull's subprocess spawning. See
[references/mutation-frameworks.md](references/mutation-frameworks.md)
for details.

---

## Rationalizations to Reject

| Rationalization | Why It's Wrong | Required Action |
|-----------------|----------------|-----------------|
| "All survived mutants need tests" | Many are harmless or equivalent | Triage before writing tests |
| "Mutation testing is too noisy" | Noise means you're not triaging | Use graph data to filter |
| "Unit tests cover everything" | Complex data flows need fuzzing | Check entrypoint reachability |
| "Dead code mutants don't matter" | Dead code should be removed | Flag for cleanup |
| "Low complexity = low risk" | Boundary bugs hide in simple code | Check mutant location |
| "Tool isn't installed, I'll do it manually" | Manual analysis misses what tooling catches | Install the tool first |
| "Necessist isn't mutation testing, skip it" | Necessist finds what mutation testing misses: weak tests | Run both when the language supports it |

---

## Quick Start

```bash
# 1. Build the code graph
uv run trailmark analyze --language auto --summary {targetDir}

# 2. Run mutation testing (language-dependent)
# Python:
uv run mutmut run --paths-to-mutate {targetDir}/src
uv run mutmut results

# 2b. Run necessist (if language supported)
necessist

# 3. Analyze results with this skill's workflow (Phase 3)

Workflow Overview

Phase 1: Graph Build      β†’ Parse codebase with trailmark
      ↓
Phase 2: Mutation Run     β†’ Execute mutation testing framework
Phase 2b: Necessist Run   β†’ Remove test statements (optional, parallel)
      ↓
Phase 3: Triage           β†’ Classify findings using graph data
      ↓
Output: Categorized Report
  β”œβ”€β”€ Corroborated         (both tools flag same function β€” highest value)
  β”œβ”€β”€ False Positives      (harmless, skip)
  β”œβ”€β”€ Missing Tests        (write unit tests)
  └── Fuzzing Targets      (set up fuzz harnesses)

Decision Tree

β”œβ”€ Need to set up mutation testing for a language?
β”‚  └─ Read: references/mutation-frameworks.md
β”‚
β”œβ”€ Need to set up necessist or find weak test statements?
β”‚  └─ Read: references/mutation-frameworks.md (Necessist section)
β”‚
β”œβ”€ Need to understand the triage criteria in depth?
β”‚  └─ Read: references/triage-methodology.md
β”‚
β”œβ”€ Need to understand how graph data informs triage?
β”‚  └─ Read: references/grap
FAQ

Does it need an existing test suite?

Yes. The skill is meant for codebases that already have tests, and it advises writing tests first if there are none.

Which tools does it need?

It needs Trailmark and a mutation testing framework for your language. If the framework is missing, the skill guides you through installing it.

What is a surviving mutant?

It is a small change to the code that the tests did not catch, which can point to a gap in testing.

Details

Original description by the author

Graph-informed mutation testing triage. Parses codebases with Trailmark, runs mutation testing and necessist, then uses survived mutants, unnecessary test statements, and call graph data to identify false positives, missing test coverage, and fuzzing targets. Use when triaging survived mutants, analyzing mutation testing results, identifying test gaps, finding fuzzing targets from weak tests, running mutation frameworks (including circomvent and cairo-mutants), or using necessist.

repo: trailofbits/skills

Popularity

GitHub stars
8.0k
Ranking position
#12728
License
CC-BY-SA-4.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills