index

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

An indexing command for building or refreshing carrel's local file database. It scans supported files so search, query-based packing, and MCP tools can find their content.

In plain words
What is it for?
Use it to index a desk or selected paths, update individual files, OCR images or scanned PDFs, prune missing files, or view index status.
Why use it?
It avoids rescanning unchanged files and can remove records for files that no longer exist. Optional OCR adds searchable text to images and scanned PDFs when the required tools are installed.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the carrel-agent plugin — 1 skill, 4 commands, 1 agent, 1 hook, 1 MCP server shipped together

Good fit Use it to index a desk or selected paths, update individual files, OCR images or scanned PDFs, prune missing files, or view index status.

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

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 index

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/coltonbearden/carrel/index"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/index.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 938 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.00000 $0.00938
Opus 5 $0.00000 $0.00469
Sonnet 5 $0.00000 $0.00188
Haiku 4.5 $0.00000 $0.00094

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

Security

Grade A, and why

index 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-agent/commands/index.md · 53 lines

What it actually says

Index for the desk: $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 index --help differs, trust the installed version — never invent flags):

Usage: carrel index [OPTIONS] [PATHS]...

  Index PATH... (default: the desk root) into .carrel/carrel.db.

  Walks directories for the supported file types plus plain-text source and config files (.py, .rs,
  .toml, .yaml, ... — indexed as type `code`, use --no-source to skip them), honoring .gitignore and
  skipping hidden entries (.carrel, .git, dotfiles). Files unchanged since the last run (same size +
  mtime) are skipped. Text comes from core.textextract; images are registered but only get
  searchable text with --ocr. Progress goes to stderr; the JSON summary is {"indexed", "skipped",
  "pruned", "errors"}. `--status` prints the `carrel catalog status` report instead.

Options:
  --ocr           OCR images and scanned PDFs (needs tesseract / ocrmypdf).
  --prune         Remove index rows whose files no longer exist on disk.
  --update        Treat PATH... as individual files to (re)index — no directory walking; unsupported
                  or missing files are silently skipped.
  --if-indexed    Exit 0 silently when no desk db exists yet under --root (for hooks: only refresh
                  an index someone already created).
  --no-source     Skip plain-text source and config files (.py, .rs, .toml, .yaml, ...); index only
                  the document types.
  --no-gitignore  Do not honor .gitignore files while walking.
  --status        Report index health instead of indexing (alias of `carrel catalog status`); other
                  options are ignored. Exit 4 when no desk db exists under --root.
  --json          Machine-readable JSON output.
  --help          Show this message and exit.

Note: --json and --root are global flags and go before index (carrel --json --root DIR index). The desk root is where .carrel/carrel.db lives — default cwd; use --root when the user's collection is elsewhere.

  • No PATHS: index the whole desk root. Directories are walked for supported types; hidden entries (.carrel, .git, dotfiles) are skipped. Unchanged files (same size + mtime) are skipped, so re-running is always cheap and safe.
  • --ocr: also make images/scanned PDFs searchable (needs tesseract/ocrmypdf) — only when the user wants scan text found.
  • --prune: drop index rows for files that no longer exist. --update FILE...: (re)index just those files, no walking.
  • --if-indexed: hook mode — silently exit 0 when no desk exists yet (never creates one).
  • --status: report index health (schema_version, row counts, stale.changed/missing/unindexed) instead of indexing — the same report as carrel catalog status.

Interpret {indexed, skipped, pruned, errors} for the user; if --status shows stale entries, offer a plain carrel index (and --prune for missing files). Exit code 3 means an OCR binary is missing — relay the install hint from stderr. Exit code 4 with --status means there is no desk db yet.

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 Changed · +4 lines a7814f26482c
  2. 7d ago First seen · 49 lines · 0 tokens per session scan A 46e844b3b010

Subscribe to this mod's changes

index is a command published in the GitHub repository coltonbearden/carrel (1 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 938 tokens. 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.