security-scan

A command that checks a Claude Code plugin or skill repository for security risks in executable files, event hooks, tool configurations, and dependencies.

In plain words
What is it for?
Use it to scan the current project or a specified plugin directory and produce a security report with an install-or-contribute recommendation.
Why use it?
It helps identify potentially unsafe code before you install the plugin or contribute changes.

Command

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 commands/xiaolai/nlpm/security-scan
Clone the repo
git clone --depth 1 https://github.com/xiaolai/nlpm
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 444 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.00025 $0.00444
Opus 5 $0.00013 $0.00222
Sonnet 5 $0.00005 $0.00089
Haiku 4.5 $0.00003 $0.00044

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

Security

Grade A, and why

security-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 2d 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.

commands/security-scan.md · 69 lines

What it actually says

Security Scan

Scan a plugin or skill repo for security risks before auditing or contributing.

Step 1: Parse Input

If arguments provided: use as target directory path. If no arguments: use the current working directory.

Check the target exists and contains at least one of:

  • .claude-plugin/
  • agents/
  • commands/
  • skills/
  • hooks/
  • scripts/

If none found: report "Not a Claude Code plugin directory" and stop.

Step 2: Dispatch Security Scanner

Dispatch the security-scanner agent on the target directory.

Wait for the agent to complete and collect its report.

Step 3: Present Results

Display the full report in this exact structure: the agent report as the body, followed by the gate banner as the footer. The security-scanner agent emits the body; this command appends only the banner.

{security-scanner agent report — verbatim}

────────────────────────────────────────────────────────────
{GATE BANNER — chosen per recommendation, see below}
────────────────────────────────────────────────────────────

Gate banners:

If the recommendation is BLOCK:

SECURITY GATE: BLOCKED
Critical/High security findings. Do NOT install or contribute to this plugin without resolving these findings first.

If the recommendation is REVIEW:

SECURITY GATE: REVIEW NEEDED
Medium-severity findings detected. Review the findings before proceeding.

If the recommendation is PASS:

SECURITY GATE: PASSED
No Critical/High security findings. Safe to proceed with audit and contribution.

Error handling:

  • Target path does not exist → "Directory not found: {path}"
  • security-scanner agent returns no report → "Security scan failed: no report produced. Re-run /nlpm:security-scan {path}."
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. 2d ago First seen · 69 lines · 25 tokens per session scan A 91faff359118

Subscribe to this mod's changes

security-scan is a command published in the GitHub repository xiaolai/nlpm (133 stars, last pushed 2d ago), licensed ISC. It adds 25 tokens to every session and 444 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.