mantis-advise
БесплатноБез исполняемых скриптовНе проверенProactive security advisor and architectural remediation assistant for secure code development. Use to query threat models, historical vulnerability lineages…
от google★ 2 881 звезда на GitHubОб этом скилле
Security Advisor & Remediation Engine (/mantis-advise)
System Goal
Proactive Secure Development & Architectural Remediation Engine. Functions as a security guardrail, advisory assistant, and architectural remediator for developers and coding agents. Queries Mantis threat models, historical vulnerability lineages, verified remediation patterns, triaged false positives, and learned trajectory invariants to ensure that new code and refactors are implemented securely from the start, and to synthesize robust architectural remediations for confirmed vulnerabilities.
Command Definition
- Command:
/mantis-advise - Description: Queries security knowledge for a given target file or module, evaluates proposed changes against known threat boundaries, and provides verified secure implementation guidance or architectural remediation plans.
- Execution Command:
python3 "${MANTIS_HOME:-/path/to/mantis}/reference/scripts/advise.py" --file <target_file> [--db knowledge.db] - Arguments (optional):
--file/-f(or--target/-t): Target source file or component path (e.g.src/auth.pyorapi/app.py). Defaults to repo-wide scope if omitted.--remediate/-r: Finding ID, lineage UUID, or file to generate an architectural remediation dossier and verification plan for.--db/-d: Path to Mantis SQLite database (default: auto-discoversknowledge.dborworkspace/knowledge.db).--lineage/-l: Query lifecycle and recurrence for a specific lineage UUID.--signature/-s: Query lifecycle for a specific content signature hash.--json: Emit structured JSON output instead of formatted markdown.--full: Emit unabridged OKF markdown bodies and un-truncated diffs.
How to Fetch Guidance
All Mantis knowledge (threat models, historical findings, verified patches,
triaged false positives, and learned invariants) lives in the SQLite database
(knowledge.db). Do not look for flat files on disk (like learnings.jsonl or
workspace/findings/*.json). Use one of the two execution doors below:
Mechanism 1: CLI Execution (Recommended for Coding Agents)
Coding agents with standard bash access should run advise.py using its
installation-anchored absolute path.
Path Anchoring Requirement (CRITICAL): The advisor script resides within the
Mantis installation directory at reference/scripts/advise.py. You MUST
invoke this script via an absolute path or via $MANTIS_HOME. NEVER execute
python3 reference/scripts/advise.py using a relative path inside the audited
target repository, as untrusted repositories could spoof scripts or cause
command failures.
Query Security Guidance for Target File:
python3 "$MANTIS_HOME/reference/scripts/advise.py" --file src/auth.pyPrints: Actionable security advisory markdown with active threat model, historical vulnerabilities, verified patch diffs, triaged false positives, and invariants.
Query Specific Bug Lineage & Recurrence:
python3 "$MANTIS_HOME/reference/scripts/advise.py" --lineage c3a5e982-1234-5678-9abc-def012345678Machine-Readable JSON:
python3 "$MANTIS_HOME/reference/scripts/advise.py" --file src/auth.py --jsonArchitectural Remediation Dossier for a Finding:
python3 "$MANTIS_HOME/reference/scripts/advise.py" --remediate <finding_id>
Mechanism 2: Python Tool Invocation (Inside Pipeline / Harness)
When running inside an agent harness or Python environment:
from core.database import query_security_guidance
guidance = query_security_guidance(db_path="knowledge.db", filepath="src/auth.py")
print(guidance["guidance_summary"])
Or via tool helper:
get_security_guidance(filepath="src/auth.py")
Input/Output Contract
- Reads:
knowledge.db(findings,campaign_artifacts,learnings, andrisk_scorestables).- Target source code files (under repository root).
- Writes:
- Structured Security Advisory & Guardrail recommendations formatted for the active developer or coding agent.
Core Advisory Protocols
Protocol 1: Pre-Implementation Security Context Check
Before authoring code or refactoring an existing module:
- Run the Advisor: Execute
python3 "$MANTIS_HOME/reference/scripts/advise.py" --file <target_file>. - Review Advisory Context:
- Trust Boundaries: Identify who interacts with this module (untrusted public internet, authenticated users, internal microservices).
- Historical Pitfalls: Review all vulnerabilities previously confirmed or
reproduced on this file. Pay specific attention to recurring
lineage_idchains. - Verified Safe Idioms: Review verified patch diffs from prior passes
marked
VERIFIED_SECURE. - Triaged False Positives: Review patterns previously classified as false p
Установить mantis-advise в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл mantis-advise?
Proactive security advisor and architectural remediation assistant for secure code development. Use to query threat models, historical vulnerability lineages, verified patch patterns, triaged false positives, and learned trajectory invariants before code edits or to generate architectural remediation plans for confirmed findings. Don't use for automated multi-pass red-team exploitation or fuzzing.
Как установить скилл mantis-advise?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mantis-advise запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic