mantis-reproduce

mantis-reproduce is a skill for Claude Code, Codex from google/mantis. It costs 47 tokens per session (11,129 once invoked), scanned A, original, Apache-2.0.

A step that creates and runs a small test program or input to check whether a suspected software crash or security flaw can actually be triggered.

In plain words
What is it for?
Use it to generate crash reproducers, run them in sandboxes, verify findings, and re-test specific findings after a patch.
Why use it?
It replaces an unverified report with evidence from an isolated test environment.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is --state_root if passed, else ./workspace/... relative to the current dir).

About the project

google/mantis is a modular set of security-review skills that coding agents use to find, reproduce, and patch software vulnerabilities. It is for adapting automated security testing to application, infrastructure, machine-learning, hardware, and firmware projects, with expert review required for results. The catalogue skills and instruction provide the workflow for using Mantis with coding agents.

google/mantis · 943 stars · on GitHub · cloud.google.com

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/google/mantis
agentmods
npx agentmods add skills/google/mantis/mantis-reproduce

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mantis-reproduce

README.md
[![agentmods](https://agentmods.dev/badge/skills/google/mantis/mantis-reproduce.svg)](https://agentmods.dev/skills/google/mantis/mantis-reproduce)
Your own site
<a href="https://agentmods.dev/skills/google/mantis/mantis-reproduce"><img src="https://agentmods.dev/badge/skills/google/mantis/mantis-reproduce.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 11,129 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.11129
Opus 5 $0.00023 $0.05565
Sonnet 5 $0.00009 $0.02226
Haiku 4.5 $0.00005 $0.01113

Measured 6d ago against content hash b5b704b9cbc8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

mantis-reproduce scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

mantis-reproduce/SKILL.md · 808 lines

How it starts

The opening of the file, as written. The whole thing — 808 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Reproducer (/mantis-reproduce)

System Goal

Integration Test Engineer. Designs crash reproducers or inputs and executes them inside isolated sandbox environments to empirically verify bugs.

Command Definition

  • Command: /mantis-reproduce [--reattack] [--finding_id=<uuid>] [--force] [--target_root=<path>] [--state_root=<path>] [--snapshot_root=<path>] [--snapshot_id=<SNAPSHOT_ID>] [--snapshot_pinned=<true|false>]
  • Description: Generates and runs crash reproducers to verify security flaws.
  • Parameters:
    • --reattack: When executing as part of patch verification to isolate re-attack outcomes.
    • --finding_id: The specific finding UUID to reproduce. Must be provided and is required when --reattack is specified.
    • --force: Override/bypass eligibility checks for targeted normal runs.
    • --target_root: Path to the root of the target codebase under test (defaults to .). AUTHORITATIVE when supplied — overrides --snapshot_root (Block A step 1a); the sentinel check is skipped for this tree (e.g. a patched shadow during re-attack verification).
    • --state_root: Path to the root of the Mantis state directory containing workspace/ (defaults to .).
    • --snapshot_root: Root of the pinned immutable code snapshot for this pass. Consumed by Block A (Step 0) when --target_root is not supplied.
    • --snapshot_id: The SNAPSHOT_ID string of the pinned snapshot, consumed by Block A (sentinel) and Block B (snapshot match check) in Step 0.
    • --snapshot_pinned: When false (set by mantis-patch during re-attack on a patched shadow), the reproduce sub-agent MUST skip the snapshot sentinel/match check for this invocation — the --target_root tree is authoritative and sentinel-exempt (Block A step 1a).

Input/Output Contract

  • Reads:
    • state_root/workspace/findings/ (viable/conditional findings).
    • target_root/ (Repository source files to analyze trigger paths).
    • state_root/workspace/archive/.repro_attempts.json.
    • state_root/workspace/.mantis_state.json (to track current loop pass).
  • Writes:
    • PoC reproduction files (e.g. poc_[uuid].py or crash_[uuid].payload inside state_root/workspace/reproducers/).
    • If run normally: updates findings in-place under state_root/workspace/findings/ (sets "repro_status", "repro_file_path", "run_command", "repro_output", and appends history). Updates status to "VALID" if provisionally valid.
    • If run with --reattack: updates findings in-place under state_root/workspace/findings/ (sets "reattack_status", "reattack_file_path", "reattack_run_command", "reattack_output", "reattack_variants", and appends history with stage "reattack"). Does not modify "repro_*" fields or "status". Exception: may atomically downgrade patch_status per INV-1 in Step 6 (never persist VERIFIED_SECURE alongside a non-failed_to_bypass reattack_status).
    • Updates state_root/workspace/archive/.repro_attempts.json atomically.
    • Stamps "repro_snapshot_id" / "reattack_snapshot_id" on updated findings and stores .repro_attempts.json values as {count,last_snapshot} objects (bare integers still read correctly).
  • Preconditions:
    • Findings must exist in state_root/workspace/findings/.
    • Sandbox/container runtime environment must be available.
  • Idempotency Guarantee:
    • Updates findings in place. Uses state_root/workspace/archive/.repro_attempts.lock file locking and atomic temporary file swaps (os.replace on state_root/workspace/archive/.repro_attempts.json.tmp) to guarantee concurrency safety and retry stability.
    • Snapshot-aware: regenerates the PoC when the finding's snapshot no longer matches; refuses to emit a negative verdict without reached-sink evidence. Re-attack verdicts on a snapshot mismatch are governed by the C5 unpatched-baseline re-run (Step 6), which supersedes the legacy blanket refusal — a failed_to_bypass verdict is only written after C5 has confirmed the unpatched baseline still triggers on the current snapshot.

Read the full file on GitHub · 808 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 808 lines · 47 tokens per session scan A b5b704b9cbc8

Subscribe to this mod's changes

mantis-reproduce is a skill published in the GitHub repository google/mantis (943 stars, last pushed 3d ago), licensed Apache-2.0. It adds 47 tokens to every session and 11,129 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.