← スキル一覧に戻る

commit-msg
by Conte777
Репозиторий для синхронизации конфига для Claude code
⭐ 0🍴 0📅 2026年1月18日
SKILL.md
name: commit-msg description: Use this skill when the user wants to generate a commit message. Contains workflow for branch checking, ticket ID extraction, and message formatting. allowed-tools: Bash(git branch *), Bash(git diff *), Read
Commit Message Generator
This skill generates commit messages with proper ticket ID extraction and formatting.
When to Use
- User runs
/commitcommand (called by commit command) - User asks to generate a commit message
- User needs help with commit message format
Workflow Steps
Step 1: Get Branch Name
git branch --show-current
Step 2: Extract Ticket ID
Extract ticket ID from branch name using pattern CUS-\d+ (case insensitive).
Examples:
CUS-1234/add-feature→CUS-1234feature/CUS-5678-fix-bug→CUS-5678cus-9999-update-docs→CUS-9999
Step 3: Analyze Changes
Review the staged changes:
git diff --staged
Identify:
- Type of change (new feature or bug fix)
- Key files and components affected
- Main purpose of the changes
Step 4: Determine Prefix
If ticket ID found → use CUS-XXXX:
If no ticket ID → determine prefix from diff analysis:
| Prefix | Use when changes... |
|---|---|
fix: | Fix bugs, errors, null checks, edge cases, error handling, typos, broken logic |
feat: | Add new functionality, files, endpoints, components, capabilities |
Analyze the nature of changes — don't ask the user.
Step 5: Generate Commit Message
Create a commit message following the strict format:
Format Rules
Prefix (one of):
CUS-XXXX:— when ticket ID is availablefeat:— new functionality (only when no ticket ID)fix:— bug fix (only when no ticket ID)
Constraints:
- Maximum 50 characters total
- Single line (header only, no body)
- Lowercase description
- No period at the end
- Use abbreviations when needed:
&,|,impl,auth,config,upd,del
Examples:
CUS-1234: add user auth endpoint
CUS-5678: fix null check in payment service
feat: impl login & signup forms
fix: handle empty response in api client
Step 6: Return Message
Return the generated commit message to the caller.
File References
- Message Format — Detailed format specification
- Branch Conventions — Branch naming rules
Error Handling
- If git is not initialized, inform the user
- If detached HEAD state, use short commit hash as reference
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です