git-commit-message
できること
このツールは、コードの変更を記録するためのメッセージを作成します。何がどう変わったのか、そしてなぜ変えたのかをまとめ、読みやすい決まった形式に整えます。
使う場面
- ✓コードの変更内容を説明したいとき
- ✓変更内容の要約をAIに作ってもらいたいとき
- ✓プロジェクトのバージョン履歴を整理したいとき
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/git-commit-message/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“直近のコード変更に対するコミットメッセージを作成してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIは行った코드変更を分析し、標準的な形式に整理します。変更の種類(修正、新機能など)、短い要約、そして変更理由をより詳しく説明した部分に分けて書きます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Git Commit Message Generation
Generate a commit message from the actual staged changes (git diff --cached). The message must let a reader know "what changed and why" without opening the diff.
When to Use
- Use when the user asks to write, generate, or polish a git commit message.
- Use when staged changes need a conventional-commit message with a why-focused body.
Workflow
- Look at the changes: run
git status --short,git diff --cached --stat, andgit diff --cachedto confirm there is something staged. If staging is empty, use an explicitly supplied diff or change description when available and label that evidence; otherwise request the intended changes. Do not stage files implicitly. - Pick a type: choose exactly one type prefix based on the changes (if one commit mixes types, ask the user to split it):
feat: new featurefix: bug fixdocs: documentation onlyrefactor: refactor (behavior unchanged)test: add or change testschore: build, dependencies, misc
- Write the subject: format
type: English imperative phrase, ≤50 characters. Start with a verb: "Add…", "Fix…", "Remove…", "Unify…". Ban empty subjects like "update code", "some changes", "fix bug". - Write the body (optional but recommended): 1–3 lines explaining why, not a play-by-play of how. Bug fixes must state the trigger conditions; features should describe the user-visible change.
- Output: return the message in the format requested. If supplying a shell command, quote it safely: commit text containing
$(), backticks, or quotes must not execute as shell code. For a multiline message prefer writing it verbatim to a temporary file and usinggit commit -F <message-file>.
Rules
- The subject is for skimmers; the body is for future-you in three months. Keep the two jobs separate.
- A change mixing a feature and a refactor should become two commits, not one
featthat papers over the mess. - No meta-commentary in the message ("generated by AI", etc.) — the message is about the change, nothing else.
Minimal example (runnable)
# 1. Look at the changes first
git status --short
git diff --cached --stat
# 2. Suppose the change: added CAPTCHA verification to the login endpoint
# Generated commit:
git commit -m "feat: add CAPTCHA verification to login endpoint" -m "Blocks automated credential stuffing; CAPTCHA valid 5 minutes, account locks 10 minutes after 3 failures."
Another example (bug fixes must state trigger conditions):
git commit -m "fix: keep order-list filters across pagination" -m "Trigger: filter first, then turn the page. Cause: page turns dropped the query params."
Limitations
- Only writes the message. Staging, splitting, committing and pushing remain the user's decision, and the skill never runs
git commiton its own. - The 50-character subject and imperative-mood conventions are the common default; repositories with their own commit convention (Gitmoji, Jira prefixes, project overrides) take precedence over this skill.
- It reads the staged diff, so it cannot describe intent that the diff alone does not show. When the "why" is not inferable, the skill asks instead of inventing it.
- Generated or vendored changes (lockfiles, minified output) are summarized collectively rather than listed line by line.
Anti-patterns
- ❌ Writing a message for an empty staging area: no
git diff --cached, no commit message. - ❌ Catch-all
chore: labeling every feat and fix aschoreuntil the type system means nothing. - ❌ Novel-length subjects:
feat: add a really useful feature that greatly improves the user experience— the subject says what, leave praise to the user. - ❌ Body as implementation log: "first changed line 20 of a.py, then b.py…" — the diff already shows that; the body explains why.
よくある質問
「コミット」とは何ですか?
プロジェクトの進捗を保存することです。コードに加えた一連の変更を記録します。コミットメッセージは、それらの変更を説明するものです。
メッセージに決まった形式を使うのはなぜですか?
「Conventional Commits」などの標準的な形式を使うと、プロジェクトの履歴が読みやすくなり、理解しやすくなるうえ、今後の作業を自動化しやすくなります。
AIが変更内容を保存してくれますか?
いいえ。AIはメッセージを作成するだけです。変更を保存(コミット)するには、自分でGitのコマンドを使う必要があります。
詳細
作者による元の説明
Generates conventional-commit messages from staged changes: type prefix + English imperative subject (≤50 chars) + optional body explaining why. Use when the user asks to write, generate, or polish a git commit message.
人気
- GitHubのスター
- 48k
- ランキング
- #4734
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。