mail

mail is a command for Claude Code from coltonbearden/carrel. It costs 36 tokens per session (1,467 once invoked), scanned A, original, MIT.

A set of commands for working with email files: saving attachments, splitting an mbox mailbox into individual .eml messages, grouping messages into conversations, and converting Outlook .pst or .ost exports.

In plain words
What is it for?
Use it to extract attachments, convert Outlook exports, split mailboxes, and group messages from .eml or mbox files into threads.
Why use it?
Email archives often store many messages in formats that are hard to process individually. These commands turn them into files that can be organized and handled separately.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the carrel-mail plugin — 1 skill, 1 command shipped together

Good fit Use it to extract attachments, convert Outlook exports, split mailboxes, and group messages from .eml or mbox files into threads.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/coltonbearden/carrel/mail
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-mail, the plugin that ships this one along with the rest of its 1 skill, 1 command.

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 mail

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/coltonbearden/carrel/mail"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/mail.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 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,467 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.00036 $0.01467
Opus 5.5 $0.00014 $0.00587
Sonnet 5.5 $0.00007 $0.00293
Haiku 4.5 $0.00004 $0.00147

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

Security

Grade A, and why

mail 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-mail/commands/mail.md · 103 lines

How it starts

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

Handle this email-file request: $ARGUMENTS

Run the carrel CLI via Bash. carrel mail is a group; map the user's request onto the real subcommands and flags in the --help blocks below (regenerated from the CLI by scripts/sync_plugins.py; if the installed carrel mail --help differs, trust the installed version — never invent flags):

Usage: carrel mail [OPTIONS] COMMAND [ARGS]...

  Attachments, mailbox splitting, threads and Outlook exports for eml/mbox files.

Options:
  --json  Machine-readable JSON output.
  --help  Show this message and exit.

Commands:
  attachments  Save every attachment of FILES (eml or mbox) into --out-dir.
  pst          Convert an Outlook SRC (.pst/.ost) into eml or mbox files via readpst.
  split        Split BOX (an mbox) into one .eml file per message under --out-dir.
  threads      Group the messages in PATHS (eml/mbox files or directories) into threads.
Usage: carrel mail attachments [OPTIONS] FILES...

  Save every attachment of FILES (eml or mbox) into --out-dir.

  File names are sanitised (no separators, no leading dots); collisions get -1, -2, … suffixes
  unless --force. JSON: one record per message with the written paths, sizes and sha256 digests.

Options:
  --out-dir DIRECTORY  Directory to write attachments into (created if missing).  [required]
  --force              Overwrite same-named files instead of suffixing -1, -2, …
  --fail-empty         Exit 5 when no attachment was found.
  --json               Machine-readable JSON output.
  --help               Show this message and exit.
Usage: carrel mail pst [OPTIONS] SRC

  Convert an Outlook SRC (.pst/.ost) into eml or mbox files via readpst.

  `--format eml` writes one .eml per message (readpst -e); `--format mbox` writes one `mbox` file
  per mail folder (readpst -r), which `carrel mail split` can then take apart.

  Needs readpst; exit 3 with this platform's install hint otherwise. JSON: {src, out_dir, format,
  files, via}.

Options:
  --out-dir DIRECTORY  Directory readpst writes into (one subfolder per mail folder).  [required]
  --format [eml|mbox]  One .eml per message (readpst -e), or one mbox file per mail folder (readpst
                       -r).  [default: eml]
  --json               Machine-readable JSON output.
  --help               Show this message and exit.
Usage: carrel mail split [OPTIONS] BOX

  Split BOX (an mbox) into one .eml file per message under --out-dir.

  Names come from --template; messages are numbered in mailbox order and the bytes are written as
  stored. Refuses to overwrite without --force. JSON: [{n, path, subject, date, message_id}].

Options:
  --out-dir DIRECTORY  Directory to write the .eml files into (created if missing).  [required]
  --template TEXT      File name template: {n} index, {date} YYYY-MM-DD, {subject} slug, {id}
                       message id.  [default: {n}_{date}_{subject}.eml]
  --force              Overwrite existing files.
  --json               Machine-readable JSON output.
  --help               Show this message and exit.
Usage: carrel mail threads [OPTIONS] PATHS...

  Group the messages in PATHS (eml/mbox files or directories) into threads.

  Threads follow Message-ID / In-Reply-To / References; `depth` is the reply-chain length when the
  parent is present. JSON: [{root_subject, first_date, messages: [{where, message_id, date, from,
  subject, depth}]}].

Options:
  --json  Machine-readable JSON output.
  --help  Show this message and exit.
  • Choose the subcommand from intent: "pull the attachments out of X" → attachments FILE... (eml or mbox files, not folders) --out-dir DIR; "break this mailbox into messages" → split box.mbox --out-dir DIR (an mbox file); "what conversations are in here" → threads PATH... (files or folders); "I exported Outlook to a .pst" → pst FILE.pst --out-dir DIR (needs readpst; exit 3 carries the install hint for the user's platform). --format eml writes one .eml per message, --format mbox one mbox file per mail folder.
  • Reading the mail itself needs no subcommand: .eml and .mbox are desk file types, so carrel inspect, carrel index + carrel search, carrel pack and /carrel-finance:refs all read them directly, and the carrel-guard Read hook turns them into text for you. Conversion targets differ by type: .eml → md, txt, html or pdf; .mbox → md or txt only (anything else exits 4 and lists the real targets).
  • carrel convert msg.eml --to pdf renders the message's text, never its HTML, so converting a message can never fetch a tracking pixel or pull in a local file; --to html keeps the sender's HTML (opening that in a browser will fetch whatever it references, exactly like opening the mail would).
  • Attachments and split messages are never overwritten without --force; colliding names get -1, -2, … suffixes.
  • Prefer --json and report paths, sizes and sha256 digests back to the user; for threads, show root subject, participants and dates.

Read the full file on GitHub · 103 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. 1mo ago Changed scan B → A 828388e2ca9d
  2. 1mo ago First seen · 103 lines · 36 tokens per session scan B fdefc2064000

Subscribe to this mod's changes

mail is a command published in the GitHub repository coltonbearden/carrel (2 stars, last pushed 3d ago), licensed MIT. It adds 36 tokens to every session and 1,467 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.