cpv-batch-validate-and-fix

cpv-batch-validate-and-fix is a command for coding agents from Emasoft/claude-plugins-validation. It costs 95 tokens per session (1,978 once invoked), scanned A, original, MIT.

A batch command that checks and fixes multiple plugins in one pass. A plugin is an add-on package for a coding tool; the command can process a marketplace, a list, or one plugin.

In plain words
What is it for?
Use it to validate and repair plugins from local folders, URLs, marketplaces, or input lists. It returns before-and-after finding counts for each plugin.
Why use it?
It avoids rereading every source file during separate check, fix, and recheck stages. It still checks suspected false alarms before deciding whether to change anything.

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 — 31 skills, 14 commands, 14 agents 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-batch-validate-and-fix
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 31 skills, 14 commands, 14 agents.

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-batch-validate-and-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/emasoft/claude-plugins-validation/cpv-batch-validate-and-fix.svg)](https://agentmods.dev/commands/emasoft/claude-plugins-validation/cpv-batch-validate-and-fix)
Your own site
<a href="https://agentmods.dev/commands/emasoft/claude-plugins-validation/cpv-batch-validate-and-fix"><img src="https://agentmods.dev/badge/commands/emasoft/claude-plugins-validation/cpv-batch-validate-and-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 95 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,978 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.00095 $0.01978
Opus 5 $0.00048 $0.00989
Sonnet 5 $0.00019 $0.00396
Haiku 4.5 $0.00010 $0.00198

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

Security

Grade A, and why

cpv-batch-validate-and-fix 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-batch-validate-and-fix.md · 205 lines

How it starts

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

/cpv-batch-validate-and-fix — Same-turn validate + verify + fix

For fleet operators who want to apply validation fixes across a marketplace WITHOUT paying the token cost of the standard /cpv-batch-validate/cpv-batch-fix pipeline (which reads every plugin's source files THREE times — once for validate, once for fix, once for re-validate), this command runs both phases in one agent turn per plugin. Each cpv-plugin-fixer-agent subagent reads each source file ONCE, scans + verifies false positives (via the v2.100.x AST/schema/markdown classifier) + applies fixes inline. No intermediate JSON report is written; the per-plugin status JSON carries the before/after counts.

Per the iron-rule: the same-turn mode is an OPTIMISATION, never a shortcut. Every finding still goes through the full classifier chain; FPs are verified via llm-externalizer with file-range syntax (≤ 200 LOC per call) before being silenced.

Same input grammar as the other batch skills — single plugin / plugin URL / marketplace local/URL / list / @listfile / comma-separated.

You are the orchestrator

You — the model running THIS turn — drive the batch. You do NOT fix anything yourself.

Step 0 — Resolve arguments

If no target was given, ask plain-text:

What should I validate-and-fix in one pass? Provide an absolute path, a GitHub URL, a marketplace, or a list file like @/tmp/plugins.txt.

Step 1 — Build the batch plan

BATCH_SPEC="$1"
MAX_PARALLEL=8

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/cpv_batch_orchestrator.py" plan \
  "$BATCH_SPEC" \
  --agent cpv-plugin-fixer-agent \
  --mode batch_same_turn_validate_fix \
  --max-parallel "$MAX_PARALLEL"

Capture the orchestrator's stdout. It prints one KEY: value line each for PLAN, STATUS_TABLE, SESSION_DIR, PLUGIN_COUNT, and DISPATCH_GROUPS. Bind the two you need downstream:

STATUS_TABLE="$(... STATUS_TABLE line from the plan output ...)"
SESSION_DIR="$(...  SESSION_DIR  line from the plan output ...)"

Read the full file on GitHub · 205 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 · 205 lines · 95 tokens per session scan A faab98e98931

Subscribe to this mod's changes

cpv-batch-validate-and-fix is a command published in the GitHub repository Emasoft/claude-plugins-validation (4 stars, last pushed yesterday), licensed MIT. It adds 95 tokens to every session and 1,978 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-31.