commit
8
总安装量
8
周安装量
#35886
全站排名
安装命令
npx skills add https://github.com/chanmuzi/git-conventions --skill commit
Agent 安装分布
amp
8
gemini-cli
8
github-copilot
8
codex
8
kimi-cli
8
cursor
8
Skill 文档
Gather Context
Run the following commands to understand the current state:
git statusâ check current status and untracked filesgit diff HEADâ review all changes
Commit Message Convention
Format: {type}: {description} or {type}({scope}): {description}
Type Prefixes (always lowercase)
| Type | Purpose |
|---|---|
feat |
New feature |
fix |
Bug fix |
refactor |
Code restructuring without behavior change |
style |
Formatting, linting (no logic change) |
docs |
Documentation only |
test |
Adding or updating tests |
perf |
Performance improvement |
chore |
Build, CI, dependencies, config |
hotfix |
Urgent production fix |
Scope (optional)
Add scope in parentheses when the change targets a specific module or component:
feat(source-map): ...fix(full-text): ...test(query-rewriting): ...
Description Rules
- Write the description in the language configured in the project’s CLAUDE.md. If no language is configured, follow the user’s conversational language.
- Keep the subject line concise â aim for under 50 characters.
- Use natural, fluent phrasing. Do not force-translate well-known technical terms. For example, write
source_mapas-is rather than translating it. - Focus on WHAT changed and WHY, not HOW.
Multi-line Body (for complex changes)
When the diff involves multiple files or logical units, add a body after a blank line to explain details:
{type}: {subject line}
- {detail 1}
- {detail 2}
- {detail 3}
When to use multi-line:
- 3+ files changed across different concerns
- Non-obvious reasoning behind the change
- Breaking changes or migration notes
When single-line is enough:
- Simple, self-explanatory changes (typo fix, single-file edit, etc.)
Examples
Single-line:
feat: ë©í°í´ 컨í
ì¤í¸ ì ì§ ê¸°ë¥ ì¶ê°
fix: ìì² DTO ëª¨ë¸ ê¸°ë³¸ê°ì settings 기ë°ì¼ë¡ íµì¼
refactor: 미ì¬ì© openai_api_key/openai_base_url íë¡í¼í° ì ê±°
style: black í¬ë§·í
ì ì©
perf: Classification max_tokens 30 â 15ë¡ ì¡°ì
chore: ë³´ì ì·¨ì½ì í¨í¤ì§ ì
ë°ì´í¸ (urllib3, langchain-core)
docs: README íê²½ë³ì ê°ì´ë ì
ë°ì´í¸
test: ë©í°í´ 컨í
ì¤í¸ ì ì§ ê¸°ë¥ í
ì¤í¸ ì¶ê°
feat(source-map): ê²ìíì§ ìì í´ììë source_map ì§ì ë°í
fix(full-text): ì 문 ì¡°í ì¤í¨ ì state ëì¶ ë°©ì§
hotfix: uv lock synced
Multi-line:
refactor: Gather Context ë¶íìí ëª
ë ¹ ë° ì¤ë³µ step ì ê±°
- commit: git branch, git log ëª
ë ¹ ìì (gitStatus/컨벤ì
ì ìë¡ ëì²´)
- pr: git remote show origin, gh pr list ë¤í¸ìí¬ í¸ì¶ ì ê±°
- review: Gather Context ì¹ì
ìì , ì¹´í
ê³ ë¦¬ ë¶ì¼ì¹ ìì
Task
- Analyze the diff and draft a commit message following the convention above.
- Stage the relevant files individually, show the proposed commit message, and create the commit. Follow the session’s tool permission settings for approval.
Important:
- Do NOT use
git add -Aorgit add .â stage specific files by name. - Do NOT include files that may contain secrets (
.env, credentials, tokens, etc.). - If there are multiple logical units of change, suggest splitting into separate commits.