git-commit
Skill5 starsChanged 3 months agoMITView on GitHub
Git 提交(Conventional Commits):当用户要编写或检查 commit message、执行 Git 提交、拆分提交、判断提交类型或破坏性变更标记、处理版本号提交与 npm version 时使用;仅提到 GitHub、查询 Git 状态或解决合并冲突时不触发。
174 other projects use a version of this.
Adopted by
Most recently taken up by
- HAOYI99/skillstheir own version, first seen Nov 8, 2026
- swjybky/deepwritetheir own version, first seen Nov 8, 2026
- PC2005-cloud/dsh-pettheir own version, first seen Nov 8, 2026
- stuff4ai/skillstheir own version, first seen Nov 8, 2026
- apattichis/agentic-research-toolkittheir own version, first seen Nov 8, 2026
- Darna-Digital/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use git-pr, github-pr-create and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
klauswgSkillgit-pr
Prepare, review, publish, or update a complete GitHub pull request for the current repository, including local commit readiness, safe push strategy, semantic title validation, repository-native PR templates, issue linking, and checks verification. Use when the user asks to draft, create, submit, publish, open, or update a pull request. Always require the user to review and explicitly approve the exact final PR before any push or GitHub write.
Also in 11 projects that use this
mjun0812Skillgithub-pr-create
Pull Requestを作成するSkill。現在のbranchからpull requestを作成する。言語指定可能。 ユーザーが「PR作って」「pull request作成して」のように依頼したら使うこと。
Also in 3 projects that use this
MicrosoftSkillgit-branch
Branch management for implementation. Use when you need to create a branch, switch branches, checkout, or verify branching strategy before implementing code. Do not use for commits (use git-commit), pull requests (use pull-request), or advanced git operations (rebase, merge).
Also in 4 projects that use this
klauswgSkillgit-issue
Prepare, review, create, or update evidence-based GitHub issues for the current repository with duplicate detection, repository-native templates, valid labels, and post-publication verification. Use when the user asks to draft, file, submit, publish, edit, or refine a GitHub issue, bug report, feature request, performance issue, or technical proposal. Always require the user to review and explicitly approve the exact final issue before any GitHub write.
Also in 3 projects that use this
gologo13Skillgit-push
Push current branch to origin and sync with remote updates; keywords: git, rebase. Use only on explicit request; before execution, review diffs and list impact scope.
Also in 6 projects that use this
GoogleSkillgithub-pr-review
Review a GitHub pull request and leave inline comments in a natural human reviewing voice, indistinguishable from comments typed by hand on the GitHub web UI. Deliberately bounded to defects a reader can settle by looking at the anchored line, rather than a deep audit, so every comment is cheap for the author to check. Scales to 2-20 comments by PR size, parallelises analysis across sub-agents, drafts for approval, then posts individually with human pacing. Use when the user says "review this PR", "review PR 123", pastes a github.com/.../pull/N link, or asks for comments on a pull request. Don't use for reviewing local uncommitted changes or a diff against a branch (use the `review` skill for that).
Also in 4 projects that use this
Other versions174 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 174
- github/awesome-copilot★ 41ksame name
- doocs/leetcode★ 37ksame name
- tisfeng/Easydict★ 15ksame name
- doocs/md★ 14ksame name
- spinabot/brigade★ 11ksame name
- PC2005-cloud/dsh-pet★ 5.9ksame name
- GitTools/GitVersion★ 3.1ksame name
- igorescodro/alkaa★ 1.6ksame name
- microsoft/hve-core★ 1.6ksame name
- mattmireles/gemma-tuner-multimodal★ 1.5ksame name
164 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- documenting-codeSkill
- implementSkill
- implement-specSkill
- integrating-frontend-apisSkill
- organizing-frontend-componentsSkill
- prototypeSkill
- tddSkill
- writing-vue-componentsSkill
- researchSkill
- teachSkill
- writing-for-agentsSkill
- codebase-designSkill
- domain-modelingSkill
- grill-with-docsSkill
- to-specSkill
- to-ticketsSkill
- code-reviewSkill
- diagnosing-bugsSkill
- improve-codebase-architectureSkill
- retroSkill
- ask-mattSkill
- execute-planSkill
- grillingSkill
- grill-meSkill
- handoffSkill
- prSkill
- setup-matt-pocock-skillsSkill
- triageSkill
- usage-disclosureSkill
- wait-whatSkill
- wayfinderSkill
The file
Files
Git 提交
以实际变更为依据,产出可独立理解、可回退的原子提交(atomic commit)。按请求选择写信息、检查信息或执行提交;自动调用本技能本身不代表获得提交授权。
1. 确定规范与范围
- 优先采用用户指定规则和仓库的
AGENTS.md、CONTRIBUTING、提交模板及 commitlint 配置;没有约定时使用下方默认格式。 - 编写信息前先确定项目主要自然语言(例如中文或英文):用户明确指定的提交语言优先,其次是仓库明确约定;否则查看近期人工提交(可从
git log -20 --format=%s开始),结合主 README、贡献文档及维护者注释推断。排除机器人提交、生成内容和翻译副本的干扰,不以代码标识符、机器时区或用户所在地判断项目语言。证据混杂时优先延续近期人工提交的主流语言;仍无依据时采用用户当前交流语言,并简短说明这一假设。 - 仅咨询格式或提供了充分的变更描述时,直接据此回答,不要求 Git 工作区。根据描述生成的草稿应说明依据,不能声称已验证代码。
- 对当前仓库生成或执行提交时,读取
git status --short、git diff --cached、git diff;逐个检查范围内未跟踪文件。用户指定“已暂存”时,以 index 内容为提交事实,即使同一文件还有未暂存修改。 - 按下面的分组规则确定每项逻辑修改的归属,再选择 type;文件、工单和 type 都不是提交边界。
分组规则
- 同一交付默认合并:先用一句话确定本轮主要交付目标,再归入相关的小功能、小修复及配套改动;新功能和已有功能的一轮完善都适用。以共同的验收目标或交互链路判断关联性,即使小改动并非主功能运行所必需,也可随同交付。同一根因是合并线索,不同根因或技术上可单独撤销不构成拆分理由。
- 拆分须有独立价值:存在明确的独立验收、发布或回退价值时才拆分,并能简短说明具体收益。例如同一页面的展示调整与可分别验收、发布的权限需求应分开;无关旧缺陷、独立升级和顺手清理按各自目的分组。同一页面、目录或本次会话本身不代表同一交付。
- 配套改动随目标归属:相关重构、依赖、测试和使用说明随所属交付;具有独立交付价值的公共前置改动可先提交。按合并后的主要意图选择 type:新功能及开发中的相关修复通常为
feat,修正已有错误行为为fix。本轮修改形成新提交;仅在明确授权整理未共享历史时考虑合回已有提交。 - 提交按依赖排序:每一步都应形成可构建、可验证的完整状态。共享改动有独立意义时先提交;否则放入首先需要它的功能提交,后续提交依赖前者。
按上述规则确认需要拆分,或执行部分暂存、隔离验证时,读取 拆分与验证。先确定交付边界,再选择 hunk 和构造中间状态。
完成标准:规范、证据来源和操作模式已确定;范围内每项逻辑修改恰有一个归属,拆分有明确的独立价值,提交顺序满足依赖。拆分明确且已有提交授权时直接执行、完成后汇报;只有归属或范围存在实质歧义时,先展示推荐方案(目的、逻辑修改、依赖和验证方式),等待用户确认后再执行相关提交。技术上难拆时先按参考处理,不据此反复索要确认。
2. 编写或检查信息
默认只写一行标题,scope 和 ! 按实际需要选用:
<type>(<scope>)!: <subject>| type | 默认选择依据 |
feat | 增加使用者可用的功能 |
fix | 修正错误行为 |
docs | 仅文档或说明性注释 |
style | 仅空格、缩进等代码格式;视觉样式变化按功能或修复意图判断 |
refactor | 改变实现结构,保持外部行为 |
perf | 性能改进 |
test | 独立的测试变更 |
build | 构建系统或依赖变更 |
ci | 持续集成配置 |
chore | 未被以上覆盖的维护;仅版本变更采用 chore(release) |
revert | 撤销变更,正文注明实际被撤销的提交及原因 |
这些扩展类型是默认团队约定,Conventional Commits 并未强制一份完整类型枚举。
- scope 取稳定的模块或领域名;跨模块且没有合适范围时省略。subject 先写具体的主要变化,再按需用短语补充相关小改动;只保留有助于理解交付的重要变化,不逐项复述 diff。简单改动只写主要变化即可。
- 标题中的自然语言按该语言的习惯衔接:中文可用逗号分隔主次、顿号连接同类事项;英文可用分号或连词,其他语言采用相应标点。协议前缀仍使用 ASCII 冒号和空格(
:)。示例是表达方式,不是固定句式:- 中文:
fix(check-record-ledger): 完善检查详情展示,修复固定列遮挡、翻页滚动异常 - 英文:
fix(check-record-ledger): improve detail layout; fix column overlap and pagination scrolling
- 中文:
- subject、body 和 footer 的自然语言说明使用第 1 步确定的语言;
feat、fix、BREAKING CHANGE等协议词、既有 scope、代码标识符和专有名词保留原文。版本提交中的示例描述也按此规则调整。标题长度服从仓库规则,无规定时保持简洁,不把固定字符数当成规范硬要求。 - 多行仅用于必要的补充说明或仓库要求:标题不足以表达的原因、行为影响或迁移方法放入 body,结构化信息放入 footer,各部分以空行分隔。标题已说明清楚时省略正文;不为重复标题或罗列小改动追加多行。Issue 引用须真实且与任务有关;无法确认关闭意图时使用关联说明,不虚构
Closes。 - 判断兼容性,而非改动行数。存在破坏性变更时使用
!或BREAKING CHANGE:;推荐在 footer 写明受影响契约及迁移方式。refactor、chore等类型同样可能含破坏性变更。 - 检查已有信息时分别判断语法与语义:格式合法仍可能类型错误、遗漏破坏性影响或与 diff 不符。指出具体偏差并给出修订稿。
完成标准:每组变更都有与证据一致的信息,描述语言与项目证据或明确指定一致,兼容性影响已评估,仓库格式约束已应用。仅请求信息或检查时在此交付,不进入执行分支。
3. 按授权执行并核对
用户明确要求“提交这些改动”等即授权对应范围的普通提交;已有授权继续有效。“写提交信息”“看看怎么提交”只产出草稿。amend、历史重写、tag、push 和发布分别按用户实际授权执行,不能从普通 commit 请求推导。
涉及版本文件、npm version 或已有版本提交时,先读取 版本提交。
执行普通提交时:
- 检查现有 index 是否包含范围外内容;只暂存目标文件或 hunks。若混入他人已暂存内容,先明确处理方案,保留其暂存状态和工作区修改。不要以
git add .或git commit -a代替范围选择。 - 复核最终
git diff --cached和git diff --cached --check;空 diff 时报告无可提交内容。运行仓库要求且与变更相关的检查,验证对象是“此前提交+本次 index”。工作区含其他修改时,按 拆分与验证 隔离检查;已有检查仅在对应相同内容与环境时复用。 - 用
git commit -F <message-file>提交审阅后的信息;消息文件放在仓库外的临时目录,保留真实换行并使用 UTF-8。按当前 shell 正确传递参数,不把消息正文拼成可执行命令。 - hook 失败时检查原因及其修改,修复范围内问题后重新审阅;禁止为通过提交擅自使用
--no-verify。命令失败或结果不确定时先检查 HEAD、index 和工作区,确认是否已经生成提交,再决定下一步。 - 用
git log -1 --format=fuller、git show --stat --oneline HEAD和git status --short核对结果。拆分多次提交时逐次重复核对,避免重复提交或遗漏变更。
完成标准:报告实际提交的哈希、信息和检查结果,以及仍未提交的相关内容;未执行时明确交付的是草稿。执行被阻止时说明具体原因,不报告成功。
规范依据
按需追溯设计来源和规范边界时,读取 来源记录。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

