agentleFS
PC2005-cloudPC2005-cloud/dsh-pet/.agents/skills/git-commit/SKILL.md

git-commit

Skill5.9k starsChanged 14 days agoMITView on GitHub

根据本次代码变更生成遵循 type(scope): subject 结构规范的中文 Git 提交信息,便于追溯与自动生成更新日志。用户要求“生成/总结/规范化提交信息”时使用。

174 other projects use a version of this.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Most recently taken up by

Who's talking about PC2005-cloud/dsh-pet

The biggest 5 of 14 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 14

Talked about on GitHub and Bluesky (14 times).

On GitHub · 13

8 more on GitHub

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.
  • klauswgSkill

    git-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

  • mjun0812Skill

    github-pr-create

    Pull Requestを作成するSkill。現在のbranchからpull requestを作成する。言語指定可能。 ユーザーが「PR作って」「pull request作成して」のように依頼したら使うこと。

    Also in 3 projects that use this

  • MicrosoftSkill

    git-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

  • klauswgSkill

    git-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

  • gologo13Skill

    git-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

  • GoogleSkill

    github-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

The file

Files
SKILL.md

结构化 Git 提交规范(Technical Commit Convention)

目标

为任何项目提供一套统一、结构化、技术可追溯的 Git 提交信息规范,让每次提交清晰说明代码层的变更(模块、算法、配置、依赖等),同时保持面向开发者的可读性,且便于自动化生成更新日志。

核心理念

  • 技术可追溯:每次提交清晰说明代码层面的变更,包括模块、算法、配置、依赖等。
  • 面向开发者:提交信息是可读的,但核心是技术描写,避免含糊表述。
  • 结构化:采用轻量级标记(类型、范围、主体、技术细节),便于自动化解析与生成更新日志。

输入与输出

  • 输入:本次变更的文件列表或变更描述(可由用户提供,或基于代码推断)。
  • 输出:可直接用于 git commit -m 的纯文本提交信息。

格式定义

<type>(<scope>): <subject>

<technical body>  (必填,至少一条技术描述)

[optional footer]

1. Type(类型,技术语义,必填)

Type含义示例场景
feat新增功能/页面/组件新增搜索功能、新增登录流程
fix修复代码或内容缺陷修复 XSS 漏洞、修复分页计数错误
perf性能优化图片懒加载、缓存策略、打包分包
refactor代码重构(不改变功能)重写某模块实现、统一请求层
styleUI/样式变更修改主题色、调整响应式断点
docs文档内容更新新增/修改 README、注释、接口文档
chore构建/依赖/配置变更升级依赖、修改构建配置、调整 CI
revert回滚某次技术变更因兼容性问题回滚某方案

2. Scope(范围,必填)

用单词语义指定受影响的技术模块,例如:template、router、api、auth、ui、style、config、deploy、docs、analytics、test、script 等。无法归入单一模块时,可省略 (<scope>)。

3. Subject(主题,简洁技术描述,必填)

用中文,10~20 字,直接说明做了什么技术变更,例如:

  • 重构分页逻辑,改用游标分页
  • 升级 marked 库并修复 XSS 隐患
  • 添加 webp 支持并实现降级方案

4. Technical Body(技术正文,必填)

必须包含至少一条具体的技术描写,多条可用列表。内容包括但不限于:

  • 实现方式:用了什么 API、算法、数据结构、设计模式。
  • 修改前后对比:关键代码逻辑的变化。
  • 性能指标:优化前后的加载时间、包体积等。
  • 依赖变更:新增/升级了哪些依赖包及版本号。
  • 配置调整:构建、lint、测试等配置改动。
  • Bug 根因:错误产生的原因及修复原理。

示例格式:

- 技术实现:
  - 将分页参数 from offset 改为 after timestamp,基于 createTime 索引查询,减少大偏移量下的慢查询。
  - 前端修改 API 调用方式:`GET /items?after=xxx&limit=10`。
- 性能影响:接口延迟从 320ms 降至 210ms(压测结果)。
- 涉及文件:`routes/items.js`, `src/api.ts`

5. Footer(脚注,可选)

  • Breaking change: 描述不兼容的变更。
  • Closes #issue 关联任务或问题。
  • See also 相关文档链接。

工作流

  1. 当用户要求"根据本次代码变更生成提交信息"时,主动询问变更的文件列表或描述;若未提供,则基于文件扩展名和常见模式推断(如 .scss 变化写样式细节、.js/.ts 写逻辑细节),并提醒用户补充。
  2. 判断变更主类型,选定 type 与 scope。
  3. 写中文 subject(10~20 字),再补至少一条技术正文。
  4. 需要时附加 footer。
  5. 输出纯文本,可直接用于 git commit -m。

守则

  • 生成的提交信息必须包含至少一条技术描写,不能只写"更新了样式"这种模糊描述。
  • 若用户提供的信息不足以写清技术细节,基于常见模式推断并在结果后提醒用户按需补充。
  • 输出保持结构化、可追溯,面向开发者可读。

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.