cpv-pre-install-scan

cpv-pre-install-scan is a command for coding agents from Emasoft/claude-plugins-validation. It costs 88 tokens per session (834 once invoked), scanned A, original, MIT.

A read-only security scan for a coding-agent skill, plugin, or marketplace before installation. It checks source files in a temporary sandbox and does not run the target code.

In plain words
What is it for?
Use it before installing a local or remote skill, plugin, or marketplace. It scans for security rules, obfuscated content, invisible Unicode, and hardcoded secrets.
Why use it?
It helps identify malicious code, hidden text, leaked credentials, and other supply-chain threats before untrusted files enter the plugin cache.

Command

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 claude-plugins-validation plugin — 52 skills, 14 commands, 14 agents, 10 plugins 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 commands/emasoft/claude-plugins-validation/cpv-pre-install-scan
Clone the repo
git clone --depth 1 https://github.com/Emasoft/claude-plugins-validation

Or install claude-plugins-validation, the plugin that ships this one along with the rest of its 52 skills, 14 commands, 14 agents, 10 plugins.

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 cpv-pre-install-scan

README.md
[![agentmods](https://agentmods.dev/badge/commands/emasoft/claude-plugins-validation/cpv-pre-install-scan.svg)](https://agentmods.dev/commands/emasoft/claude-plugins-validation/cpv-pre-install-scan)
Your own site
<a href="https://agentmods.dev/commands/emasoft/claude-plugins-validation/cpv-pre-install-scan"><img src="https://agentmods.dev/badge/commands/emasoft/claude-plugins-validation/cpv-pre-install-scan.svg" alt="Measured on agentmods" height="20"></a>
Per session 88 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 834 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.00088 $0.00834
Opus 5 $0.00044 $0.00417
Sonnet 5 $0.00018 $0.00167
Haiku 4.5 $0.00009 $0.00083

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

Security

Grade A, and why

cpv-pre-install-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 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.

commands/cpv-pre-install-scan.md · 82 lines

How it starts

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

/cpv-pre-install-scan

Pre-install security gate. Scans an untrusted skill, plugin, or marketplace before it lands in ~/.claude/plugins/cache/.

What it scans

The scanner runs all of:

  • The full CPV security pipeline (27 in-process checks + 5 external scanners when available)
  • The MANDATORY native skillaudit rule catalog (50 rules / 486 patterns across 21 threat categories — credential theft, data exfiltration, prompt injection, MCP schema poisoning, A2A attacks, obfuscation, supply-chain, container escape, persistence, crypto theft, etc.)
  • Invisible-Unicode / bidi-override detection
  • Base64 + hex + Unicode-escape + char-code obfuscation decoders
  • Hardcoded-secret detection (GitHub/AWS/Slack/Discord/Telegram/Vercel/npm/PyPI/OpenAI/Anthropic/Google/Stripe tokens, PEM keys, JWTs)

How it works

cpv-pre-install-scan <target>

The target is fetched into ${TMPDIR}/cpv-preinstall-<uuid>/ — a sandboxed work directory. The scanner runs read-only static analysis. No target code is executed. When the scan completes the sandbox is deleted.

Accepted target forms:

Form Example
Local path cpv-pre-install-scan /path/to/plugin
GitHub URL cpv-pre-install-scan https://github.com/owner/repo
owner/repo slug cpv-pre-install-scan owner/repo
Release URL cpv-pre-install-scan https://github.com/owner/repo/releases/tag/v1.2.3
Single file URL cpv-pre-install-scan https://example.com/SKILL.md
Local archive cpv-pre-install-scan plugin.tar.gz

Exit codes

  • 0 — clean. Zero CRITICAL, zero MAJOR findings. Safe to install.
  • 1 — findings. CRITICAL or MAJOR present. Do NOT install.
  • 2 — usage error (bad target, fetch failure, etc.).

Iron rule

The skillaudit native scanner runs on EVERY pre-install scan. There is no CPV_NO_SKILLAUDIT, no --skip-skillaudit, no opt-out. A missing rule catalog is reported as CRITICAL.

When uncertain matches are detected (e.g. shell-keyword substring in documentation), the scanner DEMOTES them to NIT-level "⚠ (demoted, needs review)" findings instead of silently suppressing them — the downstream security agents triage these for verification.

Read the full file on GitHub · 82 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. 4d ago First seen · 82 lines · 88 tokens per session scan A 26e2847eaece

Subscribe to this mod's changes

cpv-pre-install-scan is a command published in the GitHub repository Emasoft/claude-plugins-validation (4 stars, last pushed 2d ago), licensed MIT. It adds 88 tokens to every session and 834 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.