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.
npx agentmods add rules/yudefine/nuxt-supabase-starter/agent-routinggit clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starterWrote 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/yudefine/nuxt-supabase-starter/agent-routing)<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/agent-routing"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/agent-routing.svg" alt="Measured on agentmods" 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 | $0.16087 | $0.16087 |
| Opus 5 | $0.08044 | $0.08044 |
| Sonnet 5 | $0.03217 | $0.03217 |
| Haiku 4.5 | $0.01609 | $0.01609 |
Grade A, and why
agent-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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 490 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Routing
核心命題:當工作交給另一個 runtime + model 組合的成本/品質明顯更好時,必須 handoff 而不是硬幹。但派工的預設是不派——先過 § 派不派,命中外派條件才進 Routing Table。本規則優先於個別 skill 內嵌的工具呼叫指示。
本檔是 routing 主規則(每 session 必載入)。派工模板、Watch Protocol、Plan-first / Git baseline、Runtime Gate 在
agent-routing.pi-watch-protocol.md(下稱 reference)。決定要派 pi 之後、送出 dispatch 之前,MUST 先 Read reference 的 § Pi 派工的標準流程。 reference 的
paths:綁的是 spectra / screenshot 情境,「單純要派 pi」的 session 不會自動載入它——靠 auto-load 會讀不到(成因與實測見docs/rule-rationale/agent-routing.md)。
派不派(先於派給誰)
主線自己做是預設。違反字面就是違反精神——「反正派了比較快」「一件一個 agent 比較整齊」都不算遵守。下面的 Routing Table 決定派給誰,本節決定派不派:講不出命中哪一條外派條件,就是主線自己做。
外派條件(命中任一才派):
- 寬掃——要讀 5 個以上檔案或整棵目錄樹才答得出的問題。派 scout 回結構化事實表(檔名 / 行號 / 現值 / 判準命中與否),原文不進主線
- 有份量的獨立平行軌——兩條以上彼此不讀對方產出的工作,且每一條都要 10+ tool call 才做得完
- 長時間 background job——跑得久且主線不必盯著(build / 大量 test / 長 migration)
- 需要隔離環境——worktree 平行改動、會互相踩檔或搶 port 的工作
不外派(命中就自己做,即使同時有好幾條):少量工具即可結束;路徑已知的少量讀取;規約 / 契約 / 對外文件的定稿措辭(會原樣成為交付物的最終文字);UI view 實作與視覺判讀 / Design Review(component / page / view / layout / styling —— 實作與品質判定都留主線 Opus,NEVER 派 Pi 任一 model、NEVER 派 Claude subagent);需要 claude.ai-connected MCP、且 ntn CLI 做不到 的工作(Notion 走 〔notion-ops〕,不在此列);安全敏感或不可逆的動作(憑證 / 刪檔 / force push / 對外發佈);複驗自己剛做完的東西(判準見 [[checker-subagent]] § 過度派)。
具名 threshold 優先於上段的 generic「少量」判準:同一 prompt segment 準備執行第 3 個高信心 readonly Bash、第 5 個 distinct textual Read,或第一次 Read 501+ 行文字檔時,PreToolUse gate 會建立 pending decision。主線 MUST 以 decision-linked dispatch(exact trigger 走 luna low;更具體工作可走共用 policy 驗證過的 concrete Pi row)、structured waiver,或 dispatcher exit 3/4 後的 matching fallback authorization receipt 結案;完整命令與狀態轉移見 reference § Routing threshold gate。
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.
- yesterday Changed · +45 lines · -449 tokens per session 46b56545b98e
- 5d ago First seen · 445 lines · 16,536 tokens per session scan A 15b403b34213
agent-routing is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed yesterday), licensed MIT. It adds 16,087 tokens to every session, about $0.0804 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-30.
Other cursor rules, from other repositories
browser-extension
Browser extension patterns and development practices.
test-setup-patterns
Test setup and configuration patterns.
process-management
Process management and zombie process prevention patterns.
coverage-thresholds
Coverage threshold configuration patterns.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.