commit

commit is a cursor rule for Cursor from YuDefine/nuxt-supabase-starter. It costs 2,859 tokens per session, scanned C, original, MIT.

A required workflow for Git commits, including a full checklist for reviews, tests, work-in-progress changes, staging, recovery, and tags.

In plain words
What is it for?
It is used whenever someone runs a commit, stages changes, saves work in a stash, creates a tag, or pushes tags.
Why use it?
It keeps commits focused and checked, especially when several work sessions share one working directory.

Cursor rule for Cursor

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 rules/yudefine/nuxt-supabase-starter/commit
Clone the repo
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starter

Made for: Cursor.

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 commit

README.md
[![agentmods](https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/commit.svg)](https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/commit)
Your own site
<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/commit"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/commit.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,859 This file is loaded in full into every session.
When invoked 2,859 The same file — it is already loaded in full.
Security scan C 1 finding. 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.1 $0.02859 $0.02859
Opus 5 $0.01430 $0.01430
Sonnet 5 $0.00572 $0.00572
Haiku 4.5 $0.00286 $0.00286

Measured today against content hash f11c6eadfcf7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade C, and why

commit scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **NEVER** `rm -rf <openspec/changes/**>` / `rm -rf <screenshots/**>` 等批次刪除含 user-authored / hook-authored 內容的目錄
template/.cursor/rules/commit.mdc · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Commit

所有 commit MUST 透過 /commit command 執行。NEVER 直接 git commit(例外見下)。

強制載入指針(thin pointer;全文在 [[commit.detail]])

本檔只常駐兩件東西:commit 的強制入口WIP 處置禁令 / 話術關鍵詞表(破壞性動作在任何 session 都可能發生,那張表必須每一輪都在視窗內)。其餘全文在 rules/core/commit.detail.md(path-scoped,glob 只涵蓋 HANDOFF.md / tasks/** / .clade/claims/** / .clade/work-loop/**——它的觸發是下一行那個具名時機,不是編輯檔案順帶載入)。

下任何 git commit / git add / git stash / git tag / git push --tags / git push origin v<版本> / /commit 之前,MUST 先讀 [[commit.detail]]——沒讀到就等於沒有 gate 清單、沒有 --only 紀律、沒有 recovery 流程。

搬走的段 去 [[commit.detail]] 的 §
理由(0-A ~ Step 5 各 gate 定性) § 理由
Single Session Lock § Single Session Lock
WIP 處置決策樹 § WIP 處置決策樹
Commit 預設位置:main worktree(含 stash 合法中介 / 禁止項 / artifact-tick) § Commit 預設位置:main worktree
Ad-hoc commit 必走 git commit --only -- <paths>(含 Verify / Recovery / 路徑白名單) § Ad-hoc commit 必走 git commit --only -- <paths>
Multi-session shared working-tree 的 git hazard § Multi-session shared working-tree 的 git hazard
main / master 限定的兩條 hard gate § main / master 限定的兩條 hard gate
禁止事項(--amend / --no-verify / doctor 等) § 禁止事項
Stash 自動處置 gate § Stash 自動處置 gate
例外(極少)、Commit 分組與訊息規範、搭配 § 例外(極少)起

pre-commit hook 三條紀律(always-load;hook 是 fleet 預設形態)

三條各綁一個下指令當下看得到的 predicate,每一個.husky/pre-commit 的 repo 都適用—— 不是只有「hook 看起來很慢」的那些,也不是只對最後一次 commit。

  1. repo 存在 .husky/pre-commitgit commit MUST 走 run_in_background: true 前景呼叫被 tool timeout kill 時,index 已 staged 而 commit 沒落地,外觀與「commit 失敗」 逐字相同;照那個外觀重跑,是在一個不同的起始狀態上再跑一次。NEVER 用「這個 repo 的 hook 平常很快」略過——快慢是上一次的觀測,.husky/pre-commit 存在與否才是這一次的事實。

Read the full file on GitHub · 106 lines

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 · +9 tokens per session f11c6eadfcf7
  2. 2d ago First seen · 106 lines · 2,850 tokens per session scan C 3191736e758a

Subscribe to this mod's changes

commit is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed today), licensed MIT. It adds 2,859 tokens to every session, about $0.0143 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.