search

search is a command for coding agents from coltonbearden/carrel. It costs 23 tokens per session (466 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

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

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.

agentmods
npx agentmods add commands/coltonbearden/carrel/search
Clone the repo
git clone --depth 1 https://github.com/coltonbearden/carrel

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 466 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00023 $0.00466
Opus 5 $0.00012 $0.00233
Sonnet 5 $0.00005 $0.00093
Haiku 4.5 $0.00002 $0.00047

Measured today against content hash 3ae3cfcc842d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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 · 28 lines

What it actually says

Search the desk index for: $ARGUMENTS

Run the carrel CLI via Bash. Map the user's request onto these real flags of carrel search (verify with carrel search --help if unsure — never invent flags):

carrel --json [--root DIR] search "QUERY" [--limit 20] [--type pdf,md] [--tag TAG] [--fail-empty]

Note: --json and --root are global flags and must come before search.

  • 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).
  • --tag TAG (repeatable): only files carrying every given tag.
  • --limit N (default 20).
  • --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 the global --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.

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. today Changed 3ae3cfcc842d
  2. 4d 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 (1 stars, last pushed today), licensed MIT. It adds 23 tokens to every session and 466 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-08-31.