convert

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

A command for converting local files between supported formats such as PDF, Markdown, text, HTML, JSON, CSV, PNG, and JPG. It uses the carrel command-line tool.

In plain words
What is it for?
Use it to convert one or more files, choose an output folder, rasterise selected PDF pages into images, and create outputs in supported formats.
Why use it?
It removes the need to open files in separate applications or remember different conversion tools and options.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the carrel-convert plugin — 6 commands, 1 agent shipped together

Good fit Use it to convert one or more files, choose an output folder, rasterise selected PDF pages into images, and create outputs in supported formats.

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

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 convert

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/coltonbearden/carrel/convert"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/convert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 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,190 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.00046 $0.01190
Opus 5.5 $0.00018 $0.00476
Sonnet 5.5 $0.00009 $0.00238
Haiku 4.5 $0.00005 $0.00119

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

Security

Grade A, and why

convert 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-convert/commands/convert.md · 77 lines

What it actually says

Convert the file(s) the user asked about: $ARGUMENTS

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

Usage: carrel convert [OPTIONS] SRC...

  Convert SRC... to another supported type.

  By default the output lands next to each SRC with the new extension. Existing outputs are never
  overwritten without --force. With --json, prints one JSON array of {"src", "dest", "via", "ok"}
  records.

  Office and ebook sources (docx, odt, epub, rtf) are read by pandoc and can go to md/html/txt/pdf
  (pdf also needs weasyprint); md/html/txt can be written as docx or odt, and docx <-> epub round-
  trips. xlsx reads need the `office` extra (openpyxl) and go to csv or json only. Email (eml) goes
  to md/txt/html/pdf and a mailbox (mbox) to md/txt, with no external binary (pdf needs weasyprint).
  eml → html keeps the message's own HTML; eml → pdf renders its text instead, so a conversion never
  fetches remote content the sender referenced.

Options:
  --to EXT             Target type: pdf, md, txt, html, json, xml, csv, png, jpg, ico, docx, odt,
                       epub.  [required]
  -o, --output FILE    Explicit output path (single SRC only).
  --out-dir DIRECTORY  Write outputs into this directory (required for multiple SRC).
  --force              Overwrite existing outputs.
  --pages [first|all]  pdf → png/jpg only: rasterize the first page, or every page as DEST-1..N.
                       [default: first]
  --sheet NAME|N|all   xlsx → csv/json only: pick a sheet by name or 1-based number (default: first;
                       json defaults to every sheet). 'all' with csv writes DEST-<sheet>.csv per
                       sheet.
  --json               Machine-readable JSON output.
  --help               Show this message and exit.

  Supported conversions (SRC type → --to targets):
    csv   → html, json, md
    docx  → epub, html, md, pdf, txt
    eml   → html, md, pdf, txt
    epub  → docx, html, md, pdf, txt
    html  → docx, md, odt, pdf, txt
    ico   → jpg, pdf, png
    jpg   → ico, pdf, png
    json  → csv, html, xml
    mbox  → md, txt
    md    → docx, html, odt, pdf, txt
    odt   → html, md, pdf, txt
    pdf   → html, jpg, md, png, txt
    png   → ico, jpg, pdf
    rtf   → html, md, pdf, txt
    txt   → docx, html, md, odt, pdf
    xlsx  → csv, json
    xml   → json

Note: --json is a global flag and may come before convert (carrel --json convert ...); the per-command --json after it works too.

  • --to EXT (required): pick the target from the conversion matrix at the bottom of the help — it lists exactly which SRC types reach which targets.
  • -o/--output FILE: explicit output path — single SRC only.
  • --out-dir DIR: output directory — required when converting multiple SRC files.
  • --force: only pass when the user explicitly wants existing outputs overwritten.
  • --pages first|all: pdf → png/jpg only; all rasterizes every page as DEST-1..N.
  • --sheet NAME|N|all: xlsx → csv/json only; all with csv writes one file per sheet.
  • Office/ebook sources (docx, odt, epub, rtf) go through pandoc; xlsx needs the office extra.

Always use --json and interpret the result for the user: report each {src, dest, via, ok} record, say what worked, and explain any failures. Exit code 3 means an optional binary (pandoc, pdftotext, pdftoppm, weasyprint...) is missing — relay the install hint from stderr. Exit code 4 means an unsupported input/conversion pair — suggest a supported target from the matrix.

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 · +5 lines fb0bd1ea2ffb
  2. 1mo ago Changed · +44 lines · +14 tokens per session 7ae5315e0110
  3. 1mo ago Changed 81f850365e94
  4. 1mo ago First seen · 28 lines · 32 tokens per session scan A d863cfe9e39a

Subscribe to this mod's changes

convert is a command published in the GitHub repository coltonbearden/carrel (2 stars, last pushed 2d ago), licensed MIT. It adds 46 tokens to every session and 1,190 once invoked, about $0.0002 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-08-31.