guard

guard is a skill for Claude Code, Codex from mlawsonking/MCP. It costs 72 tokens per session (574 once invoked), scanned A, original, MIT.

A command that checks files, directories, changes, packages, or emails for secrets, risky code patterns, and prompt injection. Prompt injection is text designed to manipulate an automated agent into ignoring its instructions.

In plain words
What is it for?
Use it to scan a path or diff, inspect a package before installation, check an email file, or view recent guard findings.
Why use it?
It identifies security findings before code, packages, or email content is trusted or used.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the agent-guards plugin — 1 skill, 2 hooks shipped together

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

Made for: Claude Code, Codex.

Or install agent-guards, the plugin that ships this one along with the rest of its 1 skill, 2 hooks.

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 guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/mlawsonking/mcp/guard.svg)](https://agentmods.dev/skills/mlawsonking/mcp/guard)
Your own site
<a href="https://agentmods.dev/skills/mlawsonking/mcp/guard"><img src="https://agentmods.dev/badge/skills/mlawsonking/mcp/guard.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 574 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.00072 $0.00574
Opus 5 $0.00036 $0.00287
Sonnet 5 $0.00014 $0.00115
Haiku 4.5 $0.00007 $0.00057

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

Security

Grade A, and why

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 4d 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.

agent-guards-plugin/skills/guard/SKILL.md · 38 lines

What it actually says

Run the bundled guard command and report what it found.

The command is:

node "${CLAUDE_PLUGIN_ROOT}/bin/guard" <args>

Pick the arguments from what the user asked for. $ARGUMENTS holds what they typed after /guard.

What they asked for Arguments to use
nothing at all diff — scan what is staged in git
a file or directory path scan <path>
"diff", "my changes", "staged" diff (add --unstaged for the working tree)
a package, or "should I install X" package <name> (add --ecosystem pypi for Python)
an .eml file, or an email email <path>
"stats", "what has it caught", "this week" stats (add --days N for a different window)

Then:

  1. Run it with the Bash tool. Do not add --json unless the user asks for machine-readable output; the plain output is written to be read.
  2. Report the findings as they are. Each one carries a rule ID, a line number where there is one, and what to do about it. Keep the rule IDs in your summary: they are how someone looks a finding up or suppresses it.
  3. Read the "not checked" list at the bottom of the output and pass it on. It is not filler. A clean result from scan means the rules that exist did not match, not that the file is safe, and the user needs that distinction to decide what to do next.
  4. If the exit code is 1, findings reached the failure threshold. If it is 2, the command could not run — say what went wrong rather than reporting a clean result.

Two things to be careful about:

  • Do not paraphrase a verdict upward. If the output says caution, do not report it as a problem solved or as a pass.
  • If the user is about to install something and guard package returned danger, say so plainly and do not run the install for them.
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. 4d ago First seen · 38 lines · 72 tokens per session scan A 7ff57aa20fca

Subscribe to this mod's changes

guard is a skill published in the GitHub repository mlawsonking/MCP (0 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 574 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

myco:api-endpoint-serializer-authoring

Apply this skill when adding an endpoint to apps/api/, authoring a mutation-ack serializer, wiring ManagerFactory, resolving Phase 5A routing collisions, or diagnosing the validatemanifest or testresourceroutecoverage CI gates. Covers: resource vs. action classification (409 vs. 200+envelope); Cursor + paginate()…

sirkirby/unifi-mcp · 219 tokens

fli

Guidance for installing and using Fli correctly as a CLI and MCP server. Use when: setting up Fli with pipx, running fli flight searches, configuring Claude Desktop with fli-mcp, using the HTTP MCP server, or troubleshooting Fli command availability and common usage mistakes.

punitarani/fli · 65 tokens

action-creator

Creates user-specific one-click action templates that execute email operations when clicked in the chat interface. Use when user wants reusable actions for their specific workflows (send payment reminder to ACME Corp, forward bugs to engineering, archive old newsletters from specific sources).

trustabl/trustabl · 53 tokens

pipefy-api-fallback

Use this skill when an MCP tool fails AND the introspection skill could not resolve the problem. This is the last-resort fallback (Tier 3): call the Pipefy GraphQL API directly using curl or httpx, authenticating with the Service Account (OAuth2) or a Personal Access Token (PAT) available as env var. Follow the 3-tier…

pipefy/ai-toolkit · 86 tokens

listener-creator

Creates event-driven email listeners that monitor for specific conditions (like urgent emails from boss, newsletters to archive, package tracking) and execute custom actions. Use when user wants to be notified about emails, automatically handle certain emails, or set up email automation workflows.

trustabl/trustabl · 55 tokens

trustabl-enrich

Enriches source files flagged by a Trustabl scan — adds what is missing and corrects what is wrong, guided entirely by the scan's own explanation and fix text. Use after trustabl scan to apply findings directly to source files without manual editing.

trustabl/trustabl · 58 tokens