cpv-batch-scope-fix

A batch command that applies diagnosed configuration fixes across multiple local project folders. It works with user-wide, project-specific, local, or all configuration settings.

In plain words
What is it for?
Use it after a scope-aware configuration check has found problems in several projects. It handles duplicate settings and misplaced local settings automatically, while giving recipes for changes needing review.
Why use it?
It removes the need to open each project and apply the same approved fixes manually. Minor and major changes that may affect intent are reported for approval.

Command

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-scope-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.

Per session 74 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,605 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.00074 $0.01605
Opus 5 $0.00037 $0.00803
Sonnet 5 $0.00015 $0.00321
Haiku 4.5 $0.00007 $0.00161

Measured 2d ago against content hash 4f9eae326f4d, 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-scope-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-scope-fix.md · 171 lines

How it starts

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

/cpv-batch-scope-fix — Apply scope-aware doctor fixes across a fleet

Counterpart to /cpv-batch-scope-diagnose. After the doctor has diagnosed each project, this command dispatches one per project in fix mode to apply the obvious mechanical fixes the diagnostic flagged. The same scope semantics apply (user / project / local / full).

Per TRDD-a175f78d §3:

  • NIT findings (duplicates with identical content) → auto-applied silently.
  • CRITICAL findings (misplaced settings.local.json entries) → auto-applied silently.
  • MAJOR / MINOR findings (content-differing duplicates, untracked refs, etc.) → reported with a fix recipe but require explicit user approval before applying. The same-turn variant (/cpv-batch-scope-diagnose-and-fix) handles MAJOR/MINOR inline; this command requires a prior diagnose pass.

LOCAL paths only — URL inputs are CRITICAL errors (the doctor needs ~/.claude/ filesystem access).

You are the orchestrator

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

Step 0 — Resolve arguments

If any input looks URL-shaped, surface the canonical CRITICAL message (see /cpv-batch-scope-diagnose Step 0) and stop.

If no project list was given, default to $PWD.

Step 1 — Build the batch plan

BATCH_SPEC="${1:-$PWD}"
SCOPE="full"
MAX_PARALLEL=8

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/cpv_batch_orchestrator.py" plan \
  "$BATCH_SPEC" \
  --agent cpv-doctor-agent \
  --mode batch_scope_fix \
  --no-url \
  --max-parallel "$MAX_PARALLEL"

Capture the orchestrator's stdout (PLAN, STATUS_TABLE, SESSION_DIR, PLUGIN_COUNT, DISPATCH_GROUPS). $SESSION_DIR is required by Steps 3 and 4 (emit-status "$SESSION_DIR/plan.json"), so you MUST bind it here from the SESSION_DIR: line. Queue the initial status table for the claude-menu-system Stop hook (emitted post-turn via systemMessage — zero token cost, NEVER printed inline by the orchestrator):

Read the full file on GitHub · 171 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 · 171 lines · 74 tokens per session scan A 4f9eae326f4d

Subscribe to this mod's changes

cpv-batch-scope-fix is a command published in the GitHub repository Emasoft/claude-plugins-validation (4 stars, last pushed 5d ago), licensed MIT. It adds 74 tokens to every session and 1,605 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.