search

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

A command for full-text searching a local carrel desk index, an index of files on the user’s computer. It uses ranked FTS5 search, which matches words and phrases across indexed documents.

In plain words
What is it for?
Use it to search indexed notes, PDFs, and other files with phrases, prefixes, Boolean operators, type filters, tags, and result limits.
Why use it?
It finds relevant local files without opening them one by one and can narrow results by file type or tag.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the carrel-inspect plugin — 1 skill, 4 commands shipped together

Good fit Use it to search indexed notes, PDFs, and other files with phrases, prefixes, Boolean operators, type filters, tags, and result limits.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/coltonbearden/carrel/search"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 789 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.00029 $0.00789
Opus 5.5 $0.00012 $0.00316
Sonnet 5.5 $0.00006 $0.00158
Haiku 4.5 $0.00003 $0.00079

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

Security

Grade A, and why

search 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-inspect/commands/search.md · 47 lines

What it actually says

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

Usage: carrel search [OPTIONS] QUERY

  Full-text search the desk index for QUERY (FTS5 syntax, bm25-ranked).

  Matched terms are bracketed in the snippet. Filters combine with AND. JSON output is a list of
  {"path", "score", "snippet"} (lower bm25 score = better match). Run the `index` command first to
  build the index under --root.

Options:
  --limit INTEGER   Maximum number of hits.  [default: 20]
  --type T1,T2      Only these file types, comma-separated (e.g. pdf,md).
  --tag TAG         Only files carrying TAG (repeatable — every TAG must match).
  --meta CONDITION  Only files whose fields satisfy CONDITION, e.g. vendor=acme, total>1000,
                    due<2026-11, paid? (repeatable — every one must hold; see `meta find`).
  --fail-empty      Exit 5 when there are no hits.
  --json            Machine-readable JSON output.
  --help            Show this message and exit.

Note: --json and --root are global flags and go before search (carrel --json --root DIR search "QUERY").

  • QUERY uses FTS5 syntax: quoted phrases ("exact phrase"), AND/OR/NOT, prefix matching (term*). Translate natural-language requests into a sensible FTS5 query.
  • --type T1,T2: restrict to file types (e.g. pdf,md) — use it when the user says "which PDFs..." or "in my notes".
  • --tag TAG (repeatable, ANDed): only files carrying every given tag — pairs with /carrel-organize:tag.
  • --limit N (default 20). --fail-empty: exit 5 instead of an empty list when nothing matches (handy in scripts).
  • --root DIR: use it when the user's desk lives somewhere other than the cwd.

The index must exist first: if the search errors because there is no index under --root, run carrel index there (add --ocr only if the user wants image/scan text searchable) and retry, telling the user what you did.

Always use --json and interpret the {path, score, snippet} hits (lower bm25 score = better): present the top hits with their snippets, matched terms are bracketed. No hits → suggest a broader query, a different --type, or re-indexing. To turn the hits into context for a longer answer, hand the same query to /carrel-inspect:pack --query.

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 3f88ecfcb050
  2. 1mo ago Changed · +17 lines · +6 tokens per session 9992536a5a5a
  3. 1mo ago Changed 3ae3cfcc842d
  4. 1mo ago First seen · 28 lines · 23 tokens per session scan A 57819fb009f6

Subscribe to this mod's changes

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