git-commit-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWhat I do
我能做什么
- Check for sensitive files: Warn about ,
.env, or other secrets before stagingcredentials.json - Review changes: Run and
git statusto review all unstaged changesgit diff - Stage changes: Execute to stage all changes (or offer
git add -Afor partial)git add -p - Review staged changes: Run to review what will be committed
git diff --cached - Run pre-commit checks: Run lint/typecheck if available in package.json
- Generate commit message: Create a clear, conventional commit message following standard conventions
- Show preview & confirm: Display the full commit and ask user to confirm/edit
- Commit changes: Execute with the generated message
git commit - Check remote status: Verify branch is up-to-date before pushing
- Push to remote: Push the commit to the current branch (warn on main/master)
- 敏感文件检查:在暂存前针对、
.env或其他密钥类文件发出警告credentials.json - 变更检查:运行和
git status检查所有未暂存的变更git diff - 暂存变更:执行暂存所有变更(或提供
git add -A选项实现部分暂存)git add -p - 检查已暂存变更:运行检查待提交的内容
git diff --cached - 执行pre-commit检查:如果package.json中配置了lint/类型检查,就运行对应的命令
- 生成提交信息:遵循标准规范生成清晰的约定式提交信息
- 预览与确认:展示完整的提交信息,询问用户确认或编辑
- 提交变更:使用生成的信息执行命令
git commit - 检查远程状态:推送前验证分支是否为最新版本
- 推送到远程:将提交推送到当前分支(向main/master分支推送时会发出警告)
When to use me
适用场景
Use this when you want to:
- Commit all staged changes with a well-crafted commit message
- Ensure changes are properly reviewed before committing
- Quickly push commits to the remote repository
当你有以下需求时可以使用我:
- 使用规范的提交信息提交所有暂存的变更
- 确保提交前所有变更都经过妥善检查
- 快速将提交推送到远程仓库
How to use
使用方法
- Load this skill:
skill({ name: "git-commit-review" }) - I'll check for sensitive files and show you the changes
- I'll offer staging options (all or partial)
- I'll run lint/typecheck if available
- I'll generate and show you the commit message for confirmation
- You can edit the message if needed
- I'll commit and push (or skip push if you prefer)
- 加载该skill:
skill({ name: "git-commit-review" }) - 我会检查敏感文件并向你展示变更内容
- 我会提供暂存选项(全部暂存或部分暂存)
- 如果有配置的话我会运行lint/类型检查
- 我会生成提交信息并展示给你确认
- 你可以按需编辑提交信息
- 我会执行提交和推送操作(你也可以选择跳过推送步骤)
Options
可选参数
- Skip push: Tell me "don't push" to skip the push step
- Amend: Tell me "amend" to amend the last commit
- Dry run: Tell me "preview" to see what would happen without committing
- Partial staging: Tell me "partial" to interactively stage hunks
- 跳过推送:告知我「don't push」即可跳过推送步骤
- 增补提交:告知我「amend」即可增补到上一次提交
- 试运行:告知我「preview」即可预览所有操作,不会实际执行提交
- 部分暂存:告知我「partial」即可交互式选择要暂存的代码块
Commit message format
提交信息格式
I'll generate commit messages following conventional commits:
feat: add new feature Xfix: resolve issue with Yrefactor: simplify logic in Zdocs: update documentationchore: update dependencies
For multiple changes, I'll create a summary line and bullet points for details.
If the branch name contains an issue/ticket reference (e.g., ), I'll include it in the commit message.
feature/ABC-123我会遵循约定式提交规范生成提交信息:
feat: add new feature Xfix: resolve issue with Yrefactor: simplify logic in Zdocs: update documentationchore: update dependencies
如果有多项变更,我会生成摘要行并以要点形式列出详情。
如果分支名包含 issue/工单编号(例如 ),我会将其包含在提交信息中。
feature/ABC-123Safety features
安全特性
- Sensitive file warnings: Alert if ,
.env,credentials.json, etc. are being staged*.key - Hook verification: Never skip pre-commit hooks (is prohibited)
--no-verify - Branch protection: Warn when pushing directly to or
mainmaster - Force push protection: Use instead of
--force-with-leaseif force push is needed--force - Up-to-date check: Warn if branch is behind remote before pushing
- 敏感文件警告:如果、
.env、credentials.json等文件被纳入暂存会发出提醒*.key - 钩子验证:永远不会跳过pre-commit钩子(禁止使用参数)
--no-verify - 分支保护:直接向或
main分支推送时会发出警告master - 强制推送保护:如需强制推送,使用代替
--force-with-lease--force - 版本最新检查:推送前如果分支落后于远程版本会发出警告