Agent skill
commit
変更内容を確認し、適切なコミットメッセージでgit commitを行う。「コミットして」「変更を保存」「commitして」などのリクエストで使用する。
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/commit-takapom-trip-app
SKILL.md
Git コミット
変更内容を確認し、Conventional Commits 形式でコミットする。
コミットメッセージ規約
<type>: <日本語で簡潔な説明>
type 一覧
| type | 用途 |
|---|---|
feat |
新機能の追加 |
fix |
バグ修正 |
refactor |
リファクタリング(機能変更なし) |
style |
コードスタイル変更(フォーマット、セミコロン等) |
docs |
ドキュメントのみの変更 |
chore |
ビルドプロセスやツール設定の変更 |
test |
テストの追加・修正 |
perf |
パフォーマンス改善 |
手順
git statusで変更されたファイルを確認するgit diff --stagedでステージ済みの差分を確認する- ステージされたファイルがない場合は
git diffで未ステージの差分を確認し、関連ファイルをステージする git log --oneline -5で直近のコミット履歴を確認し、メッセージのスタイルを把握する- 変更内容を分析し、適切な type と説明文を決定する
- 引数でコミットメッセージが指定されている場合はそれを使用する
- ユーザーにコミット内容とメッセージを提示し、確認を取る
- コミットを実行する
ステージングのルール
- 変更が1つの機能/修正に関連する場合はまとめてステージする
- 無関係な変更が混在している場合はユーザーに確認する
- 以下のファイルはステージしない(警告を出す):
.env/.env.localなど環境変数ファイルcredentials.jsonなどの認証情報*.pem,*.keyなどの秘密鍵
コミット実行
# メッセージは HEREDOC で渡す
git commit -m "$(cat <<'EOF'
<type>: <説明>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
EOF
)"
ルール
- コミットメッセージの説明は日本語で書く(type プレフィックスは英語)
--amendは明示的に指示された場合のみ使用する--no-verifyは使用しないgit add -Aやgit add .は使わず、ファイルを個別に指定する- コミット前に必ず差分の内容をユーザーに報告する
- コミット後に
git statusで結果を確認する
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?