mantis-plan

A planning step for a defensive security review that maps a codebase’s external boundaries and creates a review roadmap.

In plain words
What is it for?
Use it at the beginning of a security-review campaign to identify what to inspect and organize the work before reviewing code or writing tests.
Why use it?
It gives a security review a focused starting plan based on the threat model and earlier records.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

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

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,377 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 $0.00062 $0.07377
Opus 5 $0.00031 $0.03689
Sonnet 5 $0.00012 $0.01475
Haiku 4.5 $0.00006 $0.00738

Measured 2d ago against content hash 8ca2bbd05e4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mantis-plan 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 2d 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-plan/SKILL.md · 533 lines

How it starts

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

Strategist (/mantis-plan)

System Goal

Security Architect. Analyzes code structure, directory metadata, and historical records to map the external boundary and formulate an adaptive review roadmap.

Command Definition

  • Command: /mantis-plan
  • Description: Formulates a targeted defensive security reviewing plan based on the active threat model and historical learnings.
  • Arguments (optional; supplied by the orchestrator, consumed by Block A):
    • --snapshot_root / SNAPSHOT_ROOT: absolute path to the pinned read-only code snapshot (CODE_ROOT for all snapshot-relative paths).
    • --snapshot_id / SNAPSHOT_ID: the pass snapshot identifier (sentinel + Block B comparisons).
    • --state_root: absolute path to the workspace/ state dir (plan.json, .mantis_state.json, findings/, kb/, archive/). STATE-RELATIVE — never prefixed with CODE_ROOT.
    • All flags absent -> MODE-OFF/legacy mode (Block A step 1d): behaves exactly as today.

Input/Output Contract

  • Reads:
    • workspace/.mantis_state.json (to track current loop pass).
    • workspace/kb/THREAT_MODEL.md (if exists).
    • workspace/kb/index.md (checks existence to determine Mode A vs B).
    • Mode A: traverses production directories and source files, reads mantis-summary.md (if available).
    • Mode B: reads workspace/kb/index.md, workspace/kb/THREAT_MODEL.md, workspace/archive/.repro_attempts.json (if exists), VCS diffs or file timestamps/hashes.
    • workspace/kb/structural_index/manifest.json (to check structural index availability/status).
    • workspace/helpers/query_structural_index.py (to invoke bounded structural-index queries).
    • workspace/.mantis_state.json NEW fields: active_snapshot.{snapshot_id, snapshot_pinned, vcs_type}, snapshot_history (read, written by the meta-agent). vcs_type is read because Block E branches on it. Plan runs Block E in the LIVE repo root to compute changed_files / changed_files_status (COMPUTED or UNKNOWN) and writes them back to state.
  • Writes:
    • workspace/plan.json.
    • Copies retry-eligible finding JSON files from workspace/archive/findings_pass_K/ or workspace/archive/loopK_findings/ (where K is the pass it was archived in) to workspace/findings/ (preserving their original UUID filenames).
  • Preconditions:
    • Codebase must be accessible.
  • Idempotency Guarantee:
    • Overwrites workspace/plan.json directly. In Mode B, copies a finding back verbatim only when Block B is MATCHED and its file is unchanged and present; otherwise it schedules a fresh re-discovery investigation. Consults .repro_attempts.json under the cache read rule.

Read the full file on GitHub · 533 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. 2d ago First seen · 533 lines · 62 tokens per session scan A 8ca2bbd05e4c

Subscribe to this mod's changes

mantis-plan is a skill published in the GitHub repository google/mantis (853 stars, last pushed 5d ago), licensed Apache-2.0. It adds 62 tokens to every session and 7,377 once invoked, about $0.0003 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.