jpskill.com
✍️ ライティング コミュニティ

commit-message

現在ステージングされているGitの変更内容から、Commitlintで推奨される形式に沿ったコミットメッセージを自動で作成し、コミット作業を効率化するSkill。

📜 元の英語説明(参考)

Use when drafting a Conventional Commit message from currently staged Git changes. Triggers: 'write commit message', 'draft commit from staged changes', 'generate conventional commit', 'message for git commit -F -'. Not for creating commits, amending history, or full code review.

🇯🇵 日本人クリエイター向け解説

一言でいうと

現在ステージングされているGitの変更内容から、Commitlintで推奨される形式に沿ったコミットメッセージを自動で作成し、コミット作業を効率化するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o commit-message.zip https://jpskill.com/download/10626.zip && unzip -o commit-message.zip && rm commit-message.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10626.zip -OutFile "$d\commit-message.zip"; Expand-Archive "$d\commit-message.zip" -DestinationPath $d -Force; ri "$d\commit-message.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して commit-message.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → commit-message フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

コミットメッセージ

ステージングされた変更から Conventional Commit メッセージを作成します。

重要な制約

  • ステージングされた変更(--cached / ステージングされた SCM 状態)のみを入力として使用します。
  • 全ての SCM 呼び出しにおいて、リポジトリのルートを解決して使用します。
  • 1 回のリトライ後もステージングされた変更が存在しない場合、停止してユーザーに通知します。
  • 常に AI-assistant: <AGENT> というフッターを含めます。
  • 最終的なコミットメッセージのみを、1 つの Markdown コードブロックで出力します。

ワークフロー

  1. リポジトリのルートを解決します。 ワークスペースのルートが既知の場合はそちらを優先し、そうでない場合は git rev-parse --show-toplevel を実行します。
  2. ステージングされた変更を取得します。 repositoryPath: <repo-root> とステージングされた状態を指定して get_changed_files を使用することを推奨します。 そのツールが利用できない場合は、明示的なリポジトリコンテキストを持つ SCM ツールを使用します。 SCM ツールが利用できない場合は、git -C <repo-root> diff --cached を使用します。
  3. ステージングされたコンテンツが存在するか検証します。 空の場合、明示的なリポジトリルートを指定してもう一度リトライします。それでも空の場合は、ユーザーに通知して停止します。
  4. ステージングされた diff を分析します。 変更されたファイル、動作への影響、論理的な範囲、および可能性の高いコミットタイプを特定します。
  5. ユーザーの引数/コンテキストが提供されている場合は、それらを組み込みます。 ユーザー入力からの明示的な issue 参照と制約を保持します。
  6. references/conventional-commit-rules.md を使用してコミットメッセージを作成します。
  7. 最終的なメッセージのみを fenced code block で返し、git commit -F - で使用できる状態にします。

参考文献

  • references/conventional-commit-rules.md - subject/body/footer のルールと例。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Commit Message

Draft a Conventional Commit message from staged changes.

Critical Constraints

  • Use only staged changes (--cached / staged SCM state) as input.
  • Resolve and use the repository root for all SCM calls.
  • If no staged changes exist after one retry, stop and inform the user.
  • Always include an AI-assistant: <AGENT> footer.
  • Output only the final commit message in one markdown code block.

Workflow

  1. Resolve repository root. Prefer workspace root when known; otherwise run git rev-parse --show-toplevel.
  2. Retrieve staged changes. Prefer get_changed_files with repositoryPath: <repo-root> and staged state. If that tool is unavailable, use SCM tooling with explicit repo context. If SCM tooling is unavailable, use git -C <repo-root> diff --cached.
  3. Validate staged content exists. If empty, retry once with explicit repo root; if still empty, inform user and stop.
  4. Analyze the staged diff. Identify changed files, behavior impact, logical scope, and likely commit type.
  5. Incorporate user arguments/context when provided. Preserve explicit issue refs and constraints from user input.
  6. Draft the commit message using references/conventional-commit-rules.md.
  7. Return only the final message in a fenced code block, ready for git commit -F -.

References

  • references/conventional-commit-rules.md - subject/body/footer rules and examples.