mcpField
C
conventional-commit

conventional-commit

github.com/github開発40.5k17.2k 回インストール今日更新
リポジトリ

conventional-commit について

Conventional Commits 形式のコミットメッセージを作成するプロンプトテンプレートで、記録形式を統一したい開発者向けです。変更内容の確認、タイプとスコープの選択、コミットコマンドの作成を案内します。

主な機能

  1. 01Git の状態と差分を確認
  2. 02仕様に沿ったタイプとスコープの選択
  3. 03簡潔な命令形の要約を作成
  4. 04本文、破壊的変更、課題参照に対応
  5. 05git commit でコミット

活用シーン

  1. 01機能追加や修正のコミットメッセージ作成
  2. 02チーム内のコミット記録形式の統一
  3. 03コミットで破壊的変更を明示
  4. 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>
ワークフロー

次の手順に従ってください:

  1. git status を実行して、変更されたファイルを確認します。
  2. git diff または git diff --cached を実行して、変更内容を検査します。
  3. git add <file> で変更をステージングします。
  4. 次の XML 構造を使用してコミットメッセージを作成します。
  5. コミットメッセージを生成すると、Copilot が統合ターミナルで次のコマンドを自動的に実行します(確認は不要です):
git commit -m "type(scope): description"
  1. このプロンプトを実行するだけで、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>

コメント