rename

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

A command for renaming local files from information inside their documents, such as dates, vendors, invoice numbers, or totals. It can first show a proposed rename before applying it.

In plain words
What is it for?
Use it to create consistent names for invoices and other documents, add files to folders through name templates, and review rename results as JSON.
Why use it?
Manually naming many files is slow and often inconsistent. Planning first also helps avoid accidental overwrites or changes to tracked files in Git, a system for recording code history.

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 create consistent names for invoices and other documents, add files to folders through name templates, and review rename results as JSON.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/coltonbearden/carrel/rename/github.svg)](https://agentmods.dev/commands/coltonbearden/carrel/rename)
Your own site
<a href="https://agentmods.dev/commands/coltonbearden/carrel/rename"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/rename/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 rename

Your own site · 80×15
<a href="https://agentmods.dev/commands/coltonbearden/carrel/rename"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/rename.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 981 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.00035 $0.00981
Opus 5.5 $0.00014 $0.00392
Sonnet 5.5 $0.00007 $0.00196
Haiku 4.5 $0.00003 $0.00098

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

Security

Grade A, and why

rename 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/rename.md · 56 lines

What it actually says

Rename the files 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 rename --help differs, trust the installed version — never invent flags):

Usage: carrel rename [OPTIONS] PATHS...

  Plan (default) or perform (--apply) renaming PATH... from the documents' own fields.

  Placeholders: {date} (or {date:%Y-%m}), {yyyy}, {mm}, {vendor}, {ref}, {total}, {fields.NAME},
  {meta.KEY}, {type}, {stem}, {name}, {ext}, {sha8}. Dates come from the document (then the desk,
  then mtime); {ref} is the invoice number or the first reference found. Values are slugified; a
  file with an unresolved placeholder is skipped unless --fallback is given. Renames happen next to
  the source (a literal / in the template files into subfolders), never overwrite (-1, -2, …
  suffixes), and carry the desk row under --root along. JSON: [{src, dest, action:
  rename|renamed|skip, reason, sources}].

  --apply refuses (exit 2) when a PATH would rename a file git is tracking, where a new name breaks
  imports, tests and history. Untracked files inside a repository are fine; --allow-tracked
  overrides.

Options:
  --template TEXT          Name template; see the placeholders in the command description.
                           [default: {date}_{vendor}_{ref}{ext}]
  --apply / --dry-run      Execute the renames. Default is a dry-run that only prints the plan.
  --date-order [mdy|dmy]   How to read an ambiguous slashed date in the document.  [default: mdy]
  --fallback TEXT          Use TEXT for a placeholder that has no value instead of skipping the
                           file.
  --lower                  Lower-case the rendered name.
  --max-len INTEGER RANGE  Cap the stem length.  [default: 120; x>=8]
  --ocr                    OCR images and scanned PDFs to read their fields (needs tesseract /
                           ocrmypdf).
  --allow-tracked          Rename even when a PATH is a file git tracks (see the description).
  --force                  Deprecated spelling of --allow-tracked; warns when it bypasses the guard.
  --json                   Machine-readable JSON output.
  --help                   Show this message and exit.
  • Always dry-run first (carrel --json rename PATH...) and show the plan: src → dest, plus every skip with its reason (usually an unresolved {ref} or {vendor}). Only pass --apply after the user has seen the plan and agreed; offer --fallback TEXT for files that lack a value.
  • Placeholders: {date} / {date:%Y-%m} / {yyyy} / {mm} (document date, then desk field, then mtime), {vendor}, {ref} (invoice number or first reference), {total}, {fields.NAME}, {meta.KEY}, {type}, {stem}, {name}, {ext}, {sha8}. Values are slugified; --lower lower-cases.
  • Renames stay in the file's own directory, never overwrite (-1, -2, … suffixes), and carry the desk row (tags, notes, fields) along under the global --root.
  • European dates need --date-order dmy; scans need --ocr.

Report the plan (or the applied renames) conversationally, listing skipped files and why. For filing into YYYY/MM folders as well, point at /carrel-watch:intake.

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 Changed · +2 lines 2765eafe9f7f
  2. 1mo ago First seen · 54 lines · 35 tokens per session scan A 244db757a2a4

Subscribe to this mod's changes

rename is a command published in the GitHub repository coltonbearden/carrel (2 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 981 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.