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/commit.trunk-gatesgit 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/commit.trunk-gates)<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/commit.trunk-gates"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/commit.trunk-gates.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.1 | $0.00000 | $0.02987 |
| Opus 5 | $0.00000 | $0.01494 |
| Sonnet 5 | $0.00000 | $0.00597 |
| Haiku 4.5 | $0.00000 | $0.00299 |
Grade A, and why
commit.trunk-gates 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Commit — Trunk Gates([[commit]] detail)
本檔是 [[commit]] 的 path-scoped 延伸:兩條 main / master 限定 hard gate + multi-session git hazard 交叉索引。核心紀律(git commit --only -- <paths>、§ 禁止事項、Commit 預設位置)留在 [[commit]] 本體 always-load,因為那些由「跑 commit 這個動作」觸發、不必然伴隨檔案存取;本檔兩條 gate 的觸發條件本身就是 openspec/changes/**,故可 path-scoped。
Multi-session shared working-tree 的 git hazard 地圖
多 session 並行是常態,「全 working tree scope」的 git 操作會 silently 吃進別 session 的 staged WIP / untracked 新檔 / stash 內容 → mixed commit、WIP 永久遺失、deploy commit 內容跟 message 不符。
交叉索引
| 危害點 | 既有規約 | Pitfall |
|---|---|---|
Ad-hoc git add + git commit 吃別 session staged WIP |
[[commit]] § Ad-hoc commit 必走 git commit --only -- <paths> |
[[pitfall-consumer-ad-hoc-commit-eats-other-session-staged]] |
git stash push 不帶 pathspec → scope leak |
[[worktree-default]] §1(Stash strategy 隱性風險 / Anti-pattern 手動 selective baseline sync) | [[pitfall-git-stash-pathspec-scope-leak]] |
publish.ts auto-stash 把 tracked file 捲進 deploy commit |
[[worktree-default]] §1 + [[clade-publish]] § Step 3(分組 commit,禁 --stash-untracked 對 tracked dirty) |
[[pitfall-publish-auto-stash-bundles-tracked-into-deploy-commit]] |
publish.ts flow 清掉別 session 的 parallel untracked file |
[[worktree-default]] §1(Pre-fork baseline guard) | [[pitfall-publish-flow-cleans-parallel-untracked]] |
| Merge-back auto-stash 整批捲走別 session WIP | [[worktree-default]] §5.5(Merge-back ceremony / Stash reconcile) | [[pitfall-merge-back-autostash-bulk-captures-other-session-wip]] |
已撞 mixed commit → [[commit]] § Recovery from mixed commit (multi-session safety);cross-session staged 偵測層 → commit SKILL Step 0-Coord。
Partial Archive Gate(main / master 限定,hard rule)
當前 branch 為 main / master,且某個 change <X>(排除 openspec/changes/archive/)命中下列任一觸發路徑時,MUST 對該 change 同時驗證:
- A(staged-delete) — 本次
/commit含任一openspec/changes/<X>/**staged-delete - B(working tree 殘留) —
openspec/changes/<X>/仍存在但缺tasks.md或proposal.md,即使本次 commit 完全沒有 staged-delete
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.
- 2d ago First seen · 102 lines · 0 tokens per session scan A 49e3fc3f914d
commit.trunk-gates is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,987 tokens. 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
workflow
Development workflow and commit practices.
cmd-build
Implement the next task incrementally — build, test, verify, commit.
speckit_speckit.git.commit
Proxy for the speckit.git.commit workflow.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
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.