mantis-summarize
Skill2.5k starsChanged 15 days agoApache-2.0View on GitHub
Pre-processes the repository by generating security-focused summaries (mantis-summary.md) for each directory to make planning and research more efficient. Use when starting a review campaign to map the codebase before threat modeling and planning. Don't use for executing code reviews, writing test scripts, or patching code.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 122
Write the Traversal Script (Bottom-Up Hierarchical): Write a script (e.g., Python or bash) in your workspace that walks the repository …
- Very specific: line 130
When analyzing a directory, the script should pass the LLM the local source files in that directory PLUS the mantis-summary.md files of its …
- Distinctive: line 134
When analyzing very large directories, context window size might become a problem.
- Distinctive: line 170
Execute the Script: Run the script you just wrote to generate all the summaries across the repository.
- Distinctive: line 175
When complete, notify the user.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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, andtests/). - Child directory summaries (
mantis-summary.mdfiles from subdirectories). workspace/historical_learnings.jsonl(optional, to enrich summaries).
- Writes:
- Traversal script to workspace.
- MODE-OFF:
mantis-summary.mdin 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.mdfiles in-place with updated rollups.
- Deterministically overwrites existing
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.Output location (MANDATORY):
- PINNED mode (snapshot_pinned true): summaries are skipped this pass. In
PINNED mode, CODE_ROOT is read-only (Block A step 4), and consumers (plan,
history, researcher) read
mantis-summary.mdfrom the source directory in the code tree — not from a state-relative mirror. Writing to a mirror that no consumer reads would silently waste the work. Do NOT write anymantis-summary.mdfiles in PINNED mode. (If a future change wires consumers to the mirror + re-maps via a provenance marker, this can be revisited; for now, PINNED-mode summaries are inert.) - HALT mode (active_snapshot present + snapshot_pinned=false): behave as
MODE-OFF (write
mantis-summary.mdinto each source directory). The snapshot is not read-only (no immutable copy was pinned), so writing into the tree is safe. - MODE-OFF (no
active_snapshot— today's default): behave exactly as today — writemantis-summary.mdinto each source directory. - In all modes except PINNED,
mantis-summary.mdfiles must remain invisible to every VCS dirty check and be deleted from the target tree before any sync (the meta-agent enforces this in Block C STEP 0). Never let a summary make the tree look dirty.
Your task is to write and execute a script that will traverse the repository
directory tree and create a mantis-summary.md file in each directory
containing source code.
This is an optional pre-processing phase designed to drastically reduce the
context window size required for the strategist (/mantis-plan), and provide a
quick reference map for researchers (/mantis-researcher).
Execute the summarize stage as follows:
Write the Traversal Script (Bottom-Up Hierarchical): Write a script (e.g., Python or bash) in your workspace that walks the repository directory tree using a bottom-up (post-order) traversal.
- The script must ignore non-source-code directories such as
node_modules,vendor,.git, build outputs, andtests/. - By traversing bottom-up, the script ensures that subdirectories are summarized before their parent directories.
- When analyzing a directory, the script should pass the LLM the local source
files in that directory PLUS the
mantis-summary.mdfiles of its immediate subdirectories. Do not pass the raw source files of subdirectories to the parent. - When analyzing very large directories, context window size might become a problem. Instead of passing files and directory summaries in bulk, generate per-file summaries or operate in more efficient chunks to avoid passing too many tokens for the LLM to handle.
- The script must ignore non-source-code directories such as
Generate the Security Summary (Map-Reduce): The script should read
workspace/historical_learnings.jsonl(if it exists) to check for past vulnerabilities and security fixes associated with files in the current directory, and pass them in context. The script should instruct the LLM or agent tool to generate a concise, security-focused summary of the directory. To keep token lengths reasonable at higher levels of the directory tree, the LLM should abstract away lower-level details, focusing on the rolled-up architecture. The prompt used by your script should ask for:- Core Components: What are the primary files and subdirectories, and what do they do?
- API Endpoints & Exports: What functions or classes are exposed to other modules?
- Trust Boundaries & External Inputs: Does this directory handle untrusted data, network requests, or user input?
- Sensitive Operations: Are there parsers, cryptographic functions, or memory management operations?
- Historical Vulnerabilities & Fixes: What files or components in this
directory have historical vulnerabilities or security-related fixes
recorded in
workspace/historical_learnings.jsonl? Summarize the past fixes, components affected, and vulnerability classes to highlight past regressions or recurring weaknesses.
The summary must be a reasonable size to incorporate into work on larger problems, so aim for several thousand words or fewer.
- Output to
mantis-summary.md: In MODE-OFF (or HALT), writemantis-summary.mdinto the corresponding source directory (overwrite if present). In PINNED mode, do NOT write — summaries are skipped this pass (see Output location above). Never write into the read-only snapshot. - Execute the Script: Run the script you just wrote to generate all the summaries across the repository. Wait for it to finish successfully.
- Complete: Summaries are now generated. Notify the user.
When complete, notify the user.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about google/mantis
- Matheus Battisti“O Google lançou uma ferramenta que caça falhas de segurança com IA (Google Mantis)”YouTube · Jul 30, 2026 · 9.2k views
- ☕ Claude Code Cafe“🔒 コードの脆弱性を AI に探させて再現まで確かめる Google のリポジトリで公開された mantis #claude #claudecode”YouTube · Sep 8, 2026 · 647 views
- o0o0o0o“Your Tests Pass. Is Your Code Safe? Google’s AI Security Agents”YouTube · Sep 30, 2026 · 180 views
- ☕️ Claude Code Cafe“🔒 Let an Agent Find Your Security Flaws and Reproduce Them — mantis #claude #claudecode”YouTube · Sep 9, 2026 · 40 views
- 智用AI“Mantis:85% Token开销削减,AI漏洞扫描怎么做到的? #Shorts”YouTube · Sep 10, 2026 · 26 views
The biggest 5 of 46 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 46
Talked about on GitHub, YouTube and Bluesky (46 times).
On GitHub · 32
- Oct 30, 2026Design sandboxed agentic bug hunting, RCA, and novel vulnerability discovery — combustrrr/code-analysis-dashboard0 reactions
- Oct 30, 2026Epic: governed scanner and agentic analysis expansion — combustrrr/code-analysis-dashboard0 reactions
- Oct 28, 2026[radar-spike] google/mantis skills — sandbox threat-model (no CI gate) — pablontiv/a4s0 reactions
- Oct 27, 2026google 'mantis' — AI 코딩 에이전트용 취약점 자동 발견·재현·패치 툴킷 (10/26, GitHub) — roomedia/ax-trend0 reactions
- Oct 24, 2026agent-skills.github.google.mantis: 0-unstable-2026-10-22 → 0-unstable-2026-10-24 — sudosubin/agents.nix0 reactions
27 more on GitHub
- Oct 23, 2026agent-skills.github.google.mantis: 0-unstable-2026-10-17 → 0-unstable-2026-10-22 — sudosubin/agents.nix0 reactions
- Oct 17, 2026agent-skills.github.google.mantis: 0-unstable-2026-10-16 → 0-unstable-2026-10-17 — sudosubin/agents.nix0 reactions
- Oct 16, 2026agent-skills.github.google.mantis: 0-unstable-2026-10-15 → 0-unstable-2026-10-16 — sudosubin/agents.nix0 reactions
- Oct 15, 2026agent-skills.github.google.mantis: 0-unstable-2026-10-14 → 0-unstable-2026-10-15 — sudosubin/agents.nix0 reactions
- Oct 14, 2026feat: SAST — LLM alert triage of CodeQL and Semgrep findings with human sign-off (PR/CI, Advanced) — sparkgeo/github-actions0 reactions
- Oct 14, 2026agent-skills.github.google.mantis: 0-unstable-2026-10-13 → 0-unstable-2026-10-14 — sudosubin/agents.nix0 reactions
- Oct 13, 2026agent-skills.github.google.mantis: 52093f7 → 49ab993 — sudosubin/agents.nix0 reactions
- Oct 13, 2026agent-skills.github.google.mantis: 0-unstable-2026-10-05 → 0-unstable-2026-10-13 — sudosubin/agents.nix0 reactions
- Oct 5, 2026agent-skills.github.google.mantis: 76bf653 → f671cd8 — sudosubin/agents.nix0 reactions
- Oct 5, 2026agent-skills.github.google.mantis: 0-unstable-2026-10-04 → 0-unstable-2026-10-05 — sudosubin/agents.nix0 reactions
- Oct 5, 2026agent-skills.github.google.mantis: 30447e1 → f5656dd — sudosubin/agents.nix0 reactions
- Oct 5, 2026agent-skills.github.google.mantis: f48a85e → 30447e1 — sudosubin/agents.nix0 reactions
- Oct 4, 2026Update skill: /google-mantis-patch (high risk) — aiskillstore/marketplace0 reactions
- Oct 4, 2026Update skill: /google-mantis-meta-agent (critical risk) — aiskillstore/marketplace0 reactions
- Oct 4, 2026Update skill: /google-mantis-dedupe (high risk) — aiskillstore/marketplace0 reactions
- Oct 4, 2026Update skill: /google-mantis-threat-model (low risk) — aiskillstore/marketplace0 reactions
- Oct 4, 2026Update skill: /google-mantis-history (medium risk) — aiskillstore/marketplace0 reactions
- Oct 4, 2026Update skill: /google-mantis-structural-index (high risk) — aiskillstore/marketplace0 reactions
- Oct 4, 2026Update skill: /google-mantis-calibrate (high risk) — aiskillstore/marketplace0 reactions
- Oct 4, 2026agent-skills.github.google.mantis: 0-unstable-2026-09-28 → 0-unstable-2026-10-04 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.google.mantis: 0-unstable-2026-09-18 → 0-unstable-2026-09-28 — sudosubin/agents.nix0 reactions
- Sep 27, 2026agent-skills.github.google.mantis: init at 0-unstable-2026-09-18 — sudosubin/agents.nix0 reactions
- Sep 22, 2026fix(rust): patch parameter bounds validation bugs to avoid panic — morrowc/mrtparser0 reactions
- Sep 22, 2026fix(cpp): add minimal bound checks for packet lengths — morrowc/mrtparser0 reactions
- Sep 11, 2026mode — chogng/ash0 reactions
- Jul 27, 2026Integrate Google Mantis Skills as CRSs — ossf/oss-crs0 reactions · 1 comment
- Jul 3, 2026Add Google Mantis — agentic AI security review pipeline — ottosulin/awesome-ai-security0 reactions
On YouTube · 9
- Jul 30, 2026O Google lançou uma ferramenta que caça falhas de segurança com IA (Google Mantis) — Matheus Battisti - Hora de Codar9.2k views · 29 comments
- Sep 8, 2026🔒 コードの脆弱性を AI に探させて再現まで確かめる Google のリポジトリで公開された mantis #claude #claudecode — ☕ Claude Code Cafe647 views
- Sep 30, 2026Your Tests Pass. Is Your Code Safe? Google’s AI Security Agents — o0o0o0o180 views
- Sep 9, 2026🔒 Let an Agent Find Your Security Flaws and Reproduce Them — mantis #claude #claudecode — ☕️ Claude Code Cafe40 views
- Sep 10, 2026Mantis:85% Token开销削减,AI漏洞扫描怎么做到的? #Shorts — 智用AIsays it tested it26 views
4 more on YouTube
- Sep 3, 2026今日のAI実用ニュース4選:Slack・Skills・動画理解・WebGPU【9月3日】 — 毎日最速AIニュース21 views
- Sep 10, 2026Mantis:85% Token开销削减,AI漏洞扫描怎么做到的? — 智用AIsays it tested it19 views
- Jul 15, 2026Developer tools and hidden risk & Enterprise agents need real infrastructure - AI News (Jul 15, 2... — The Automated Daily9 views
- Sep 3, 2026Googleの新Skills「Mantis」公開、本番PCで試すな #Shorts — 毎日最速AIニュース5 views
On Bluesky · 5
- Sep 15, 2026Mantis : toolkit open source de Google pour agents de coding, conçu pour trouver, reproduire et corriger des vulnérabilités de façon… — @camilleroux.com3 likes and reposts · 1 reply
- Oct 1, 2026GitHub - google/mantis: A modular, stack-agnostic toolkit for AI coding agents to autonomously find, reproduce, and patch vulnerabilities.… — @tech-trending.bsky.social1 likes and repost
- Sep 23, 2026#ばばさん通信ダイジェスト 賛否関わらず話題になった/なりそうなものを共有しています。 GitHub - google/mantis: A modular, stack-agnostic toolkit for AI coding agents to autonomously… — @netmarkjp.bsky.social1 likes and repost
- Jul 3, 2026Three repos that are leading our path forward in scaling AppSec workflows: 1. github.com/google/mantis 2. github.com/anthropics/d... 3.… — @javanrasokat.bsky.social1 likes and repost
- Oct 1, 2026🤖 GitHub - google/mantis: A modular, stack-agnostic toolkit for AI coding agents to autonomously find,... 要約:… — @ai-bs-bot.bsky.social0 likes and reposts · 1 reply
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- mantis-configureSkill
- mantis-launchSkill
- mantis-adviseSkill
- mantis-architectureSkill
- mantis-calibrateSkill
- mantis-chainSkill
- mantis-criticSkill
- mantis-dedupeSkill
- mantis-historySkill
- mantis-meta-agentSkill
- mantis-patchSkill
- mantis-pipeline-adapterSkill
- mantis-planSkill
- mantis-reflectSkill
- mantis-reportSkill
- mantis-reproduceSkill
- mantis-researcherSkill
- mantis-reviewSkill
- mantis-structural-indexSkill
- mantis-threat-modelSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

