Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/davekilleen/Dexnpx agentmods add rules/davekilleen/dex/search-routingWrote 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/davekilleen/dex/search-routing)<a href="https://agentmods.dev/rules/davekilleen/dex/search-routing"><img src="https://agentmods.dev/badge/rules/davekilleen/dex/search-routing/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/davekilleen/dex/search-routing"><img src="https://agentmods.dev/badge/rules/davekilleen/dex/search-routing.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.00559 | $0.00559 |
| Opus 5.5 | $0.00224 | $0.00224 |
| Sonnet 5.5 | $0.00112 | $0.00112 |
| Haiku 4.5 | $0.00056 | $0.00056 |
Grade A, and why
search-routing 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 6d 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
Smart Search Routing (All Platforms)
Before ANY vault search operation, check QMD availability:
node .scripts/semantic-search/check-availability.cjs --quiet
# Exit 0 = QMD available → use qmd query
# Exit 1 = QMD unavailable → fall back to grep
Collection Mapping
Use qmd query "your intent" -c <collection> for all vault content searches:
| Content Type | QMD Collection | Fallback Path |
|---|---|---|
| Meeting notes | meetings |
00-Inbox/Meetings |
| Archived meeting notes | meetings_archive |
07-Archives/Meetings |
| People / person pages | people |
05-Areas/People |
| Projects / initiatives | projects |
04-Projects |
| Accounts / deals | accounts |
05-Areas/Relationships/Key_Accounts |
| Tasks | tasks |
03-Tasks |
| Goals | goals |
01-Quarter_Goals |
| Weekly priorities | priorities |
02-Week_Priorities |
| PRDs / feature specs | prds |
System/PRDs |
| Implementation plans | plans |
plans/ |
| Session learnings | learnings |
System/Session_Learnings |
| Reference / guides | resources |
06-Resources |
| Career / content / events | areas |
05-Areas |
| LinkedIn / newsletter / YouTube intel | intel |
00-Inbox/*_Intel |
Rules
- Never hardcode vault folder paths for content covered by a QMD collection
- Never use
grep -ror file globbing for natural language vault searches - Always check availability first — QMD unavailable = grep fallback, not skip
- Code files (
.ts,.tsx,.py,.json) are NOT in QMD — use grep/glob for those
Example
# ✅ Correct — semantic intent, QMD routes it
qmd query "renewal risk accounts not touched" -c accounts
# ❌ Wrong — bypasses routing
grep -r "renewal" 05-Areas/Relationships/Key_Accounts/
This routing applies in Cursor, Claude Code, and Pi sessions — no exceptions.
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.
- 6d ago Changed · +1 lines · +20 tokens per session d0bab90ac317
- 1mo ago First seen · 55 lines · 539 tokens per session scan A 76f402408cad
search-routing is a cursor rule published in the GitHub repository davekilleen/Dex (508 stars, last pushed 3d ago), licensed MIT. It adds 559 tokens to every session, about $0.0022 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-03.
Other cursor rules, from other repositories
use-profile
Always consult the user's personal profile via the mcp-me MCP server before answering.
learned-conventions
A stored set of coding and release preferences collected from earlier conversations.
wrapup
End-of-session wrap-up: summarizes the session and pushes a log to the project's linked NotebookLM notebook. Activate with @wrapup in chat, or "wrap up", "save this session", or "end of session".
140-unified-command-interface
WHEN processing commands APPLY unified interface patterns for consistent memory bank operations.
160-workflow-orchestration
WHEN executing tasks MANAGE workflow processes for consistent memory operations.
170-protocol-enforcement-mechanisms
description: WHEN executing commands ENFORCE protocol compliance for memory bank operations globs: ["/.md", "/.mdc"] alwaysApply: true.