cpv-batch-fix

A batch command that applies fixes to one or many plugins, splitting large sets of findings into smaller groups. A finding is a reported problem discovered during a plugin check.

In plain words
What is it for?
Use it when a plugin or plugin collection has too many findings for one repair pass. It groups related files together and dispatches repair work across plugins or finding shards.
Why use it?
It prevents a single fixer from running out of working context before all problems are handled. Separate agents can work on different groups of findings in parallel.

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/emasoft/claude-plugins-validation/cpv-batch-fix
Clone the repo
git clone --depth 1 https://github.com/Emasoft/claude-plugins-validation
Per session 129 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,956 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.00129 $0.04956
Opus 5 $0.00064 $0.02478
Sonnet 5 $0.00026 $0.00991
Haiku 4.5 $0.00013 $0.00496

Measured 2d ago against content hash 07cfc91cecaf, 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-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 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/cpv-batch-fix.md · 423 lines

How it starts

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

/cpv-batch-fix — Parallel batch fix for large plugins

For plugins where the total set of findings can't comfortably fit in a single cpv-plugin-fixer-agent agent's working context (and stay under the ~50% utilisation level beyond which model quality begins to degrade), the single-agent fix loop will silently exhaust its context window mid-way and exit without finishing the job. The "safe size" is per-model: bare opus / sonnet give 200K tokens (~20-30 findings safe), the opus[1m] / sonnet[1m] variants give 1M (~100-150 findings safe). Per the Anthropic subagent spec, subagents cannot spawn other subagents, so cpv-plugin-fixer-agent cannot parallelise itself.

This command does the parallelisation from the main session, which is the only place the Agent tool can fan out:

  1. Runs scripts/cpv_batch_planner.py to slice the findings into shards of ~30 (zero LLM cost). The planner uses scope-based grouping: every finding inside skills/<name>/ belongs to the skills/<name>/ scope (with refactor rights), every other finding belongs to a single-file scope.
  2. Dispatches N cpv-plugin-fixer-agent agents in a SINGLE main-session message, each given its own shard manifest. Each agent starts with a fresh context window (size determined by cpv-plugin-fixer-agent's model: frontmatter at dispatch time) and refactor rights inside skill_dir scopes — including the right to split an oversized SKILL.md into multiple smaller focused skills, externalise content into references/*.md, etc.
  3. Runs scripts/cpv_batch_aggregator.py once the shards have all returned, producing one consolidated report (zero LLM cost).
  4. Main-session token cost: ~3-4K total (just paths, no report bodies).

See TRDD-71e68ab5 (design/tasks/TRDD-20260519_114050+0200-71e68ab5-batch-fix-parallel-sharding.md) for the full design.

You are the orchestrator

You — the model running THIS turn — orchestrate the slash command from the main session. You do NOT do any fixing yourself. You delegate the actual fix work to N parallel cpv-plugin-fixer-agent agents via the Agent tool, each in batch_shard mode.

Read the full file on GitHub · 423 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. 2d ago First seen · 423 lines · 129 tokens per session scan A 07cfc91cecaf

Subscribe to this mod's changes

cpv-batch-fix is a command published in the GitHub repository Emasoft/claude-plugins-validation (4 stars, last pushed 4d ago), licensed MIT. It adds 129 tokens to every session and 4,956 once invoked, about $0.0006 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.