prompt-guard

A detector for prompt injection, which is text designed to manipulate an AI agent into ignoring its instructions or taking unwanted actions. It scans content in a knowledge graph and labels findings as dangerous, suspicious, or safe.

In plain words
What is it for?
Use it to audit user-submitted graph content for role overrides, jailbreak attempts, hidden characters, encoding tricks, and similar patterns.
Why use it?
It helps identify hostile or misleading text before that text reaches another agent or tool.

Skill for Claude CodeCodex

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/apiliumcode/mayros/prompt-guard
Any agent
npx skills add ApiliumCode/mayros --skill prompt-guard
Clone the repo
git clone --depth 1 https://github.com/ApiliumCode/mayros

Made for: Claude Code, Codex.

Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 408 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.00015 $0.00408
Opus 5 $0.00008 $0.00204
Sonnet 5 $0.00003 $0.00082
Haiku 4.5 $0.00002 $0.00041

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

Security

Grade A, and why

prompt-guard 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 3d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (skill.test.ts, skill.ts, types.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/official/prompt-guard/SKILL.md · 51 lines

What it actually says

prompt-guard

Detects prompt injection patterns in graph content and classifies findings by risk level.

When to Use

Use this skill when:

  • Inspecting user-submitted text stored in the knowledge graph for injection attempts
  • Auditing graph content before it reaches downstream agents or tools
  • Monitoring for adversarial inputs such as role overrides, encoding evasion, or jailbreak prompts

Risk Classification

Each finding is classified into one of three levels:

  • dangerous -- Active injection attempts (role overrides, system overrides, jailbreak, shell commands)
  • suspicious -- Evasion techniques or anomalies (zero-width characters, homoglyphs, encoding tricks, template injection)
  • safe -- No injection patterns detected

The overall classification for a scanned item is dangerous if any dangerous finding exists, suspicious if only suspicious findings exist, and safe otherwise.

Instructions

  1. Store text content in the graph using skill_assert or skill_graph_query
  2. Query with predicate guard:scan-result to trigger the prompt-guard runtime
  3. The skill enriches each result with a classification field and a findings array
  4. Use guard:injection-detected (with proof) to record confirmed injection attempts
  5. Query guard:history to review past scan results for the current agent
Files

What ships with it

9 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. 3d ago First seen · 51 lines · 15 tokens per session scan A fd2b4dffbb35

Subscribe to this mod's changes

prompt-guard is a skill published in the GitHub repository ApiliumCode/mayros (12 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 408 once invoked, about $0.0001 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.