Skip to content

Instantly share code, notes, and snippets.

@odiak
Created January 16, 2026 02:53
Show Gist options
  • Select an option

  • Save odiak/a37bb75a2e847a67137a30b86231160e to your computer and use it in GitHub Desktop.

Select an option

Save odiak/a37bb75a2e847a67137a30b86231160e to your computer and use it in GitHub Desktop.
変更をコミットするClaude Codeのカスタムコマンド
allowed-tools model
Bash(git status:*)
Bash(git diff:*)
Bash(git log:*)
Bash(git add:*)
Bash(git commit:*)
Bash(git restore:*)
Bash(git reset:*)
claude-haiku-4-5

変更をコミットしてください。

手順

  1. git status で変更ファイルを確認
  2. git diff, git diff --staged で変更内容を確認
  3. git log --oneline -10 で最近のコミットメッセージのスタイルを確認
  4. 変更内容を分析してコミットメッセージを作成
  5. git addgit commit を実行

コミットメッセージ形式

1行目: 変更内容の要約

背景:
なぜこの変更が必要だったのか(自明な場合は省略可)

変更内容:
- 変更点1(短い場合は省略可)
- ...

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Code <noreply@anthropic.com>

認証機能のエラーハンドリングを改善

背景:
ログイン失敗時にユーザーへのフィードバックが不足していた

変更内容:
- エラーメッセージの多言語対応
- リトライ制限の追加

ルール

  • コミットメッセージは日本語で書く
  • 1 行目は簡潔に(50 文字以内が目安)
  • 背景(why)と変更内容(what)を分けて記載
  • 機密情報(.env、credentials.json など)はコミットしない
  • HEREDOC を使用してメッセージを渡す
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment