batch

batch is a command for Claude Code from coltonbearden/carrel. It costs 37 tokens per session (965 once invoked), scanned A, original, MIT.

A command for running one or more shell commands over many files or directories, with file-name substitutions, parallel jobs, and machine-readable results.

In plain words
What is it for?
Use it to apply formatting, conversion, checks, or other shell actions to batches of files, while previewing work and reviewing successes or failures.
Why use it?
Repeating the same command by hand is tedious and makes missed files or inconsistent results more likely. A manifest can also let a long operation resume after interruption.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the carrel-organize plugin — 7 commands shipped together

Good fit Use it to apply formatting, conversion, checks, or other shell actions to batches of files, while previewing work and reviewing successes or failures.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/coltonbearden/carrel/batch
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.

Clone the repo
git clone --depth 1 https://github.com/coltonbearden/carrel

Made for: Claude Code.

Or install carrel-organize, the plugin that ships this one along with the rest of its 7 commands.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/coltonbearden/carrel/batch/github.svg)](https://agentmods.dev/commands/coltonbearden/carrel/batch)
Your own site
<a href="https://agentmods.dev/commands/coltonbearden/carrel/batch"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/batch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for batch

Your own site · 80×15
<a href="https://agentmods.dev/commands/coltonbearden/carrel/batch"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/batch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 965 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00037 $0.00965
Opus 5.5 $0.00015 $0.00386
Sonnet 5.5 $0.00007 $0.00193
Haiku 4.5 $0.00004 $0.00097

Measured 1mo ago against content hash 0ca2d4c1a200, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

batch 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 1mo 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.

plugins/carrel-organize/commands/batch.md · 56 lines

What it actually says

Run the bulk task the user asked about: $ARGUMENTS

Run the carrel CLI via Bash. Map the request onto the real flags in the --help block below (regenerated from the CLI by scripts/sync_plugins.py; if the installed carrel batch --help differs, trust the installed version — never invent flags):

Usage: carrel batch [OPTIONS] PATHS...

  Run --run actions over every file in PATH... (files, or directories walked like `index`).

  Exit 0 when every file succeeded, 1 when any failed (its record carries the rc, stdout and
  stderr), 5 with --fail-empty when nothing matched. JSON output is {"summary": {total, ran, ok,
  failed, skipped, seconds}, "results": [{path, cmd, rc, stdout, stderr, seconds, ok}]} (cmd/rc are
  the failing or last action's, stdout/stderr every action's output in order); --json-lines streams
  the records instead. --manifest + --resume make a long run restartable.

Options:
  --run CMD                     Shell action per file; repeatable, runs in order, stops at the first
                                failure. Substituted (shell-quoted): {path}, {name}, {stem}, {ext},
                                {dir}.  [required]
  --glob PATTERN                Only files whose name matches (e.g. '*.pdf').
  --type T1,T2                  Only these detected types (pdf, md, eml, code, …).
  --recursive / --no-recursive  Walk directories (hidden and .gitignored entries skipped).
                                [default: recursive]
  --jobs INTEGER RANGE          Files to process in parallel.  [default: 1; x>=1]
  --dry-run                     Print the rendered commands without running anything.
  --manifest FILE               Append one JSON record per file to this file.
  --resume                      Skip files whose last --manifest record succeeded with the same
                                --run set.
  --fail-fast                   Stop after the first failing file.
  --action-timeout SECS         Kill an action that runs longer than SECS (rc=124).  [default:
                                300.0; x>0]
  --fail-empty                  Exit 5 when no file matched.
  --json-lines                  Stream one JSON record per file as it completes, then a summary
                                line.
  --json                        Machine-readable JSON output.
  --help                        Show this message and exit.
  • Compose the action with the same placeholders as watch: --run 'carrel convert {path} --to txt --out-dir OUT'; repeated --run flags run in order per file and stop at the first failure. {path}, {name}, {stem}, {ext} and {dir} are shell-quoted for you.
  • Dry-run first for anything that writes or deletes (--dry-run prints every rendered command); narrow with --glob '*.pdf' / --type pdf,docx; parallelise read-only work with --jobs 4.
  • Long runs: --manifest run.jsonl records every file; --resume skips what already succeeded, so a run can be restarted after a crash or a fixed binary. --fail-fast stops at the first failure; --action-timeout bounds each action.
  • Exit 1 means at least one file failed — read its rc/stderr from --json and report which files, not just the count. Exit 5 with --fail-empty when nothing matched.

Report the summary (ok/failed/skipped) and list failures with their error text. Never rm, overwrite or move in an action without an explicit, confirmed request.

Requires the carrel CLI on PATH. If carrel is not found, tell the user to install it with uv tool install carrel (see the repo's INSTALL notes), or run it as uv run carrel ... from the carrel repo root.

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. 1mo ago First seen · 56 lines · 37 tokens per session scan A 0ca2d4c1a200

Subscribe to this mod's changes

batch is a command published in the GitHub repository coltonbearden/carrel (2 stars, last pushed yesterday), licensed MIT. It adds 37 tokens to every session and 965 once invoked, about $0.0001 per session on Opus 5.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-09-11.