immune-scan

immune-scan is an agent for coding agents from Mnemoclaw/immune. It costs 3 tokens per session (1,500 once invoked), scanned A, original, MIT.

A content checker that looks for known error patterns, finds new problems, and spots useful strategies worth recording.

In plain words
What is it for?
Reviewing text or other content for errors, suggesting corrections, and reporting reusable problem patterns.
Why use it?
It helps catch repeated mistakes and newly discovered issues while keeping results in a fixed JSON format.

Agent

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 agents/mnemoclaw/immune/immune-scan
Clone the repo
git clone --depth 1 https://github.com/Mnemoclaw/immune

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 immune-scan

README.md
[![agentmods](https://agentmods.dev/badge/agents/mnemoclaw/immune/immune-scan.svg)](https://agentmods.dev/agents/mnemoclaw/immune/immune-scan)
Your own site
<a href="https://agentmods.dev/agents/mnemoclaw/immune/immune-scan"><img src="https://agentmods.dev/badge/agents/mnemoclaw/immune/immune-scan.svg" alt="Measured on agentmods" height="20"></a>
Per session 3 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,500 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00003 $0.01500
Opus 5 $0.00002 $0.00750
Sonnet 5 $0.00001 $0.00300
Haiku 4.5 $0.00000 $0.00150

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

Security

Grade A, and why

immune-scan 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 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.

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.

agents/immune-scan.md · 133 lines

How it starts

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

Execute these phases in order:

The cold_summary lists dormant patterns the system already knows about. When you detect something that clearly overlaps with a cold pattern, report it as a new threat anyway; the orchestrator handles deduplication regardless of COLD overlap.

When cheatsheet_applied is provided, evaluate whether each applied strategy was effective in this context. Limit reports to strategies that constitute a novel addition to the cheatsheet.

<output_format> Return solely this JSON structure, free of markdown fences and free of commentary:

{ "scan_result": "clean|corrected|flagged", "corrections_applied": [ { "antibody_id": "AB-XXX", "original": "what was in the content", "corrected": "what it should be replaced with", "reason": "why this antibody matched" } ], "new_threats_detected": [ { "pattern": "description of the detected issue", "severity": "critical|warning|info", "location": "where in the content this occurs", "suggested_correction": "how to fix it", "recommended_antibody": { "domains": ["domain tag"], "pattern": "generalized pattern for future detection", "severity": "critical|warning|info", "correction": "generalized correction" } } ], "_antibody_phrasing_rule": { "rule": "Both pattern and correction fields describe EXCLUSIVELY the SAFE/DESIRED action. Affirmative framing only: imperatives, action verbs, target state. Empirical reason: a pattern describing a destructive action tends to be reproduced by the LLM when injected in pre-generation sysprompt (prompt negative trap — confirmed via AgentWorld benchmark, MC-008 lost 15 points when the LLM reproduced a destructive command seen in injected context).", "good_examples": [ "Preserve WhatsApp session via docker compose restart (creds bind-mounted on config/credentials/)", "Load secrets via environment variables or secrets manager exclusively", "Sanitize user data via escapeHtml() or textContent before DOM insertion", "Auth functions must enforce explicit failure paths: if (!token) return false; if (!verify(token)) return false; return true" ], "rule_for_correction": "The correction field follows the SAME positive-framing rule. Both pattern and correction qualify as safe to inject in pre-generation sysprompt." }, "new_strategies_detected": [ { "pattern": "description of the effective strategy", "example": "concrete example from the content", "domains": ["domain tag"], "effectiveness": 0.5 } ], "corrected_output": "the full corrected content (or original if clean)", "scan_summary": "one-line summary of scan results" }

Read the full file on GitHub · 133 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. 5d ago First seen · 133 lines · 3 tokens per session scan A 8fb71bbaf41d

Subscribe to this mod's changes

immune-scan is an agent published in the GitHub repository Mnemoclaw/immune (12 stars, last pushed 6d ago), licensed MIT. It adds 3 tokens to every session and 1,500 once invoked, about $0.0000 per session on Opus 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.