git-commit
GitHub协助用户创建聚焦、可审查的 Git 提交,智能拆分无关变更,规范撰写符合 Conventional Commits 标准的提交信息并执行提交。
Trigger Scenarios
Install
npx skills add Terry-Mao/AICodingFlow --skill git-commit -g -y
SKILL.md
Frontmatter
{
"name": "git-commit",
"description": "Create focused, reviewable commits from the current diff without including unrelated files."
}
git-commit
Use this when the user asks to commit current changes or organize them into commits.
Inspect and group
Review status, unstaged/staged diffs, and their stats. Check repository commit conventions only when they are not already clear from the task or nearby files. Split only genuinely separate concerns (for example behavior versus refactor, dependency churn, generated output, formatting-only changes, or unrelated docs/tests). Keep directly related tests with the change.
Stage only intended paths, using git add -p when a file contains mixed
concerns. Do not bulk-stage unrelated work.
Message and commit
Unless repository conventions say otherwise, use:
type(scope): summary
Use feat, fix, refactor, perf, docs, test, build, ci, or
chore. Add Fixes #123 only for explicit closing intent or a clearly
completed narrow issue; use Refs #123 for partial or ambiguous work. Never
invent issue IDs.
Run normal git commit -m so hooks execute. If a hook fails, stop and report;
do not use --no-verify, push, rewrite history, or force operations unless
explicitly requested. Report the final hash and whether hooks ran.
Version History
-
d3fef11
Current 2026-09-03 03:51
优化了检查流程,改用交互式暂存(git add -p)处理混合关注点;增强钩子失败处理机制,禁止未请求时强制操作。
- e53c5ac 2026-07-24 11:35


