extract-images

extract-images is a command for Claude Code from coltonbearden/carrel. It costs 25 tokens per session (585 once invoked), scanned A, original, MIT.

A command-line tool that saves images embedded in PDFs or ICO files, or local images referenced by an HTML file. For HTML, it copies only image files found locally beside the document and does not fetch remote URLs.

In plain words
What is it for?
Use it to extract PDF images, unpack ICO images, or collect local HTML image files into an output directory.
Why use it?
It separates reusable images from documents without downloading unknown remote content. PDF extraction can also ignore images smaller than a chosen size.

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 extract PDF images, unpack ICO images, or collect local HTML image files into an output directory.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/coltonbearden/carrel/extract-images.svg)](https://agentmods.dev/commands/coltonbearden/carrel/extract-images)
Your own site
<a href="https://agentmods.dev/commands/coltonbearden/carrel/extract-images"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/extract-images.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 585 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.00025 $0.00585
Opus 5 $0.00013 $0.00293
Sonnet 5 $0.00005 $0.00117
Haiku 4.5 $0.00003 $0.00059

Measured 2d ago against content hash 2f857a811206, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

extract-images 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 2d 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/extract-images.md · 38 lines

What it actually says

Extract the images from: $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 extract-images --help differs, trust the installed version — never invent flags):

Usage: carrel extract-images [OPTIONS] SRC

  Extract images embedded in / referenced by SRC (pdf, ico, html).

  pdf uses pdfimages, ico uses icotool (or a Pillow fallback), html copies local <img src> files
  that exist next to the document — remote URLs are never fetched. With --json, prints one JSON
  object {"src", "out_dir", "count", "extracted"}.

Options:
  --out-dir DIRECTORY       Output directory [default: <SRC>-images next to the source].
  --min-size INTEGER RANGE  pdf mode: discard images smaller than this on either edge.  [default:
                            32; x>=1]
  --json                    Machine-readable JSON output.
  --help                    Show this message and exit.
  • SRC: a pdf (via pdfimages), an ico (via icotool, Pillow fallback), or an html file — for html only local <img src> files that exist next to the document are copied; remote URLs are never fetched.
  • --out-dir DIR (default <SRC>-images next to the source): where the images land.
  • --min-size N (pdf only, default 32): drop images smaller than N px on either edge — raise it when the user wants "the real figures, not icons".

Use --json and interpret {src, out_dir, count, extracted}: report how many images were written and where; offer carrel thumb on the output directory if the user wants a quick look. Exit code 3 means pdfimages (poppler-utils) or icotool is missing — relay the install hint from stderr. Exit code 4 means the input type has no extractable images.

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. 2d ago First seen · 38 lines · 25 tokens per session scan A 2f857a811206

Subscribe to this mod's changes

extract-images is a command published in the GitHub repository coltonbearden/carrel (1 stars, last pushed 3d ago), licensed MIT. It adds 25 tokens to every session and 585 once invoked, about $0.0001 per session on Opus 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-05.