guard

guard is a skill for Claude Code 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 Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

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

Good fit Use it to scan a path or diff, inspect a package before installation, check an email file, or view recent guard findings.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add mlawsonking/MCP
Claude Code
/plugin install agent-guards

Made for: Claude Code.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/mlawsonking/mcp/guard"><img src="https://agentmods.dev/badge/skills/mlawsonking/mcp/guard.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00072 $0.00574
Opus 5.5 $0.00029 $0.00230
Sonnet 5.5 $0.00014 $0.00115
Haiku 4.5 $0.00007 $0.00057

Measured 3mo ago against content hash 7ff57aa20fca, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 (1 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 574 once invoked, about $0.0003 per session on Opus 5.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

guard compared with skills from other repositories

guard next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
guardmlawsonking/MCPSkill1yesterdayMITA72Claude Code
flipunitarani/fliSkill3.5k5d agoMITA65Claude Code, Codex
pipefy-api-fallbackpipefy/ai-toolkitSkill553d agoApache-2.0A86Claude Code
apitapn1byn1kt/apitapSkill1311mo agoApache-2.0A0Claude Code, Codex
gitlab-api-developmentKnuckles-Team/gitlab-apiSkill104d agoMITA49Claude Code, Codex
football-dataddevetak/footballcharts-mcpSkill710d agoMITA65Claude Code
validate-iban-before-paymentcammac-creator/ibanforgeSkill3todayMITA139Claude Code, Codex