mantis-architecture

mantis-architecture is a skill for Claude Code, Codex from google/mantis. It costs 56 tokens per session (5,258 once invoked), scanned A, original, Apache-2.0.

A security-analysis step that turns codebase research into a linked Markdown knowledge base. A knowledge base is an organized collection of notes that connects system parts, past problems, and related findings.

In plain words
What is it for?
Use it at the start of a review cycle to build or update architecture notes, component records, and known vulnerability patterns.
Why use it?
It gives later security work a shared map of how the software is built and where weaknesses may fit.

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 review cycle to build or update architecture notes, component records, and known vulnerability patterns.

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,525 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-architecture

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/google/mantis/mantis-architecture/github.svg)](https://agentmods.dev/skills/google/mantis/mantis-architecture)
Your own site
<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.

agentmods 80×15 button for mantis-architecture

Your own site · 80×15
<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>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,258 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 warn 7 Sept 2026
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.
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.00056 $0.05258
Opus 5.5 $0.00022 $0.02103
Sonnet 5.5 $0.00011 $0.01052
Haiku 4.5 $0.00006 $0.00526

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

Security

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.

skills/mantis-architecture/SKILL.md · 355 lines

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 the SNAPSHOT_ROOT env var) — the pinned code snapshot to read target source from; --snapshot_id=<id> — the SNAPSHOT_ID of that snapshot; --state_root=<dir> — the parent of workspace/ 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 treat snapshot_pinned as 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) and snapshot_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 (the SNAPSHOT_ID the current KB was last built against; absent on a first/legacy KB).
    • workspace/.mantis_state.json → changed_files and changed_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 checks changed_files_pass against state.pass_number and 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 by mantis-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.jsonl to workspace/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, each entities/*.md, each vulnerabilities/*.md), plus kb_snapshot_id = SNAPSHOT_ID in workspace/.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).
  • Preconditions:
    • workspace/learnings.jsonl must exist.
  • Idempotency Guarantee:
    • Transactional: moves workspace/learnings.jsonl to 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_SNAPSHOT markers, the per-pass workspace/archive/kb/kb_pass_${N}_${X_kb}/ copy, and the kb_snapshot_id state write complete before (or together with) the learnings move. On any failure, leave workspace/learnings.jsonl intact.

Read the full file on GitHub · 355 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 · 355 lines · 56 tokens per session scan A ba3bdd4da77a

Subscribe to this mod's changes

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.

Related

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…

roedyrustam/vibes-plug · 112 tokens

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…

roedyrustam/vibes-plug · 124 tokens

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…

roedyrustam/vibes-plug · 77 tokens

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.

zi-yue-1129/PheroPath · 48 tokens

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…

mem0ai/mem0 · 146 tokens

ai-agent-evaluation-benchmarking

Autonomous AI agent benchmark evaluation register: task completion rates, planning accuracy, tool invocation precision, and cost benchmarks.

sickn33/agentic-awesome-skills · 31 tokens