Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Analyze changes with Git only and auto-generate conventional commit messages with optional emoji; suggests splitting commits when needed, runs local Git hooks by default (use --no-verify to skip)
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 87% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 173% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 73% | 0% |
| case-04 | ✓→✗ | ▼ Worse | 146% | 0% |
| case-07 | ✓→✗ | ▼ Worse | 406% | 0% |
该命令在不依赖任何包管理器/构建工具的前提下,仅通过 Git:
git add 与 git commit(默认运行本地 Git 钩子;可 --no-verify 跳过)bash/git-commit /git-commit --no-verify /git-commit --emoji /git-commit --all --signoff /git-commit --amend /git-commit --scope ui --type feat --emoji
--no-verify:跳过本地 Git 钩子(pre-commit/commit-msg 等)。--all:当暂存区为空时,自动 git add -A 将所有改动纳入本次提交。--amend:在不创建新提交的情况下修补上一次提交(保持提交作者与时间,除非本地 Git 配置另有指定)。--signoff:附加 Signed-off-by 行(遵循 DCO 流程时使用)。--emoji:在提交信息中包含 emoji 前缀(省略则使用纯文本)。--scope <scope>:指定提交作用域(如 ui、docs、api),写入消息头部。--type <type>:强制提交类型(如 feat、fix、docs 等),覆盖自动判断。> 注:如框架不支持交互式确认,可在 front-matter 中开启 confirm: true 以避免误操作。
git rev-parse --is-inside-work-tree 判断是否位于 Git 仓库。git status --porcelain 与 git diff 获取已暂存与未暂存的改动。--all → 执行 git add -A。git add <paths>)。type(feat/fix/docs/refactor/test/chore/perf/style/ci/revert …)与可选 scope。[<emoji>] <type>(<scope>)?: <subject>(首行 ≤ 72 字符,祈使语气,仅在使用 --emoji 时包含 emoji)。- 开头。BREAKING CHANGE: <description>,或在类型后添加感叹号(如 feat!:)。Closes #123、Refs: #456、Reviewed-by: Name)。git log -n 50 --pretty=%s)判断中文/英文;若无法判断,则回退到仓库主要语言或英文。.git/COMMIT_EDITMSG,并用于 git commit。git commit [-S] [--no-verify] [-s] -F .git/COMMIT_EDITMSGgit add <paths> && git commit ... 的明确指令;若允许执行则逐一完成。git restore --staged <paths> 撤回暂存(命令会给出指令,不修改文件内容)。<type>(<scope>): <subject>。feat:新增功能fix:缺陷修复(含 🔥 删除代码/文件、🚑️ 紧急修复、👽️ 适配外部 API 变更、🔒️ 安全修复、🚨 解决告警、💚 修复 CI)docs:文档与注释style:风格/格式(不改语义)refactor:重构(不新增功能、不修缺陷)perf:性能优化test:新增/修复测试、快照chore:构建/工具/杂务(合并分支、更新配置、发布标记、依赖 pin、.gitignore 等)ci:CI/CD 配置与脚本revert:回滚提交feat:破坏性变更(BREAKING CHANGE: 段落中说明)> 若传入 --type/--scope,将覆盖自动推断。 > 仅在指定 --emoji 标志时才会包含 emoji。
feat、fix、refactor 混在同一提交。Good (使用 --emoji)
text- ✨ feat(ui): add user authentication flow - 🐛 fix(api): handle token refresh race condition - 📝 docs: update API usage examples - ♻️ refactor(core): extract retry logic into helper - ✅ test: add unit tests for rate limiter - 🔧 chore: update git hooks and repository settings - ⏪️ revert: revert "feat(core): introduce streaming API"
Good (不使用 --emoji)
text- feat(ui): add user authentication flow - fix(api): handle token refresh race condition - docs: update API usage examples - refactor(core): extract retry logic into helper - test: add unit tests for rate limiter - chore: update git hooks and repository settings - revert: revert "feat(core): introduce streaming API"
Good (包含 Body)
textfeat(auth): add OAuth2 login flow - implement Google and GitHub third-party login - add user authorization callback handling - improve login state persistence logic Closes #42
textfix(ui): fix button spacing on mobile devices - adjust button padding to fit small screens - fix styling issues on iOS Safari - optimize touch target size
Good (包含 BREAKING CHANGE)
textfeat(api)!: redesign authentication API - migrate from session-based to JWT authentication - update all endpoint signatures - remove deprecated login methods BREAKING CHANGE: authentication API has been completely redesigned, all clients must update their integration
Split Example
text- `feat(types): add new type defs for payment method` - `docs: update API docs for new types` - `test: add unit tests for payment types` - `fix: address linter warnings in new files` ←(如你的仓库有钩子报错)
pnpm/npm/yarn 等)。--no-verify 可跳过。.git/COMMIT_EDITMSG 与暂存区;不会直接编辑工作区文件。confirm: true,每个实际 git add/git commit 步骤都会进行二次确认。Other measured skills in the registry, with their headline benchmark lift.