git-commit-push

a-tak's avatarfrom a-tak

git add, commit, pushの定型操作を実行。レビュー対応や軽微な修正後のコミット・プッシュに使用。メインエージェントのコンテキスト節約のため、定型的なgit操作をこのSkillに委譲する。

⭐1stars🔀0forks📁View on GitHub🕐Updated Dec 16, 2025

When & Why to Use This Skill

The git-commit-push skill automates routine Git operations—including staging, committing, and pushing changes—to streamline the development workflow. By delegating these repetitive version control tasks to a specialized skill, it effectively preserves the main agent's context window, ensuring high performance during complex coding sessions and code reviews.

Use Cases

  • Post-Review Implementation: Quickly commit and push changes after addressing specific feedback from a code review to maintain momentum.
  • Context Window Management: Offload standard Git CLI commands to this skill to keep the main agent's memory focused on architectural logic and debugging.
  • Standardized Commit Practices: Automatically generate formatted commit messages using HEREDOC and Claude Code signatures for consistent repository history.
  • Automated Re-review Triggers: Streamline the handoff process by pushing updates and automatically requesting a follow-up review from the system.
  • Bulk Documentation Updates: Efficiently handle multi-file staging and pushing for non-logic changes like README updates or configuration tweaks.
namegit-commit-push
descriptiongit add, commit, pushの定型操作を実行。レビュー対応や軽微な修正後のコミット・プッシュに使用。メインエージェントのコンテキスト節約のため、定型的なgit操作をこのSkillに委譲する。

git-commit-push

目的

変更されたファイルをステージング、コミット、プッシュする定型的なgit操作を実行し、メインエージェントのコンテキストウィンドウを節約する。

使用タイミング

以下の状況でこのスキルを使用する:

  • コードレビュー対応後のコミット・プッシュ
  • 軽微な修正後の定型的なgit操作
  • 複数ファイルの一括コミット
  • ドキュメント更新後のコミット

実行手順

  1. git status確認: 現在の変更状況を確認
  2. git add: 変更されたファイルをステージング(全体 or 指定ファイル)
  3. git commit: 適切なコミットメッセージでコミット作成
  4. git push: リモートリポジトリにプッシュ
  5. codexに再レビュー依頼: @codex review とコメントをしてcodexに再レビュー依頼をする
  6. 結果報告: 実行結果を簡潔に報告

コミットメッセージは必ずHEREDOC形式で渡し、末尾にClaude Code署名を含める。

詳細な処理フローは references/command-details.md を参照。

エラーハンドリング

エラー 対処方法
コミット失敗 pre-commit hookエラー詳細を報告
プッシュ失敗 git pullを提案
マージコンフリクト メインエージェントに解決を依頼

詳細は references/command-details.md#エラーハンドリング詳細 を参照。

使用例

ケース1: 全ファイルをコミット

Skill: git-commit-push

全ての変更をコミットしてください。
メッセージ: "fix: レビュー指摘対応 - BatteryChecker改善"

ケース2: 特定ファイルのみコミット

Skill: git-commit-push

以下のファイルのみコミット:
- app/src/main/java/com/example/Foo.kt
- app/src/test/java/com/example/FooTest.kt

メッセージ: "test: Fooクラスのテストケース追加"

その他の使用例は references/usage-examples.md を参照。

制限事項

このスキルでは対応しない操作(メインエージェントで実行):

  • git rebase
  • git merge
  • コンフリクト解決
  • ブランチ作成・切り替え

参照ドキュメント

必要に応じて以下のドキュメントを参照する:

  • references/command-details.md: 処理フロー詳細、コミットメッセージ規約、エラーハンドリング
  • references/usage-examples.md: 具体的な使用例

関連Skill

  • git-create-pr: PR作成まで一括実行(コミット+プッシュ+PR作成)
  • git-review: PRのレビューコメント取得・整理