$npx -y skills add github/awesome-copilot --skill conventional-commitPrompt and workflow for generating conventional commit messages using a structured XML format. Guides users to create standardized, descriptive commit messages in line with the Conventional Commits specification, including instructions, examples, and validation.
| 1 | ### Instructions |
| 2 | |
| 3 | ```xml |
| 4 | <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> |
| 5 | ``` |
| 6 | |
| 7 | ### Workflow |
| 8 | |
| 9 | **Follow these steps:** |
| 10 | |
| 11 | 1. Run `git status` to review changed files. |
| 12 | 2. Run `git diff` or `git diff --cached` to inspect changes. |
| 13 | 3. Stage your changes with `git add <file>`. |
| 14 | 4. Construct your commit message using the following XML structure. |
| 15 | 5. After generating your commit message, Copilot will automatically run the following command in your integrated terminal (no confirmation needed): |
| 16 | |
| 17 | ```bash |
| 18 | git commit -m "type(scope): description" |
| 19 | ``` |
| 20 | |
| 21 | 6. Just execute this prompt and Copilot will handle the commit for you in the terminal. |
| 22 | |
| 23 | ### Commit Message Structure |
| 24 | |
| 25 | ```xml |
| 26 | <commit-message> |
| 27 | <type>feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert</type> |
| 28 | <scope>()</scope> |
| 29 | <description>A short, imperative summary of the change</description> |
| 30 | <body>(optional: more detailed explanation)</body> |
| 31 | <footer>(optional: e.g. BREAKING CHANGE: details, or issue references)</footer> |
| 32 | </commit-message> |
| 33 | ``` |
| 34 | |
| 35 | ### Examples |
| 36 | |
| 37 | ```xml |
| 38 | <examples> |
| 39 | <example>feat(parser): add ability to parse arrays</example> |
| 40 | <example>fix(ui): correct button alignment</example> |
| 41 | <example>docs: update README with usage instructions</example> |
| 42 | <example>refactor: improve performance of data processing</example> |
| 43 | <example>chore: update dependencies</example> |
| 44 | <example>feat!: send email on registration (BREAKING CHANGE: email service required)</example> |
| 45 | </examples> |
| 46 | ``` |
| 47 | |
| 48 | ### Validation |
| 49 | |
| 50 | ```xml |
| 51 | <validation> |
| 52 | <type>Must be one of the allowed types. See <reference>https://www.conventionalcommits.org/en/v1.0.0/#specification</reference></type> |
| 53 | <scope>Optional, but recommended for clarity.</scope> |
| 54 | <description>Required. Use the imperative mood (e.g., "add", not "added").</description> |
| 55 | <body>Optional. Use for additional context.</body> |
| 56 | <footer>Use for breaking changes or issue references.</footer> |
| 57 | </validation> |
| 58 | ``` |
| 59 | |
| 60 | ### Final Step |
| 61 | |
| 62 | ```xml |
| 63 | <final-step> |
| 64 | <cmd>git commit -m "type(scope): description"</cmd> |
| 65 | <note>Replace with your constructed message. Include body and footer if needed.</note> |
| 66 | </final-step> |
| 67 | ``` |