agent-shield

agent-shield is a skill for Claude Code, Codex from elliotllliu/agent-shield. It costs 92 tokens per session (777 once invoked), scanned A, original, MIT.

A security scanner for AI-agent skills, MCP servers, and plugins. It examines their files and behavior for patterns associated with malicious code, credential theft, data leaks, and other risks.

In plain words
What is it for?
Use it to scan a local directory, a GitHub repository, an npm package, or a plugin archive, optionally producing JSON results or failing when the safety score is below a chosen threshold.
Why use it?
It helps you inspect third-party agent add-ons before trusting or installing them. This can reveal suspicious code or instructions that might access sensitive data or run unwanted commands.

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

Made for: Claude Code, Codex.

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 agent-shield

README.md
[![agentmods](https://agentmods.dev/badge/skills/elliotllliu/agent-shield/skill.svg)](https://agentmods.dev/skills/elliotllliu/agent-shield/skill)
Your own site
<a href="https://agentmods.dev/skills/elliotllliu/agent-shield/skill"><img src="https://agentmods.dev/badge/skills/elliotllliu/agent-shield/skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 777 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.00092 $0.00777
Opus 5 $0.00046 $0.00388
Sonnet 5 $0.00018 $0.00155
Haiku 4.5 $0.00009 $0.00078

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

Security

Grade A, and why

agent-shield 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.

skill/SKILL.md · 80 lines

How it starts

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

AgentShield — Security Scanner

Scan any directory for security issues in AI agent skills, MCP servers, and plugins.

Usage

# Basic scan
npx @elliotllliu/agent-shield scan ./path/to/skill/

# Pre-install check (GitHub URL, npm package, or local path)
npx @elliotllliu/agent-shield install-check https://github.com/user/repo

# JSON output for programmatic use
npx @elliotllliu/agent-shield scan ./path/to/skill/ --json

# Fail if score is below threshold
npx @elliotllliu/agent-shield scan ./path/to/skill/ --fail-under 70

# Scan .difypkg plugin archives
npx @elliotllliu/agent-shield scan ./plugin.difypkg

What It Detects (30 rules)

High Risk:

  • data-exfil — reads sensitive files + sends HTTP requests
  • backdoor — eval(), exec(), dynamic code execution
  • reverse-shell — outbound socket to shell
  • crypto-mining — mining pool connections
  • credential-hardcode — hardcoded API keys/tokens
  • obfuscation — base64+eval, hex strings
  • prompt-injection — 55+ patterns, 12 categories, 8 languages
  • tool-shadowing — tool name/description manipulation
  • attack-chain — multi-step kill chain (5 stages)
  • cross-file — cross-file data flow and code injection
  • ast-* — Python AST taint tracking (eval, pickle, SQL injection, SSTI)
  • multilang-injection — 8-language prompt injection
  • description-integrity — semantic mismatch between description and code
  • mcp-runtime — MCP server runtime security issues

Medium Risk:

  • env-leak — process.env exfiltration
  • network-ssrf — user-controlled URLs, SSRF
  • privilege — SKILL.md permission vs code mismatch
  • supply-chain — known CVEs in dependencies
  • sensitive-read — SSH keys, AWS creds access
  • phone-home — periodic beacon/heartbeat pattern
  • python-security — 35 Python-specific patterns

Low Risk:

  • excessive-perms — too many permissions declared
  • hidden-files — .env with secrets committed
  • typosquatting — suspicious npm package names

Interpreting Results

  • Score 90-100: Low risk ✅
  • Score 70-89: Moderate risk — review warnings
  • Score 40-69: High risk — investigate before using
  • Score 0-39: Critical risk — do not install

Read the full file on GitHub · 80 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 · 80 lines · 92 tokens per session scan A a32d8b1a02ae

Subscribe to this mod's changes

agent-shield is a skill published in the GitHub repository elliotllliu/agent-shield (15 stars, last pushed 5mo ago), licensed MIT. It adds 92 tokens to every session and 777 once invoked, about $0.0005 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.