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 commands/ttdazi/cursoraicommit/commitgit clone --depth 1 https://github.com/ttdazi/CursorAiCommitWhat 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.00000 | $0.01022 |
| Opus 5 | $0.00000 | $0.00511 |
| Sonnet 5 | $0.00000 | $0.00204 |
| Haiku 4.5 | $0.00000 | $0.00102 |
Grade A, and why
commit 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 — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
commit
生成符合 Conventional Commits 规范的 Git Commit Message,支持{language_type1}{language_type2}动态切换。
语言类型配置
可配置变量(用户可以根据需要修改这些值):
{language_type1}= "中文"{language_type2}= "英文"
使用说明:以下所有出现 {language_type1} 和 {language_type2} 的地方,将自动替换为上述配置的值。
核心原则
- 基于实际代码变更:commit 信息必须基于实际代码变更内容生成,而不是仅根据文件名猜测。
- 关注具体变更:专注于具体的代码改动,避免泛泛而谈。描述要具体到修改了什么功能、添加了什么代码、修复了什么问题。
- 隐私保护:
- 不要输出姓名、邮箱地址或其他个人身份信息(除非在代码变更中明确存在且是必要的)
- 不要输出 bug ID、issue ID、ticket ID 或其他唯一标识符(除非在代码变更中明确存在且是必要的)
- 简洁准确:commit 信息要简洁明了,准确反映代码的实际变更内容,不超过 60 字符。
使用方法
在 Chat 中输入以下命令:
/commit {language_type1}- 生成{language_type1} commit 信息/commit {language_type2}- 生成{language_type2} commit 信息/commit- 默认生成{language_type1} commit 信息
执行流程
- 检查暂存区和工作区:执行
git status --short检查暂存区和工作区状态,如果没有暂存文件,自动暂存工作区的变更 - 获取代码变更:执行
git --no-pager diff --cached获取完整代码变更内容(使用 --no-pager 避免分页器阻塞) - 分析代码变更:阅读实际代码,专注于具体的改动,理解:
- 具体修改了什么功能?(例如:添加了用户登录验证逻辑)
- 具体添加了什么新代码?(例如:新增了 token 过期检查函数)
- 具体修复了什么问题?(例如:修复了登录后页面跳转失败,原因是缺少 await)
- 避免使用"更新代码"、"修改文件"等模糊描述
- 生成 commit message:基于实际变更内容,按 Conventional Commits 规范生成,subject 应包含主要变更要点
- 显示结果并询问确认:展示变更内容摘要和跨平台提交命令
- 执行提交:用户确认后执行 git commit
Commit 类型
feat: 新功能fix: 修复 bugdocs: 文档变更style: 代码格式refactor: 代码重构perf: 性能优化test: 测试相关chore: 构建/工具
输出格式
📋 暂存区变更信息:
变更文件:
- <文件1> (状态)
主要变更内容: <基于 git diff 的实际代码变更,简要说明改了什么>
变更摘要:新增 X 个 | 修改 Y 个 | 删除 Z 个
📝 生成的 Commit Message:
<type>(<scope>): <subject>
- <主要变更1>
- <主要变更2>
- <主要变更3>
💻 提交命令(跨平台):
Windows PowerShell(避免乱码):
$msg = "<commit message>"; $bytes = [System.Text.Encoding]::UTF8.GetBytes($msg); [System.IO.File]::WriteAllBytes("$env:TEMP\commit-msg.txt", $bytes); git commit -F "$env:TEMP\commit-msg.txt"
Mac/Linux/Git Bash:
git commit -m "<commit message>"
❓ 确认提交:
是否需要执行此 commit?回复'好的'、'可以'、'yes'等即可执行。
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 First seen · 106 lines · 0 tokens per session scan A c14160ad285b
commit is a command published in the GitHub repository ttdazi/CursorAiCommit (2 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,022 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-08-31.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.