Git Commit Assistant
Overview
Assists in creating git commits with gitmoji prefixes and Japanese commit messages. Supports both simple staged-only commits and intelligent multi-commit workflows that automatically split changes into logical units.
When to Use This Skill
Use this skill when the user requests:
- •"Create a commit" / "コミットを作成して"
- •"Commit these changes" / "この変更をコミットして"
- •"Make a git commit with gitmoji" / "gitmojiでコミットして"
- •"Split changes into multiple commits" / "変更を複数のコミットに分けて"
- •Any request involving git commit creation with Japanese messages
Core Capabilities
1. Staged-Only Mode (Default)
Commits only the staged changes (files added with git add).
Workflow:
- •Check git status to verify staged changes exist
- •Review staged diff to understand changes
- •Analyze recent commits to maintain consistency
- •Select appropriate gitmoji based on change type
- •Create concise Japanese commit message
- •Execute commit
Usage:
User: "コミットを作成して" Assistant: [Analyzes staged changes and creates single commit]
2. Smart-Commit Mode
Analyzes all changes (both staged and unstaged) and creates multiple commits with appropriate granularity using git add -p.
Workflow:
- •Check git status to see all changes
- •Review all diffs (staged and unstaged)
- •Analyze and categorize changes into logical units
- •For each logical unit:
- •Use
git add -pto selectively stage specific changes - •Select appropriate gitmoji
- •Create Japanese commit message
- •Execute commit
- •Use
- •Verify all changes are committed
Usage:
User: "全ての変更をスマートコミットして" User: "変更を適切な単位に分けてコミットして" Assistant: [Creates multiple commits with logical separation]
3. Triggering Smart-Commit Mode
Smart-commit mode is triggered when the user explicitly requests:
- •"スマートコミット"
- •"変更を分けてコミット"
- •"複数のコミットに分割"
- •"適切な単位でコミット"
- •Any explicit mention of creating multiple commits or splitting changes
Default to staged-only mode unless explicitly requested otherwise.
Gitmoji Reference
Select appropriate gitmoji based on the nature of changes:
| Gitmoji | GitHub Shortcode | Use Case |
|---|---|---|
| ✨ | :sparkles: | New features |
| 🐛 | :bug: | Bug fixes |
| 📝 | :memo: | Documentation updates |
| ♻️ | :recycle: | Refactoring |
| ⚡ | :zap: | Performance improvements |
| 🎨 | :art: | Code structure/format improvements |
| 🔧 | :wrench: | Configuration file changes |
| ✅ | :white_check_mark: | Adding/updating tests |
| 🚀 | :rocket: | Deployment/releases |
| 🔒 | :lock: | Security fixes |
| 🚨 | :rotating_light: | Fixing linter warnings |
| 🔥 | :fire: | Removing code or files |
| 🚚 | :truck: | Moving/renaming files |
| 💄 | :lipstick: | UI/style updates |
| 🌐 | :globe_with_meridians: | Internationalization |
| 🔖 | :bookmark: | Release tags |
| 🎉 | :tada: | Initial commit |
Commit Message Guidelines
Format
:gitmoji: 簡潔な日本語での変更内容
Best Practices
- •Keep message concise (ideally under 50 characters for title)
- •Focus on "what" and "why" rather than "how"
- •Use imperative mood in Japanese (e.g., "追加", "修正", "更新")
- •Avoid redundant information already conveyed by gitmoji
- •Match tone and style of recent commits when possible
Examples
:sparkles: ユーザー認証機能を追加 :bug: ログイン時のバリデーションエラーを修正 :memo: APIドキュメントを更新 :recycle: データ取得ロジックをリファクタリング :zap: 画像読み込みパフォーマンスを改善 :wrench: ESLint設定を更新
Workflow Decision Tree
User requests commit
│
├─ Explicit smart-commit request? ────→ YES ─→ Smart-Commit Mode
│ (Multiple commits with git add -p)
│
└─ NO ─→ Staged-Only Mode
(Single commit with staged changes)
Pre-Commit Checklist
Before creating any commit:
- •✓ Verify git status shows changes to commit
- •✓ Review diff to understand nature of changes
- •✓ Check recent commits for style consistency
- •✓ Confirm no sensitive data in changes (.env, credentials, etc.)
- •✓ Select most appropriate gitmoji
- •✓ Draft clear, concise Japanese message
Error Handling
No staged changes:
- •Inform user no changes are staged
- •Suggest using
git addor asking for smart-commit mode
Merge conflicts:
- •Detect conflict markers in diffs
- •Warn user to resolve conflicts before committing
Pre-commit hooks failure:
- •Show hook error output
- •Wait for user to fix issues before retrying
Resources
This skill does not require additional scripts, references, or assets. All necessary logic is contained in this SKILL.md file.