
commit
by gd-bug
SKILL.md
name: Commit description: AI-optimized atomic commit protocol. Uses deterministic rules for autonomous execution.
CORE PRINCIPLE: ONE logical change = ONE commit. Always.
🎯 QUICK START FOR AI
Execute this exact sequence for ANY commit task:
- ANALYZE → Run
git diff --name-statusto list changed files - CATEGORIZE → Group files by logical units (use table below)
- VALIDATE → Check: "Can I describe ALL these changes in ONE sentence?"
- COMMIT → Apply template from section below
- REPEAT → Loop until
git diffis empty
🔧 LOGICAL GROUPING RULES (Deterministic)
Use FIRST matching rule:
| Change Pattern | Logical Unit | Example |
|---|---|---|
| Same file + same function | SINGLE unit | user.py:get_user() changes = 1 commit |
| Different files + same feature | SINGLE unit | auth.py + login.html for login feature = 1 commit |
| Same file + unrelated functions | SEPARATE units | utils.py (fix log + add validation) = 2 commits |
| Fix + feature in same area | SEPARATE units | Fix bug in auth + add OAuth = 2 commits |
Exception: If total changes <15 lines AND same logical context → allow single commit.
📝 COMMIT TEMPLATE (Copy-Paste Ready)
# STANDARD (90% of cases)
git commit -m "type(scope): description" \
-m "" \
-m "What: [1-sentence change summary]" \
-m "Why: [1-sentence reason]"
# WITH ISSUE (when ticket exists)
git commit -m "type(scope): description" \
-m "" \
-m "What: [summary]" \
-m "Why: [reason]" \
-m "" \
-m "Closes #[number]"
# BREAKING CHANGE (API/database changes)
git commit -m "type(scope)!: description" \
-m "" \
-m "What: [summary]" \
-m "Why: [reason]" \
-m "" \
-m "BREAKING CHANGE: [specific impact]"
🎨 TYPE & SCOPE DECISION TREE
Type Selection (pick first match):
- Adds new functionality →
feat - Fixes incorrect behavior →
fix - Changes formatting/styling only →
style - Restructures code without behavior change →
refactor - Updates documentation →
docs - Adds/modifies tests →
test - Other maintenance →
chore
Scope Inference (from file path):
src/auth/→authcomponents/ui/→uiapi/orroutes/→apitests/→testsdocs/→docs- Default: use parent directory name
⚡ QUICK REFERENCE CARD
Keep this visible during execution:
✅ DO
- One logical change per commit
- Use imperative mood (add, fix, update)
- Keep description <72 chars
- Include "What & Why" in body
- Auto-infer scope from path
❌ DON'T
- Mix feature + fix
- Use past tense (added, fixed)
- Write vague descriptions ("update", "fix stuff")
- Bundle unrelated changes
🚨 RED FLAGS (Stop and split)
- Changes touch >3 unrelated files
- Commit message needs "and" or "also"
- Diff shows mixed concerns (UI + API + tests)
🔄 AUTO-CORRECTION PROTOCOL
If commit violates rules → execute immediately:
git reset HEAD~1
# Return to ANALYZE step with remaining changes
📊 VALIDATION CHECKLIST (Pre-Commit)
- Single logical change? (1-sentence test)
- Description imperative and <72 chars?
- Scope inferred correctly?
- Body has "What & Why"?
- Breaking changes marked with
!?
🎲 DECISION EXAMPLES
Scenario 1: Changed user.py (add email validation) and test_user.py (add tests)
- ✅ CORRECT: 2 commits:
feat(user): add email validation+test(user): add validation tests
Scenario 2: Changed style.css (colors) and layout.css (spacing) for dark mode
- ✅ CORRECT: 1 commit:
style(ui): implement dark mode colors and spacing
Scenario 3: Fixed bug in auth.js AND added new login method in same file
- ✅ CORRECT: 2 commits:
fix(auth): resolve session timeout+feat(auth): add biometric login
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です