mantis-pipeline-adapter

mantis-pipeline-adapter is a skill for Claude Code, Codex from google/mantis. It costs 50 tokens per session (15,328 once invoked), scanned C, original, Apache-2.0.

An interactive guide for designing and implementing a custom deterministic orchestrator harness for Mantis skills. A harness is code that reliably runs a pipeline and tracks its state.

In plain words
What is it for?
It helps plan custom pipeline steps, configurations, state tracking, findings storage, memory rotation, and version-control snapshot handling.
Why use it?
It helps when the default Mantis pipeline does not fit a project’s environment or integration needs.

Skill for Claude CodeCodex

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 · 927 stars · on GitHub

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-pipeline-adapter
Any agent
npx skills add google/mantis --skill mantis-pipeline-adapter
Clone the repo
git clone --depth 1 https://github.com/google/mantis

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-pipeline-adapter

README.md
[![agentmods](https://agentmods.dev/badge/skills/google/mantis/mantis-pipeline-adapter.svg)](https://agentmods.dev/skills/google/mantis/mantis-pipeline-adapter)
Your own site
<a href="https://agentmods.dev/skills/google/mantis/mantis-pipeline-adapter"><img src="https://agentmods.dev/badge/skills/google/mantis/mantis-pipeline-adapter.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 15,328 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00050 $0.15328
Opus 5 $0.00025 $0.07664
Sonnet 5 $0.00010 $0.03066
Haiku 4.5 $0.00005 $0.01533

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

Security

Grade C, and why

mantis-pipeline-adapter scanned grade C with 1 finding 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 5d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

(`rm -rf` for copies, `git worktree remove/prune` for worktrees).
mantis-pipeline-adapter/SKILL.md · 1,182 lines

How it starts

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

Mantis Pipeline Designer (/mantis-pipeline-adapter)

System Goal

Interactive Pipeline Design Consultant. Assists the user in designing and implementing their own deterministic orchestrator harness for Mantis Skills. Helps the user apply best practices for reliability, token efficiency, and custom environment integration.

Command Definition

  • Command: /mantis-pipeline-adapter
  • Description: Interactively guides the design and implementation of custom deterministic orchestrator harnesses.

Input/Output Contract

  • Reads:
    • workspace/.mantis_state.json (to track current loop pass).
    • workspace/.mantis_state.json fields active_snapshot, snapshot_history, and vcs_info.snapshot_id — the per-pass snapshot pin, present only when the target harness has opted into sync (absent on today's single-snapshot runs; see Reference Architecture Guideline 5).
    • schema.json (as the canonical pipeline specification reference).
    • workspace/findings/*.json (as the State Store).
    • workspace/learnings.jsonl (to understand memory rotation).
    • User's interactive configuration input.
  • Writes:
    • Outputs user-customized orchestrator harness code, configurations, or architecture documentation.
  • Preconditions:
    • User initiates interactive design session.
  • Idempotency Guarantee:
    • As a consulting agent, it advises the user to implement idempotency in their custom harness using three primary mechanisms: (1) state store synchronization, (2) atomic transactional file/VCS operations, and (3) proper locks (e.g. database/file level locks).

Instructions

Interactively guide the user in designing and building a deterministic pipeline that wraps Mantis Skills.

Follow these guidelines during the consultation:

  1. Understand User Context: Ask about their target programming language, agent framework (if any), execution environments (VMs, local containers, physical hardware), and scale requirements.
  2. Recommend Core Principles: Guide them to implement the reference architecture patterns (detailed below), specifically emphasizing:
    • Deterministic Orchestration: Use code (not LLM) for control flow.
    • State Store: Use a database or structured filesystem as the single source of truth.
    • Token Efficiency: Use the UUID-based referencing pattern to avoid LLM text duplication.
    • Custom Environment Integration: Use Custom MCP servers for isolated testing (VMs) or hardware interaction.
  3. Ensure Schema Consistency: Advise the user to strictly adhere to the inter-stage data contracts defined in schema.json when building their harness.
  4. Adaptive Design: Help them draft the code/architecture tailored to their specific stack, rather than imposing a rigid template.
  5. Advise on Scale and Concurrency: If they have high-scale needs, guide them on decomposing the pipeline and implementing locking mechanisms to prevent race conditions.
  6. Suggest Evaluations: Remind them to perform empirical evaluations when choosing cheaper models for utility stages.
  7. Advise the Pass Lifecycle Contract (living / synced codebases): If the user wants their harness to continue a run after the target code changes, or to sync the target repo at the start of a new pass, walk them through the harness-agnostic Pass Lifecycle Contract in Reference Architecture Guideline 5 below. Emphasize that this support is opt-in: a harness that does not implement the contract MUST leave snapshot_pinned unset, which preserves today's single-snapshot behavior byte-for-byte. When --sync is requested, the harness PINs in the PIN step and passes --snapshot_root/--snapshot_id normally; Block A (Locator Resolution) is universal across all code-reading stages.
  8. Advise on Semantic Retrieval at Scale: If the user is targeting a large codebase (e.g., thousands of source files, multi-pass campaigns, or multiple teams contributing findings), walk them through the optional semantic retrieval patterns in Reference Architecture Guidelines 6 and 7 below. Emphasize that these are opt-in: they augment the pipeline via a dedicated query skill or MCP tools, but never modify the existing skills' own deterministic logic or fail-safe invariants.
  9. Advise on SAST Seeding: If the user wants to augment LLM-based discovery with external SAST tool findings (CodeQL, Semgrep, etc.), walk them through the optional SAST seeding pattern in Reference Architecture Guideline 8 below. Emphasize that this is opt-in: it ingests external findings as candidates that must earn their verdict through unchanged downstream gates, and it follows exactly the RAG pattern (provenance-tracked, snapshot-aware, fallback on failure).
  10. Advise on Structural Code Indexing: If the user is targeting a large codebase where grep-based call-site discovery is unreliable, walk them through the optional structural code index stage in Reference Architecture Guideline 9 below. Emphasize that this is an optional first-class stage: it provides structural context (function boundaries, call graphs) to improve LLM reasoning, runs after the snapshot is pinned and before the first code-reading analysis stage, and degrades gracefully to grep when unavailable.
  11. Advise on Tiered Iterative Reproduction & Multi-Conversation Retries: If the user is targeting complex services where single-shot repro is brittle, walk them through the tiered iterative reproduction strategy and multi-conversation retry pattern in Reference Architecture Guideline 10.

Read the full file on GitHub · 1,182 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 1,182 lines · 50 tokens per session scan C 8297dc5e5872

Subscribe to this mod's changes

mantis-pipeline-adapter is a skill published in the GitHub repository google/mantis (927 stars, last pushed 2d ago), licensed Apache-2.0. It adds 50 tokens to every session and 15,328 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.