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.
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.
git clone --depth 1 https://github.com/google/mantisnpx agentmods add skills/google/mantis/mantis-architectureWrote 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.
[](https://agentmods.dev/skills/google/mantis/mantis-architecture)<a href="https://agentmods.dev/skills/google/mantis/mantis-architecture"><img src="https://agentmods.dev/badge/skills/google/mantis/mantis-architecture/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.
<a href="https://agentmods.dev/skills/google/mantis/mantis-architecture"><img src="https://agentmods.dev/badge/skills/google/mantis/mantis-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Prompt Injection · line 63 Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.05258 |
| Opus 5.5 | $0.00022 | $0.02103 |
| Sonnet 5.5 | $0.00011 | $0.01052 |
| Haiku 4.5 | $0.00006 | $0.00526 |
Grade A, and why
mantis-architecture 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.
How it starts
The opening of the file, as written. The whole thing — 355 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Architect (/mantis-architecture)
System Goal
Knowledge Base Synthesizer. Translates ephemeral insights from the learnings
queue (workspace/learnings.jsonl) and structural analysis of the codebase into
a canonical, interlinked Markdown Knowledge Base (workspace/kb/).
Command Definition
- Command:
/mantis-architecture - Description: Builds the foundation of the KB by defining system architecture, mapping specific entities (components), and categorizing historical vulnerability patterns.
- Arguments (all optional; resolved by LOCATOR RESOLUTION / Block A):
--snapshot_root=<dir>(or theSNAPSHOT_ROOTenv var) — the pinned code snapshot to read target source from;--snapshot_id=<id>— theSNAPSHOT_IDof that snapshot;--state_root=<dir>— the parent ofworkspace/for all state and KB paths;--target_root=<dir>— an already-prepared tree that OVERRIDES the snapshot (rarely passed to this stage). When none are passed, behavior is byte-for-byte today's (degraded/unpinned): read source from the current directory and treatsnapshot_pinnedas false.
Input/Output Contract
- Reads:
workspace/learnings.jsonl(raw insights from the current round).workspace/historical_learnings.jsonl(optional, past vulnerability metadata).- Codebase directory structure and key source files.
- Existing Markdown files in
workspace/kb/(to validate/decay check). workspace/.mantis_state.json(to retrieve pass count).workspace/.mantis_state.json→active_snapshot(root,snapshot_id,snapshot_pinned) andsnapshot_history— provenance for the KB freshness gate (step 0b). Read the snapshot from STATE ONLY; NEVER run a live VCS command (git/hg/repo) to decide KB currency.workspace/.mantis_state.json→kb_snapshot_id(theSNAPSHOT_IDthe current KB was last built against; absent on a first/legacy KB).workspace/.mantis_state.json→changed_filesandchanged_files_status(written by mantis-plan's Block E; consumed by the scoped KB invalidation in step 0b outcome 3. Present from pass 2 on, but may be stale (written in a prior pass) — the scoped path checkschanged_files_passagainststate.pass_numberand falls back to full rebuild if they differ.)
- Writes:
- Markdown files under
workspace/kb/(architecture.md,entities/[component_name].md,vulnerabilities/[CWE-ID].md,index.md). workspace/kb/dependencies.json— a JSON map of import/dependency edges extracted during architectural analysis (keys = source file paths relative to CODE_ROOT; values = arrays of files that import/depend on the key file). This is consumed bymantis-plan's dependency-aware fan-out (Phase 2). If the codebase has no parseable import structure, write{}. Re-derive only changed entries during scoped invalidation (see outcome 3 below).- Archives
workspace/learnings.jsonltoworkspace/archive/learnings/learnings_pass_${N}_${X}.jsonl. - A
<!-- KB_SNAPSHOT: <SNAPSHOT_ID> -->marker as the FIRST line of every (re)written KB file (index.md, eachentities/*.md, eachvulnerabilities/*.md), pluskb_snapshot_id=SNAPSHOT_IDinworkspace/.mantis_state.json. - An immutable per-pass copy of the whole KB tree to
workspace/archive/kb/kb_pass_${N}_${X}/(so a later reverted fix cannot silently erase the record of what the KB claimed at pass N).
- Markdown files under
- Preconditions:
workspace/learnings.jsonlmust exist.
- Idempotency Guarantee:
- Transactional: moves
workspace/learnings.jsonlto archive only after programmatically verifying all KB Markdown updates were written successfully. KB files are overwritten in-place. - Snapshot stamping is part of the same transaction: the
KB_SNAPSHOTmarkers, the per-passworkspace/archive/kb/kb_pass_${N}_${X_kb}/copy, and thekb_snapshot_idstate write complete before (or together with) the learnings move. On any failure, leaveworkspace/learnings.jsonlintact.
- Transactional: moves
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.
- 1mo ago First seen · 355 lines · 56 tokens per session scan A ba3bdd4da77a
mantis-architecture is a skill published in the GitHub repository google/mantis (2,525 stars, last pushed today), licensed Apache-2.0. It adds 56 tokens to every session and 5,258 once invoked, about $0.0002 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.
Other skills, from other repositories
agentic-memory-architect
Expert guide for long-term episodic memory integration (Mem0 v2, Letta/MemGPT, Zep v2), memory tier architecture, pgvector HNSW storage, and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang (Mem0 v2, Letta/MemGPT, Zep v2), arsitektur tier memori…
context-window-engineer
Expert guide for engineering and optimizing ultra-large context windows (2M+ tokens) across Gemini 4 Pro, Claude 5.5, and GPT Astra 6 — context partitioning, retrieval-augmented context injection, sliding window strategies, and cost-aware token budgeting / Panduan ahli rekayasa dan optimasi context window ultra-besar…
session-memory-manager
Manages the entire session lifecycle: from context loading (PRD, Tech Stack) at startup, to maintaining project memory during active sessions, and creating ultra-compact checkpoints for handoff. / Mengelola siklus hidup sesi: dari pemuatan konteks awal, pemeliharaan memori proyek, hingga pembuatan checkpoint ringkas…
PheroPath
A filesystem-based stigmergy communication protocol. Use this to leave invisible "pheromones" (signals) on files to communicate context, risks, or status to other agents or your future self without modifying file content.
mem0-vercel-ai-sdk
Mem0 provider for Vercel AI SDK (@mem0/vercel-ai-provider). TRIGGER when: user mentions "vercel ai sdk", "@mem0/vercel-ai-provider", "createMem0", "retrieveMemories", "addMemories", "getMemories", "searchMemories", "mem0 vercel", "AI SDK provider", "AI SDK memory", or is using generateText/streamText with mem0. Also…
ai-agent-evaluation-benchmarking
Autonomous AI agent benchmark evaluation register: task completion rates, planning accuracy, tool invocation precision, and cost benchmarks.