Skip to content
cccskills
FreePublished on GitHub

commit-by-logical-units

変更内容を確認し、論理的な単位で複数のコミットに分けて実行します

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

現在の変更内容を確認し、論理的に意味がある単位で複数のコミットに分けて実行してください。

以下の手順で実行してください:

  1. 変更内容の確認

    • git statusで変更されたファイルを確認
    • git diff --statで変更の統計情報を確認
    • git log --oneline -10で最近のコミット履歴を確認し、コミットメッセージのスタイルを把握
  2. 変更内容の分析

    • いくつかの代表的なファイルの差分を確認(git diff [ファイルパス] | head -50)
    • 変更の性質を理解し、論理的なグループに分類
    • 例:
      • ルートディレクトリのファイル
      • 機能別のドキュメント(features, getting-started, recipes, tools, publishingなど)
      • 設定ファイル
      • テストファイル
      • ソースコード(機能ごと、モジュールごと)
  3. 論理的な単位でコミット

    • 各グループごとにgit add [ファイル/ディレクトリ]とgit commitを実行
    • コミットメッセージは英語で簡潔に記述
    • コミットメッセージの形式:
      git commit -m "$(cat <<'EOF'
      変更の概要を1行で記述
      
      詳細な説明(必要に応じて)
      
      Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      EOF
      )"
      
  4. コミット後の確認

    • git statusで残りの変更を確認
    • git log --oneline -10でコミット履歴を確認

重要な原則

  • 論理的な単位: 関連する変更を1つのコミットにまとめる
  • 簡潔なメッセージ: 何を変更したかを明確に記述
  • 英語で記述: コミットメッセージは英語で書く
  • 複数コミット推奨: 大きな変更は複数のコミットに分ける
  • 意味のあるグループ化: ディレクトリ構造や機能に基づいてグループ化

除外すべきファイル

以下のファイルは通常コミットしない:

  • .envファイル(環境変数、機密情報)
  • node_modules/(依存関係)
  • ビルド成果物

これらのファイルが変更されている場合は、ユーザーに確認するか、無視してください。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Report a problem with this skill