mantis-advise

Queries a SQLite security knowledge base to provide threat models and verified patch guidance for code edits.

865|94|Updated Jun 15, 2026
One-click install
npx skills add https://github.com/google/mantis --skill mantis-advise
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mantis-advise
Source: https://github.com/google/mantis/tree/main/mantis-advise
Command: npx skills add https://github.com/google/mantis --skill mantis-advise

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Developers and coding agents often repeat past security mistakes because historical vulnerability context is scattered or lost. This Skill surfaces threat models, confirmed vulnerability lineages, verified patch patterns, and triaged false positives from a central SQLite knowledge base before and during code edits, preventing recurrence of known flaws.

Core Features & Use Cases

  • Pre-Implementation Advisory: Query security guidance for any target file to see trust boundaries, historical pitfalls, and verified safe idioms before writing code.
  • Lineage & Recurrence Tracking: Look up a specific vulnerability lineage UUID or content signature to understand how a bug occurred, recurred, and was resolved.
  • Machine-Readable Output: Emit structured JSON advisories for integration into agent harnesses and CI pipelines.
  • Use Case: Before refactoring an authentication module, run the advisor against src/auth.py to review prior injection findings, verified patch diffs, and intentional design decisions flagged as false positives.

Quick Start

Ask the agent to run the mantis-advise security advisor on your target file, for example by requesting a security advisory for src/auth.py before making changes.

Frequently Asked Questions about mantis-advise

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get security guidance for a file before editing it?

Run python3 reference/scripts/advise.py --file <target_file> from the repository root. The script queries the Mantis SQLite knowledge base and prints an advisory with threat models, historical vulnerabilities, verified patches, and false positive context for that file.

How do I query a specific vulnerability lineage or recurrence?

Use the --lineage flag with a lineage UUID, or --signature with a content signature hash, when running advise.py. This returns the lifecycle and recurrence history for that specific bug chain.

Can I get machine-readable JSON output from the security advisor?

Yes, add the --json flag to the advise.py command to emit structured JSON instead of formatted markdown. This is intended for consumption by agent harnesses and automated pipelines.

Where does the advisor store threat models and findings?

All knowledge lives in a SQLite database named knowledge.db, which the script auto-discovers in the repository root or workspace directory. It reads the findings, campaign_artifacts, learnings, and risk_scores tables rather than flat files on disk.

When should I not use this security advisor?

Do not use it for automated multi-pass red-team exploitation or fuzzing, as stated in its description. It is a guardrail and advisory tool for secure development, not an offensive exploitation framework.