conventional-commit について
Conventional Commits 形式のコミットメッセージを作成するプロンプトテンプレートで、記録形式を統一したい開発者向けです。変更内容の確認、タイプとスコープの選択、コミットコマンドの作成を案内します。
主な機能
- 01Git の状態と差分を確認
- 02仕様に沿ったタイプとスコープの選択
- 03簡潔な命令形の要約を作成
- 04本文、破壊的変更、課題参照に対応
- 05git commit でコミット
活用シーン
- 01機能追加や修正のコミットメッセージ作成
- 02チーム内のコミット記録形式の統一
- 03コミットで破壊的変更を明示
- 04コミットと関連課題の紐付け
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ github/ awesome-copilot --skill conventional-commitインストール後、Claude Code で/conventional-commitを入力して読み込まれたか確認します。
詳細
手順
<description>This file contains a prompt template for generating conventional commit messages. It provides instructions, examples, and formatting guidelines to help users write standardized, descriptive commit messages in accordance with the Conventional Commits specification.</description>
ワークフロー
次の手順に従ってください:
git statusを実行して、変更されたファイルを確認します。git diffまたはgit diff --cachedを実行して、変更内容を検査します。git add <file>で変更をステージングします。- 次の XML 構造を使用してコミットメッセージを作成します。
- コミットメッセージを生成すると、Copilot が統合ターミナルで次のコマンドを自動的に実行します(確認は不要です):
git commit -m "type(scope): description"
- このプロンプトを実行するだけで、Copilot がターミナルでコミットを処理します。
コミットメッセージの構造
<commit-message>
<type>feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert</type>
<scope>()</scope>
<description>A short, imperative summary of the change</description>
<body>(optional: more detailed explanation)</body>
<footer>(optional: e.g. BREAKING CHANGE: details, or issue references)</footer>
</commit-message>
例
<examples>
<example>feat(parser): add ability to parse arrays</example>
<example>fix(ui): correct button alignment</example>
<example>docs: update README with usage instructions</example>
<example>refactor: improve performance of data processing</example>
<example>chore: update dependencies</example>
<example>feat!: send email on registration (BREAKING CHANGE: email service required)</example>
</examples>
検証
<validation>
<type>Must be one of the allowed types. See <reference>https://www.conventionalcommits.org/en/v1.0.0/#specification</reference></type>
<scope>Optional, but recommended for clarity.</scope>
<description>Required. Use the imperative mood (e.g., "add", not "added").</description>
<body>Optional. Use for additional context.</body>
<footer>Use for breaking changes or issue references.</footer>
</validation>
最終ステップ
<final-step>
<cmd>git commit -m "type(scope): description"</cmd>
<note>Replace with your constructed message. Include body and footer if needed.</note>
</final-step>
コメント
Markdown 対応