Borrowing it
Nothing to install: this file belongs to shenjingnan/home-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shenjingnan/home-mcp/main/.claude/commands/gen-commit.mdgit clone --depth 1 https://github.com/shenjingnan/home-mcpWrote 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/commands/shenjingnan/home-mcp/gen-commit)<a href="https://agentmods.dev/commands/shenjingnan/home-mcp/gen-commit"><img src="https://agentmods.dev/badge/commands/shenjingnan/home-mcp/gen-commit/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/shenjingnan/home-mcp/gen-commit"><img src="https://agentmods.dev/badge/commands/shenjingnan/home-mcp/gen-commit.svg" alt="Reviewed on agentmods" width="80" 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.00008 | $0.01073 |
| Opus 5.5 | $0.00003 | $0.00429 |
| Sonnet 5.5 | $0.00002 | $0.00215 |
| Haiku 4.5 | $0.00001 | $0.00107 |
Grade A, and why
gen-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 2mo 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.
What it actually says
我希望你提供给我的内容
- 符合 git 规范的 commit 标题和详细说明
- 你认为合理的一个分支名称
- 生成的 commit 信息必须是中文
- 重点:提供便于代码评审人快速理解改动的完整信息
代码评审友好的 commit 信息要求
一个好的 commit 信息应该让评审人能够:
- 快速理解改动的背景和动机
- 明确知道改动的范围和影响
- 了解技术实现的关键点
- 知道如何验证改动的正确性
一些提示信息
- 你可以通过命令:git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' 知道当前仓库的主分支名称
- 获取主分支名称后,需要与远端主分支进行对比,因为本地主分支代码可能落后
- 当前本地的 origin 可能不是最新,应该先执行
git fetch origin更新 - 优先检查未 git add 的改动
- 执行命令时避免交互操作,因为无法进行用户干预。推荐使用
--no-pager选项
我的要求
基本要求:
- commit 标题符合 git 规范,简洁明确,不超过 50 字符
- 忽略当前分支名称(不具有参考价值)
- 仅提供 commit 信息建议,不执行实际的代码提交操作
Type 类型:
feat:新增 featurefix:修复 bugdocs:仅仅修改了文档,比如 README、CHANGELOG、CONTRIBUTE 等等style:仅仅修改了空格、格式缩进、逗号等等,不改变代码逻辑refactor:代码重构,没有加新功能或者修复 bugperf:优化相关,比如提升性能、体验test:测试用例,包括单元测试、集成测试等chore:改变构建流程、或者增加依赖库、工具等revert:回滚到上一个版本
分支命名规范:
- 使用前缀:
feature/、bugfix/、docs/、test/ - 分支名简洁反映改动内容,采用 kebab-case 格式
Commit 信息结构要求:
<type>(<scope>): <subject>
## 改动说明
- 为什么改:<改动动机和问题背景>
- 改了什么:<具体的改动内容>
- 影响范围:<受影响的模块和兼容性>
- 验证方式:<测试方法或验证点>
输出格式:
<分支名称>
<type>(<scope>): <subject>
## 改动说明
- 为什么改:<改动动机和问题背景>
- 改了什么:<具体的改动内容>
- 影响范围:<受影响的模块和兼容性>
- 验证方式:<测试方法或验证点>
Commit 示例
示例 1:功能开发
feat(api): 新增用户认证接口
## 改动说明
- 为什么改:提升系统安全性,实现基于JWT的用户认证
- 改了什么:新增UserAuthController,实现register、login、refresh-token接口
- 影响范围:新增/api/auth/*路由,需要前端适配认证流程
- 验证方式:新增15个单元测试,集成测试验证完整流程
示例 2:Bug 修复
fix(core): 修复内存泄漏导致的性能问题
## 改动说明
- 为什么改:生产环境发现内存持续增长导致服务崩溃
- 改了什么:修复EventEmitter监听器未移除问题,优化内存管理
- 影响范围:核心服务内存使用优化约30%,API接口保持不变
- 验证方式:24小时压力测试验证内存稳定性
生成 Commit 时的注意事项
- 保持真实性:基于实际代码改动生成信息,不要虚构不存在的内容
- 突出重点:评审人最关心的是"为什么改"和"改了什么"
- 具体明确:避免模糊的描述,如"优化了性能"应具体说明如何优化
- 结构清晰:按照模板结构组织信息,便于快速阅读
- 技术准确:确保技术实现描述的准确性和专业性
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.
- 2mo ago First seen · 116 lines · 8 tokens per session scan A 1014f3dbcc5b
gen-commit is a command published in the GitHub repository shenjingnan/home-mcp (23 stars, last pushed 9mo ago), licensed MIT. It adds 8 tokens to every session and 1,073 once invoked, about $0.0000 per session on Opus 5.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.
gen-commit compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| gen-commitshenjingnan/home-mcp | Command | 23 | 9mo ago | MIT | A | 8 | Claude Code |
| standupvvedantb/eva | Command | 101 | yesterday | MIT | A | 0 | Claude Code |
| gitazrtydxb/procoder | Command | 211 | 11d ago | Apache-2.0 | A | 20 | Claude Code |
| session-reportdamusix/atomic-claude | Command | 115 | 4d ago | MIT | A | 31 | Claude Code |
| commitechoVic/blade-code | Command | 181 | 24d ago | MIT | A | 8 | Claude Code |
| git-workflowHermeticOrmus/LibreUIUX-Claude-Code | Command | 115 | 1mo ago | MIT | A | 14 | Claude Code |
| commitjoaquimscosta/arkhe-claude-plugins | Command | 22 | 22d ago | MIT | A | 11 | Claude Code |