Skip to content
Skills Library
Programming · Writing

dev-commit

/dev-commit

开发者准备提交代码时触发。当用户说"commit"、"提交"、"写 commit message"、 "commit these changes"、"生成提交信息"、"帮我写 commit"时使用本 skill。 基于 git diff 生成符合项目 commit 规范的提交信息。 即使用户没有明确说"commit message",只要涉及提交代码的操作都应该触发。

Repository
OpenAIR ↗
Licence
Apache-2.0
Last repository change
10.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

开发者准备提交代码时触发。当用户说"commit"、"提交"、"写 commit message"、 "commit these changes"、"生成提交信息"、"帮我写 commit"时使用本 skill。 基于 git diff 生成符合项目 commit 规范的提交信息。 即使用户没有明确说"commit message",只要涉及提交代码的操作都应该触发。

Triggers from the description

commit写 commit messagecommit these changes生成提交信息帮我写 commitcommit message
Original author description

开发者准备提交代码时触发。当用户说"commit"、"提交"、"写 commit message"、 "commit these changes"、"生成提交信息"、"帮我写 commit"时使用本 skill。 基于 git diff 生成符合项目 commit 规范的提交信息。 即使用户没有明确说"commit message",只要涉及提交代码的操作都应该触发。

How it works

  1. When to use
  2. Step 1: Read staged diff
  3. Step 2: Consistency Check
  4. Step 3: Generate commit message
Original SKILL.md headings · 88 lines, 473 words
SKILL.md preview
---
name: dev-commit
description: >-
  开发者准备提交代码时触发。当用户说"commit"、"提交"、"写 commit message"、
  "commit these changes"、"生成提交信息"、"帮我写 commit"时使用本 skill。
  基于 git diff 生成符合项目 commit 规范的提交信息。
  即使用户没有明确说"commit message",只要涉及提交代码的操作都应该触发。
---

# Dev: Commit Message Generation

## When to use

开发者已暂存代码,需要生成符合项目规范的 commit message。

## Step 1: Read staged diff

1. Run `git diff --cached --stat` to see staged changes
2. Read the actual diff
3. From the diff, extract the key identifiers and values that changed (types, enums, field names, status values, directory names, etc.)

## Step 2: Consistency Check

**STOP — Do not proceed to Step 3 until this check is complete.**

Check whether the staged changes introduce inconsistencies elsewhere in the project. This prevents committing partial or contradictory changes.

### What to check

Use the key identifiers extracted in Step 1. Search the rest of the project for the same concepts to see if they are still aligned.

### How to handle inconsistencies

- **Same-type inconsistency** (e.g. a status value changed in one doc but not another doc; a type changed in code but not in the corresponding code): fix directly, using the staged (new) content as the source of truth. Stage the fixes before committing.
- **Cross-type inconsistency** (e.g. a type definition changed in code but the corresponding docs still describe the old shape): ask the user which direction to resolve before making changes. Present the specific conflict and the two options.

### Steps

1. Search the project for those identifiers/values in all relevant files (docs, code, mocks, fixtures, skills, configs). Note: `.trae/skills/` and `.claude/skills/` are sync mirrors managed by `scripts/sync_claude_skills.py` — do NOT manually check or fix them.
2. For each inconsistency found:
   - If both sides are the same type (doc↔doc, code↔code): fix the non-staged side to match the staged side, stage the fix
   - If the sides are different types (code↔doc, code↔fixture, etc.): ask the user how to resolve
3. Report a brief summary of what was checked and what (if anything) was fixed or needs user decision

### Gate: Consistency check confirmation

Before proceeding, confirm ALL of the following:

- [ ] Key identifiers have been extracted from the diff
- [ ] Project-wide search has been performed for those identifiers
- [ ] All found inconsistencies have been resolved or escalated
- [ ] A brief check summary has been reported

**Only after all items are confirmed, proceed to Step 3.**

## Step 3: Generate commit message

### Rules source

Read before generating:

- `spec/collaboration/git_commit_rules.md` -- format, type, scope, summary rules

### Determine commit

From the actual diff, determine type, scope, and summary.

### Co-author(必须)

如果本次 commit 有 AI coding 工具参与,必须在 commit message body 末尾追加 `Co-authored-by` 行。

格式:
```text
<type>(<scope>): <summary>

Co-authored-by: qoder <qoder@users.noreply.github.com>
```

可用 Agent 标识:
- `qoder <qoder@users.noreply.github.com>`
- `cursor <cursor@users.noreply.github.com>`
- `claude-code <claude-code@users.noreply.github.com>`
- `gpt <gpt@users.noreply.github.com>`

规则:
- 根据实际参与的 AI 工具选对应行,可多个并列
- 如果是纯人工 commit 则不加
- Agent 在生成 commit message 时应自动追加自身标识

### Output

Single line: `<type>(<scope>): <summary>`
Optional body with Co-authored-by trailer.

If changes span multiple concerns, recommend splitting into separate commits.

Versions

RepositoryScoreLicence
This page · pdl-openair/OpenAIR100Apache-2.0
codeaholicguy/ai-devkit90Apache-2.0

Database snapshot: 13.11.2026 · package version 9d9b02281d5b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 96commit
    Use when writing a commit message, or before running `git commit`.
  • 100commit
    Write a commit message and create a git commit. Use when the user wants to commit changes, asks for a commit message, or says "commit this" or "make a commit".
  • 90commit
    在 Git 仓库中分析当前变更,生成符合项目规范的 commit message,自动判断单次提交还是按功能拆分多次提交;正常情况全自动不询问,命中异常规则(不能或无须提交的文件等)才请用户确认。 TRIGGER(中文):"提交一下代码""帮我 commit""这次改动提交了吧""生成 commit message 并提交""/commit""按 fix 提交" "先看看变更别提交""改一下上次的 commit"。 DO NOT TRIGGER:用户只想看变更且未表达提交意图(直接执行 git status/diff 即可); push、rebase…
  • 100git-commit
    专业的 Git 提交信息生成与提交执行器。当用户说"提交"、"commit"、"帮我写提交信息"、 "git commit"、"写个 commit message"、"生成提交说明",或任何与 Git 提交相关的请求时触发。 也适用于用户完成代码修改后需要总结变更、审查 diff 并生成规范提交信息的场景。 即使未明确提及"提交"一词,只要用户完成了代码修改并希望记录变更,就应使用此技能。
  • 100commit
    Write a commit message for the staged change. Follows the subject convention the repo's history or instruction files set, and otherwise writes an imperative subject under 72 characters with a body that says only what the diff cannot show. Writes the message only, unless the user asks to commit.
  • 100create-commit-message
    Generate a Conventional Commit message from staged git changes when the user asks to write a commit message, create a commit, or format a commit

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.