Agent skill
commit-msg
[コミット] 日本語コミットメッセージを生成(ステージ差分)
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/commit-msg
SKILL.md
[コミット] 日本語コミットメッセージを生成
入力: $ARGUMENTS
- なし(ステージング済みの差分から自動生成)
目的
git diff --stagedからコミットメッセージを日本語で生成する- Conventional Commits 形式に準拠
- Co-Authored-By を自動付与
共通前提(参照)
- 口調・出力規約は
CLAUDE.mdに従う - コミットは ユーザーの明示的な指示があった場合のみ 実行する
実行手順
1. ステージング状態の確認
git status
git diff --staged
2. 差分がない場合
⚠️ ステージングされた変更がないにゃ。
先に `git add` で変更をステージングしてにゃ。
3. コミットメッセージ生成
差分を分析して以下の形式で提案:
<type>: <概要(日本語、50文字以内)>
<本文(日本語、変更内容を箇条書き)>
Co-Authored-By: Claude <noreply@anthropic.com>
type の選択基準
| type | 用途 |
|---|---|
feat |
新機能追加 |
fix |
バグ修正 |
docs |
ドキュメントのみの変更 |
style |
コードの意味に影響しない変更(空白、フォーマット等) |
refactor |
バグ修正や機能追加を伴わないコード変更 |
perf |
パフォーマンス改善 |
test |
テストの追加・修正 |
chore |
ビルドプロセスやツールの変更 |
4. 提案と確認
📝 コミットメッセージ案
feat: ユーザー認証機能を追加
- ログイン/ログアウト処理を実装
- JWTトークンによるセッション管理
- パスワードハッシュ化(bcrypt)
Co-Authored-By: Claude <noreply@anthropic.com>
---
このメッセージでコミットする? [y/n]
5. コミット実行(⚠️ 確認あり)
ユーザーが承認した場合のみ:
git commit -m "$(cat <<'EOF'
feat: ユーザー認証機能を追加
- ログイン/ログアウト処理を実装
- JWTトークンによるセッション管理
- パスワードハッシュ化(bcrypt)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
品質チェックリスト
- 概要が50文字以内
- type が変更内容に適切
- 本文が変更の「何を」「なぜ」を説明している
- Co-Authored-By が付与されている
注意事項
- コミットはユーザーの明示的な承認後にのみ実行
- 機密情報(.env、credentials等)がステージングされている場合は警告
- 大量の変更がある場合は分割を提案
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?