コード変更を適切なgitコミット戦略でgit commitします。基本的には既存のgitコミットへのsquash戦略を採用し、必要に応じてブランチ全体のgitコミット履歴を再構成します。実装完了時やユーザーがgit commitを依頼した時に使用します。
Records code changes as high-quality git commits using squash, new commits, or interactive rebase based on branch history. Automatically used after implementation completes or when you request a git commit.
/plugin marketplace add AKABANAKK/claude-code-marketplace/plugin install akabanakk-akb7-akb7@AKABANAKK/claude-code-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
examples.mdreference.mdこのスキルは、コード変更を高品質なgitコミットとして記録するための包括的なガイダンスを提供します。
以下のコマンドで現在の状態を確認:
git status
git log --oneline --graph origin/main..HEAD
確認事項:
以下の基準でgitコミット戦略を選択:
以下の条件を満たす場合、既存のgitコミットにsquashします:
実行方法:
git add -A
git commit --amend
gitコミットメッセージを適切に更新してください。
以下の場合は新規gitコミットを作成:
実行方法:
git add -A
git commit
以下の場合はブランチ全体のgitコミットを再構成:
実行方法:
git rebase -i origin/main
エディタで以下の操作を実行:
pick: gitコミットをそのまま維持squashまたはs: 前のgitコミットと統合rewordまたはr: gitコミットメッセージを変更gitコミットメッセージは以下の形式で記述:
<type>: <subject>
<body>
<footer>
Type:
feat: 新機能fix: バグ修正refactor: リファクタリングtest: テスト追加・修正docs: ドキュメント変更chore: ビルドプロセスやツールの変更Subject:
Body(オプション):
Footer(オプション):
Closes #123)git commit後、以下を確認:
git log -1 --stat
git status
ブランチにgitコミットがある?
├─ No → 新規gitコミット作成
└─ Yes → 変更は既存のgitコミットと同じテーマ?
├─ Yes → Squash(git commit --amend)
└─ No → gitコミットを分ける合理性がある?
├─ Yes → 新規gitコミット作成
└─ 履歴を整理したい → Interactive Rebase