mantis-summarize

mantis-summarize is a skill for Claude Code, Codex from google/mantis. It costs 66 tokens per session (2,172 once invoked), scanned A, original, Apache-2.0.

A repository-mapping tool that creates a security-focused summary for each directory. It reads source files and child summaries while skipping common dependency, build, version-control, and test directories.

In plain words
What is it for?
Use it at the start of a security review to summarize directory contents and produce mantis-summary.md files. The summaries help plan what to inspect next.
Why use it?
It gives later review stages a compact map of the codebase, reducing the amount of file content they must read before planning or threat modeling. Historical lessons can optionally add context.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

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).

Good fit Use it at the start of a security review to summarize directory contents and produce mantis-summary.md files. The summaries help plan what to inspect next.

Compare 6 skills from other repositories ↓
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 · 2,474 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-summarize

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-summarize

README.md
[![agentmods](https://agentmods.dev/badge/skills/google/mantis/mantis-summarize/github.svg)](https://agentmods.dev/skills/google/mantis/mantis-summarize)
Your own site
<a href="https://agentmods.dev/skills/google/mantis/mantis-summarize"><img src="https://agentmods.dev/badge/skills/google/mantis/mantis-summarize/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mantis-summarize

Your own site · 80×15
<a href="https://agentmods.dev/skills/google/mantis/mantis-summarize"><img src="https://agentmods.dev/badge/skills/google/mantis/mantis-summarize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,172 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 14 Sept 2026
  • Snyk pass 14 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00066 $0.02172
Opus 5.5 $0.00026 $0.00869
Sonnet 5.5 $0.00013 $0.00434
Haiku 4.5 $0.00007 $0.00217

Measured 1mo ago against content hash 14438dbb6800, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mantis-summarize 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 1mo 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.

skills/mantis-summarize/SKILL.md · 176 lines

How it starts

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

Summarizer (/mantis-summarize)

System Goal

Repository Mapper. Automates the generation of security-focused, deterministic summaries of directory contents to reduce token overhead for downstream planning and research stages.

Command Definition

  • Command: /mantis-summarize
  • Description: Pre-processes the repository by generating security-focused summaries (mantis-summary.md) for each directory to make planning and research more efficient.
  • Arguments (optional; supplied by the orchestrator, consumed by Block A): --snapshot_root/--snapshot_id/--state_root. In PINNED mode, source is read under CODE_ROOT but summaries are skipped (see Output location). All absent → MODE-OFF (in-tree summaries, as today).

Input/Output Contract

  • Reads:
    • workspace/.mantis_state.json (to track current loop pass).
    • Codebase directories and source files (excluding node_modules, vendor, .git, build outputs, and tests/).
    • Child directory summaries (mantis-summary.md files from subdirectories).
    • workspace/historical_learnings.jsonl (optional, to enrich summaries).
  • Writes:
    • Traversal script to workspace.
    • MODE-OFF: mantis-summary.md in each source directory (as today). PINNED: skipped (see Output location).
  • Preconditions:
    • Source files and directory structure must be present.
  • Idempotency Guarantee:
    • Deterministically overwrites existing mantis-summary.md files in-place with updated rollups.

Instructions

Step 0: Locator Resolution + output location (run first)

LOCATOR RESOLUTION (before reading ANY target code or artifact):
0. ROLE: If this skill NEVER reads target source (report, calibrate, reflect),
   you are a FINDINGS-ONLY stage: skip steps 2-6; still read active_snapshot from
   state for provenance/annotation; NEVER stop merely because a code root is unset.
1. Determine CODE_ROOT, in this priority order:
   a. If --target_root is passed on THIS invocation, CODE_ROOT = --target_root.
      It is AUTHORITATIVE and OVERRIDES SNAPSHOT_ROOT and the state fallback
      (used when a caller hands you a prepared tree, e.g. a patched shadow).
   b. Else if --snapshot_root (or SNAPSHOT_ROOT) is passed, use it.
   c. Else read state_root/workspace/.mantis_state.json (state_root from
      --state_root if passed, else ./workspace/... relative to the current dir)
      -> active_snapshot.root / .snapshot_id / .snapshot_pinned.
   d. Else (no arg AND no readable active_snapshot): CODE_ROOT = current directory,
      treat snapshot_pinned = false (MODE-OFF). Do NOT stop.
2. SENTINEL CHECK (only if snapshot_pinned is true AND you did NOT take path 1a):
   verify CODE_ROOT/.mantis_snapshot_id exists and equals SNAPSHOT_ID. If missing
   or different -> STOP "snapshot sentinel mismatch". (A --target_root tree (1a) is
   deliberately mutated and is sentinel-EXEMPT.)
3. PATH FIELDS:
   - SNAPSHOT-RELATIVE (read under CODE_ROOT): code_paths entries; plan target_files
     that are file paths. Strip ONLY a trailing ":<digits>". A code_paths entry
     containing "://" is a URL/endpoint, NOT a file read. A code_paths entry that is
     NOT of the form <existing-path>:<integer> is a non-source LOCATOR
     (symbol/offset/endpoint): only check that the artifact/symbol exists; skip ALL
     line-range and line-existence logic.
   - STATE-RELATIVE (read/write under state_root/workspace, NEVER prefix CODE_ROOT):
     kb_references, repro_file_path, reattack_file_path, helper scripts, report
     files, and all state/findings JSON.
4. Never WRITE under CODE_ROOT when snapshot_pinned is true. Any command that
   compiles, generates, or writes artifacts MUST run in a PRIVATE SHADOW copy
   (mktemp -d from CODE_ROOT), never with cwd=CODE_ROOT. Read-only inspection may
   cd into CODE_ROOT.
5. VCS-METADATA CARVE-OUT: history-log extraction and any VCS diff/blame command
   run in the LIVE repository root (which still has .git/.hg/.repo), NOT CODE_ROOT
   (the snapshot copy strips VCS metadata). Do NOT stop merely because CODE_ROOT
   lacks .git/.hg/.repo.
6. Every shell command uses ABSOLUTE paths and sets its own working directory on
   that call. Do NOT assume the working directory persists between calls.

Read the full file on GitHub · 176 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. 1mo ago First seen · 176 lines · 66 tokens per session scan A 14438dbb6800

Subscribe to this mod's changes

mantis-summarize is a skill published in the GitHub repository google/mantis (2,474 stars, last pushed today), licensed Apache-2.0. It adds 66 tokens to every session and 2,172 once invoked, about $0.0003 per session on Opus 5.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.