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.
git clone --depth 1 https://github.com/kensaurus/cursor-kenjiWrote 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.
[](https://agentmods.dev/rules/kensaurus/cursor-kenji/shell-first-search)<a href="https://agentmods.dev/rules/kensaurus/cursor-kenji/shell-first-search"><img src="https://agentmods.dev/badge/rules/kensaurus/cursor-kenji/shell-first-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.
<a href="https://agentmods.dev/rules/kensaurus/cursor-kenji/shell-first-search"><img src="https://agentmods.dev/badge/rules/kensaurus/cursor-kenji/shell-first-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00036 | $0.00233 |
| Opus 5.5 | $0.00014 | $0.00093 |
| Sonnet 5.5 | $0.00007 | $0.00047 |
| Haiku 4.5 | $0.00004 | $0.00023 |
Grade A, and why
shell-first-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 22d 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.
What it actually says
Shell-first search fallback
Cursor's dedicated Grep and Glob tools are the default for text and
filename search. Claude Code has its own search tools. This note is a
fallback, not a ban on native search.
- Prefer native search tools (
Grep/Globin Cursor; Claude's Grep). - If a search tool hangs for >30 s (seen on Windows hosts), kill the PID
from the terminal header and retry with a narrower
path/head_limit. - Shell
grep -rn,ls, andfind … | headare the fallback when native search is stuck or unavailable. Quote paths that contain spaces. SemanticSearch(meaning) andRead(known paths) stay the right tools for those jobs — do not replace them with Shell.
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.
- 22d ago First seen · 20 lines · 36 tokens per session scan A e88e82e3a776
shell-first-search is a cursor rule published in the GitHub repository kensaurus/cursor-kenji (9 stars, last pushed 17d ago), licensed MIT. It adds 36 tokens to every session and 233 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-09-24.
Other cursor rules, from other repositories
templates-core
Essential templates for Memory Bank files.
composer-coding-excellence
Editing source, tests, types, or build files in any language — surgical diff, match the file's language idioms, run the narrowest check.
composer-core
Always-on spine — programming-first fast path, high effort on hard code, confusion-weight asks, proof labels.
clarify-first
Infer-and-act by default — ask only on high confusion weight, after inspecting, with a decision-linked question.
composer-debugging
Failing tests, errors, flaky behavior, or a bug with no clear line — reproduce, trace the data, fix the cause, prove it with one scoped test.
composer-senior-practices
Version-pinned framework guidance from primary docs when building on unfamiliar stacks, upgrading, or reviewing architecture — load when evidence beats training data; not required for routine feature work.