batch-operations-prompt

batch-operations-prompt is a command for Claude Code from centminmod/my-claude-code-setup. It costs 0 tokens per session (1,224 once invoked), scanned A, original, MIT.

A command that rewrites a request for many code changes into a prompt suited to bulk or parallel work. It can use the user's request directly or read one from a file.

In plain words
What is it for?
Use it for operations such as renaming a variable across files, updating imports, converting callbacks to async and await, adding logging, or changing types throughout a project.
Why use it?
It makes large codebase-wide changes easier to organize by grouping related work and identifying tasks that can happen at the same time. This reduces repetitive instructions for each file.

Command for Claude Code

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/centminmod/my-claude-code-setup/batch-operations-prompt
Clone the repo
git clone --depth 1 https://github.com/centminmod/my-claude-code-setup

Made for: Claude Code.

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 batch-operations-prompt

README.md
[![agentmods](https://agentmods.dev/badge/commands/centminmod/my-claude-code-setup/batch-operations-prompt.svg)](https://agentmods.dev/commands/centminmod/my-claude-code-setup/batch-operations-prompt)
Your own site
<a href="https://agentmods.dev/commands/centminmod/my-claude-code-setup/batch-operations-prompt"><img src="https://agentmods.dev/badge/commands/centminmod/my-claude-code-setup/batch-operations-prompt.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,224 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.00000 $0.01224
Opus 5 $0.00000 $0.00612
Sonnet 5 $0.00000 $0.00245
Haiku 4.5 $0.00000 $0.00122

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

Security

Grade A, and why

batch-operations-prompt 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 3d 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.

.claude/commands/promptengineering/batch-operations-prompt.md · 207 lines

How it starts

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

Batch Operations Prompt

Optimize prompts for multiple file operations, parallel processing, and efficient bulk changes across a codebase. This helps Claude Code work more efficiently with TodoWrite patterns.

Usage Examples

Basic Usage

"Convert to batch: Update all test files to use new API" "Batch prompt for: Rename variable across multiple files" "Optimize for parallel: Add logging to all service files"

With File Input

/batch-operations-prompt @path/to/operation-request.md /batch-operations-prompt @../refactoring-plan.txt

Complex Operations

"Batch refactor: Convert callbacks to async/await in all files" "Parallel update: Add TypeScript types to all components" "Bulk operation: Update import statements across the project"

Instructions for Claude

When creating batch operation prompts:

Input Handling

  • If $ARGUMENTS is provided, read the file at that path to get the operation request to optimize
  • If no $ARGUMENTS, use the user's direct input as the operation to optimize
  • Support relative and absolute file paths
  1. Identify Parallelizable Tasks: Determine what can be done simultaneously
  2. Group Related Operations: Organize tasks by type and dependency
  3. Create Efficient Sequences: Order operations to minimize conflicts
  4. Use TodoWrite Format: Structure for Claude's task management
  5. Include Validation Steps: Add checks between batch operations

Batch Prompt Structure

1. Overview
  • Scope of changes
  • Files/patterns affected
  • Expected outcome
2. Prerequisite Checks
  • Required tools/dependencies
  • Initial validation commands
  • Backup recommendations
3. Parallel Operations
  • Independent tasks that can run simultaneously
  • File groups that don't conflict
  • Read operations for gathering information
4. Sequential Operations
  • Tasks with dependencies
  • Operations that modify same files
  • Final validation steps

Optimization Strategies

File Grouping
## Batch Operation: [Operation Name]

### Phase 1: Analysis (Parallel)
- Search for all affected files using Glob/Grep
- Read current implementations
- Identify patterns and dependencies

### Phase 2: Implementation (Grouped)
Group A (Independent files):
- File1.js: [specific change]
- File2.js: [specific change]

Group B (Related components):
- Component1.tsx: [change]
- Component1.test.tsx: [related change]

### Phase 3: Validation (Sequential)
1. Run linter on modified files
2. Execute test suite
3. Build verification

Read the full file on GitHub · 207 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. 3d ago First seen · 207 lines · 0 tokens per session scan A 2a0164b03975

Subscribe to this mod's changes

batch-operations-prompt is a command published in the GitHub repository centminmod/my-claude-code-setup (2,614 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,224 tokens. 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-30.