git-commit-executor

Gitの変更を分析して論理的なコミット単位に分割し、Conventional Commits形式で実際にコミットを実行する。

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 6, 2026

When & Why to Use This Skill

The Git Commit Executor is an intelligent automation skill designed to streamline the version control workflow. It analyzes uncommitted changes in a Git repository, groups them into logical, atomic units, and automatically executes commits following the Conventional Commits specification. By transforming messy working directories into structured repository histories, it enhances code maintainability and team collaboration.

Use Cases

  • Scenario 1: Automatically splitting a large day's work of mixed bug fixes and new features into separate, logical commits to improve code review efficiency.
  • Scenario 2: Enforcing standardized commit messages (e.g., feat:, fix:, refactor:) across a project to ensure compatibility with automated changelog generators and CI/CD pipelines.
  • Scenario 3: Reducing the manual overhead of staging specific files and writing repetitive commit messages, allowing developers to focus on core coding tasks while maintaining a clean Git history.
namegit-commit-executor
descriptionGitの変更を分析して論理的なコミット単位に分割し、Conventional Commits形式で実際にコミットを実行する。
short-description自動コミット実行

Git Commit Executor

変更内容を分析して論理的なコミット単位に分割し、実際にコミットを実行するための手順。

手順

  1. 現在のgitの状態と変更内容を分析

    • git status でステージ済み/未ステージを確認
    • git diff --staged と git diff で差分を確認
    • 必要に応じて変更されたファイル内容を確認
  2. 論理的なコミット単位に分割

    • 関連する変更をグループ化(例:機能追加、バグ修正、リファクタ、ドキュメント)
    • 1コミット=1論理変更
    • 依存関係を考慮して順序を決定
  3. 各コミット単位で実行

    • コミット対象を明確に説明
    • git add で該当ファイルだけステージング(まとめて全追加は避ける)
    • Conventional Commits形式のメッセージを作成して git commit を実行
  4. 最後に確認

    • git log --oneline -5 で直近コミットを確認

コミットメッセージ形式

<type>(<optional scope>): <subject>

使用可能なtype

  • feat: 新機能の追加
  • fix: バグ修正
  • docs: ドキュメントのみの変更
  • style: 空白/フォーマットなど
  • refactor: 内部構造の改善
  • perf: パフォーマンス向上
  • test: テストコードの追加/修正
  • build: ビルド関連の変更
  • ci: CI設定やパイプライン変更
  • chore: 雑務的な変更
  • revert: コミットの取り消し

重要事項

  • 実際にコミットを実行する
  • コミット前に内容を明確に説明する
  • エラー発生時は原因を特定して対処する