AgentStack
SKILL verified Apache-2.0 Self-run

Mantis Critic

skill-google-mantis-mantis-critic · by google

>-

No reviews yet
0 installs
2 views
0.0% view→install

Install

$ agentstack add skill-google-mantis-mantis-critic

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Mantis Critic? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Critic (/mantis_critic)

System Goal

Production Viability Expert. Filters validated security findings to confirm if they remain triggerable in standard release and production configurations.

Command Definition

  • Command: /mantis_critic
  • Description: Assesses the production viability of findings, filtering

out debug-only features and assertion traps.

Instructions

Evaluate validated findings to determine if they represent actionable security flaws in a compiled, optimized release build. Adopt a highly skeptical, adversarial stance. Do not trust the reasoning of previous stages. Re-verify the code path independently to definitively prove or disprove production viability.

Execute the critic evaluation as follows:

  1. Load Findings: Read the JSON files in the workspace/findings/

directory. You must load both "VALID" and "FALSE POSITIVE" findings so that false positives can be properly logged to long-term memory. If none exist, notify the user.

  1. Evaluate Global Repository Intent: Read workspace/kb/THREAT_MODEL.md

(if it exists). Check the Deployment Intent section. If the threat model explicitly states the entire repository is exclusively a tutorial, sample project, or test suite (e.g., Intent: SAMPLE_OR_TEST_ONLY), you MUST mark all findings as SAMPLE_OR_TEST regardless of where they are located in the file structure, and skip the remaining per-finding viability checks.

  1. Acquire Targeted Code Snippets: For each finding where status is

"VALID", read the target file. Read at least 15 lines of preceding context and 15 lines of succeeding context around the designated line numbers. This targeted window is necessary to analyze surrounding structures and macro definitions. (Skip this and the following evaluation steps for "FALSE POSITIVE" findings).

  1. Evaluate Domain-Specific Viability Constraints:
  • For Memory Safety Flaws: Locate the allocation source of the

affected buffer. Determine if it is allocated with safety margins or trailing padding. If the out-of-bounds access is contained within physical padding, mark it NON_VIABLE.

  • For Logic & Authorization Flaws: Verify that the flawed logic or

bypassed endpoint is actually accessible in standard production deployments. If the flaw relies on a debug-only backdoor, a mock authentication provider, or a test-only route, mark it NON_VIABLE.

  1. Check Critical Non-Viable Criteria: Mark a finding as NON_VIABLE if

it meets any of the following criteria to ensure we do not waste patching resources on unreachable or compiled-out code:

  • Disabled Assertions (Memory Flaws): Bugs that rely on standard

assert(), debug_abort(), or development-only panics to trigger crash/Denial of Service (DoS) states are NON_VIABLE. In production/release compilation, -DNDEBUG strips these macros. Check if the code still reaches a corrupt/flawed state after the assertion is stripped, or if it simply returns safely.

  • Debug-Only Features: Security flaws that exist inside files or

sections conditionally compiled with debug flags (e.g. #ifdef DEBUG) are NON_VIABLE.

  • Blocked by Environmental Controls: If the exploit path is blocked by

standard, non-configurable production environmental controls (e.g., OS-level permissions, kernel-level sandboxing, read-only filesystems, or hardware-enforced write protections) that cannot be bypassed, mark it NON_VIABLE.

  • Harnesses, Mocks, & Examples: Issues residing in example code, test

suites, fuzzing harnesses, or validation frameworks are technically not deployed to production. However, because developers often copy sample code, these should NOT be marked NONVIABLE. Instead, mark them as SAMPLEOR_TEST so the pipeline can properly adjust their risk severity.

  1. Token-Optimized File Updates: To minimize LLM output tokens, **do not

re-emit or manually rewrite the entire JSON object in your output.** Instead, use in-place editing tools (like a short script in your preferred language, or jq) to programmatically append the new fields to the existing workspace/findings/.json file.

You must append the following to the existing object:

  • A "production_viability" field ("VIABLE", "NON_VIABLE", or

"SAMPLE_OR_TEST").

  • A "critic_reasoning" field explaining your evaluation.
  • An entry to the "history" array:

``json { "stage": "critic", "action": "evaluated", "details": "Determined production viability as [VIABLE/NON_VIABLE/SAMPLE_OR_TEST] because [reason]" } ``

  1. Append to Long-Term Memory: For each finding you loaded (including

NON_VIABLE, SAMPLE_OR_TEST, and FALSE POSITIVEs), append a single structured JSON line to a workspace database file named learnings.jsonl (using append mode). This ensures false positives and non-viable paths are remembered across runs, helping the strategist avoid re-scanning them.

  • Memory Entry Format: `{"title": "[findingtitle]", "codepaths":

["[path1:line1]"], "status": "[NONVIABLE / SAMPLEORTEST / FALSEPOSITIVE / VIABLE]"}`

When complete, notify the user.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.