cpv-plugin-leaks-preventer-agent

cpv-plugin-leaks-preventer-agent is an agent for Claude Code from Emasoft/claude-plugins-validation. It costs 232 tokens per session (3,929 once invoked), scanned A, original, MIT.

An automated worker that removes exposed secrets and adds missing security safeguards in a plugin. Secrets are private values such as API keys or passwords.

In plain words
What is it for?
Use it to fix leaked credentials and missing protections reported by plugin security checks.
Why use it?
It addresses security findings directly while preserving the plugin's working behavior.

Agent for Claude Code

Written for Claude Code: Claude Code plugin machinery. Also seen: positional $N argument.

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 agents/emasoft/claude-plugins-validation/cpv-plugin-leaks-preventer-agent
Clone the repo
git clone --depth 1 https://github.com/Emasoft/claude-plugins-validation

Made for: Claude Code.

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-plugin-leaks-preventer-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/emasoft/claude-plugins-validation/cpv-plugin-leaks-preventer-agent.svg)](https://agentmods.dev/agents/emasoft/claude-plugins-validation/cpv-plugin-leaks-preventer-agent)
Your own site
<a href="https://agentmods.dev/agents/emasoft/claude-plugins-validation/cpv-plugin-leaks-preventer-agent"><img src="https://agentmods.dev/badge/agents/emasoft/claude-plugins-validation/cpv-plugin-leaks-preventer-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 232 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,929 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.1 $0.00232 $0.03929
Opus 5 $0.00116 $0.01965
Sonnet 5 $0.00046 $0.00786
Haiku 4.5 $0.00023 $0.00393

Measured 6d ago against content hash 6c6e049258f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

cpv-plugin-leaks-preventer-agent scanned grade A with 1 finding 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 6d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **NEVER devitalize execution-class threats here.** Detection signatures, attack-test patterns, command / shell execution, reverse shells, eval-exec of a payload, obfuscated or runtime-decoded code, and curl-pipe-to-she
agents/cpv-plugin-leaks-preventer-agent.md · 118 lines

How it starts

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

Plugin Leaks Preventer Agent

You are a self-sufficient security leaks-and-hardening agent. You accept EITHER a security report path OR a plugin path and fix flagged LEAK + MISSING-SAFEGUARD findings on your own — passing CPV's security gate by REMOVING exposed secrets and IMPLEMENTING the missing safeguards, never by suppressing a rule or relaxing --strict, and never by breaking working code. If a finding is not a leak or missing safeguard, check cpv-the-skills-menu for the skill that actually owns it rather than fixing outside your remit.

Load skills on demand with the Skill tool (any agent may invoke any skill; the skills: frontmatter is a pre-loading hint, not an ACL):

Task Skill
Redact / runtime-read / harden recipes (Part B + Part C) Skill({skill: "claude-plugins-validation:cpv-harden-and-redact"})
What "valid" / clean looks like Skill({skill: "claude-plugins-validation:cpv-plugin-validation-skill"})

Phase 0 — plugin-shape detection (MANDATORY)

Confirm the target IS a plugin per the cpv-plugin-validation-skill shape-detection reference (detection table, hard-refusal protocol). If .claude-plugin/plugin.json is missing, do NOT scaffold a manifest, add a marketplace, or publish — return [BLOCKED — Phase 0 plugin-shape detection] and ask the user whether to wrap the content into a new plugin or add it to an existing one.

Phase 1 — scan → COMPACT ledger (read the ledger, NEVER the full report)

One-time setup (before the FIRST pass only): reset the oscillation guard — uv run scripts/cpv_fix_loop_state.py reset --state <loopstate.json>.

The repeatable scan (steps 1-3 — Phase 3's delta re-scan re-runs THESE, not the reset): run the security scan via the LAUNCHER — NEVER call validate_security.py directly (the isolation guard refuses with a "remote location" error). Emit the findings as JSON and DISTILL them to a compact surface; do NOT ingest the full .md report each iteration (re-reading the whole report every pass is a top token sink — cost approximates turns times per-turn-context, since each raw report rides forward and is re-charged on every later turn):

Read the full file on GitHub · 118 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. 6d ago First seen · 118 lines · 232 tokens per session scan A 6c6e049258f5

Subscribe to this mod's changes

cpv-plugin-leaks-preventer-agent is an agent published in the GitHub repository Emasoft/claude-plugins-validation (4 stars, last pushed yesterday), licensed MIT. It adds 232 tokens to every session and 3,929 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories