git

Git rules for writing commit messages and working with branches. A commit is a saved group of code changes, and a branch is a separate line of development.

In plain words
What is it for?
Use it to choose commit labels such as `feat`, `fix`, or `docs`, create personal branches, run checks and unit tests before committing, and avoid automatic commits.
Why use it?
It keeps changes understandable and reduces the risk of coding directly on the main branch or saving untested, oversized commits.

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/un-pany/v3-admin-vite/git
Clone the repo
git clone --depth 1 https://github.com/un-pany/v3-admin-vite

Made for: Cursor.

Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 265 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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 $0.00012 $0.00265
Opus 5 $0.00006 $0.00133
Sonnet 5 $0.00002 $0.00053
Haiku 4.5 $0.00001 $0.00026

Measured 2d ago against content hash d8554597b0c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git 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.

.cursor/rules/git.mdc · 38 lines

What it actually says

Git 提交规范

Commit

提交模板 type: message,具体要求如下:

  1. 注意英文冒号后有一个空格
  2. type 的枚举值有:
  • feat 新功能
  • fix 修复错误
  • perf 性能优化
  • refactor 重构代码
  • docs 文档和注释
  • types 类型相关
  • test 单测相关
  • ci 持续集成、工作流
  • revert 撤销更改
  • chore 琐事(更新依赖、修改配置等)
  1. 保持 message 简洁明了,描述清楚变更内容

分支

  • 优先创建个人分支进行编码
  • 禁止直接对主分支进行编码

其他

  • 禁止自动提交,除非有明确的指示
  • 提交前确保代码通过代码校验和单元测试
  • 避免大型提交,尽量将变更分解为小的、相关的提交
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. 2d ago First seen · 38 lines · 12 tokens per session scan A d8554597b0c6

Subscribe to this mod's changes

git is a cursor rule published in the GitHub repository un-pany/v3-admin-vite (7,047 stars, last pushed 1mo ago), licensed MIT. It adds 12 tokens to every session and 265 once invoked, about $0.0001 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.