Create Commit Message Instructions
What This Skill Does
Generates a .github/commit-message-instructions.md file that customizes how GitHub Copilot generates commit messages in the VS Code Source Control panel. The generated file uses XML-like tags exclusively (no markdown headers, no bullet lists, no tables) because Copilot's commit message generation uses a lower-tier LLM that parses XML boundaries more reliably.
Step-by-step Procedure
Step 1: Gather Preferences
Determine the user's commit message preferences. If the user provides no specific preferences, default to Conventional Commits format.
If the user's request is clear enough, skip the questions and proceed directly.
Step 2: Determine Commit Style
Based on user input, select the appropriate commit message style:
Step 3: Build Instruction Content
Construct the instruction file content using XML-like tags exclusively — no markdown headers, no bullet lists, no tables. XML-like tags are the most reliable structure for lower-tier LLMs.
Follow this skeleton:
Step 4: Write the File
Write the generated instruction content to .github/commit-message-instructions.md in the workspace root. If the file already exists, overwrite it with the new content.
Step 5: Guide User on Settings Configuration
After the file is created, display this message to the user:
{
"github.copilot.chat.commitMessageGeneration.instructions": [
{ "file": ".github/commit-message-instructions.md" }
]
}
Once this setting is in place, staging changes and clicking the sparkle icon in Source Control will generate commit messages following the instructions in the file.
Default Template (Conventional Commits)
If the user provides no specific preferences, generate this content for .github/commit-message-instructions.md:
<commit-message-guidelines>
<instruction>
Generate commit messages following the Conventional Commits specification (https://www.conventionalcommits.org/).
</instruction>
<format>
type(optional scope): description
[optional body]
[optional footer(s)]
</format>
<types>
<type name="feat">A new feature</type>
<type name="fix">A bug fix</type>
<type name="docs">Documentation only changes</type>
<type name="style">Changes that do not affect the meaning of the code (formatting, missing semi-colons, etc.)</type>
<type name="refactor">A code change that neither fixes a bug nor adds a feature</type>
<type name="perf">A code change that improves performance</type>
<type name="test">Adding missing tests or correcting existing tests</type>
<type name="build">Changes that affect the build system or external dependencies</type>
<type name="ci">Changes to CI configuration files and scripts</type>
<type name="chore">Other changes that don't modify src or test files</type>
<type name="revert">Reverts a previous commit</type>
</types>
<rules>
1. Use the imperative mood in the subject line ("add" not "added" or "adds")
2. Do not capitalize the first letter of the subject line
3. Do not end the subject line with a period
4. Limit the subject line to 50 characters when possible, max 72
5. Separate subject from body with a blank line (if body is present)
6. Use the body to explain what and why, not how
7. Wrap the body at 72 characters
</rules>
<breaking-changes>
Indicate breaking changes by:
- Adding "!" after the type/scope: feat!: remove deprecated API
- Adding a BREAKING CHANGE: footer in the body
</breaking-changes>
<examples>
<example type="feat">
feat(auth): add OAuth2 login support
feat(cart): implement guest checkout flow
feat: add dark mode toggle to settings
</example>
<example type="fix">
fix(api): resolve null pointer exception in user service
fix(ui): correct button alignment on mobile viewport
fix: prevent duplicate form submissions
</example>
<example type="docs">
docs(readme): update installation instructions
docs(api): add endpoint usage examples
docs: add contributing guidelines
</example>
<example type="style">
style: format code with prettier
style(components): fix indentation in Button component
style: remove trailing whitespace
</example>
<example type="refactor">
refactor(api): extract validation logic to middleware
refactor: simplify conditional rendering in Dashboard
refactor(db): rename user table columns for clarity
</example>
<example type="perf">
perf(images): implement lazy loading for gallery
perf(api): add database query caching
perf: reduce bundle size by code splitting
</example>
<example type="test">
test(auth): add unit tests for login validation
test: increase coverage for utils module
test(e2e): add checkout flow integration tests
</example>
<example type="build">
build(deps): upgrade React to v19
build: configure webpack for production optimization
build(docker): update base image to node 22
</example>
<example type="ci">
ci: add GitHub Actions workflow for testing
ci(deploy): configure automatic staging deployments
ci: add code coverage reporting to pipeline
</example>
<example type="chore">
chore: update .gitignore patterns
chore(deps): bump minor dependency versions
chore: remove deprecated config files
</example>
<example type="revert">
revert: revert "feat(auth): add OAuth2 login support"
revert(api): undo breaking change to user endpoint
</example>
<example type="breaking-change">
feat(api)!: change response format for user endpoints
BREAKING CHANGE: User endpoint now returns data wrapped in "data" property
refactor!: drop support for Node.js 16
</example>
</examples>
</commit-message-guidelines>
Common Customizations
Source: ikcode-dev/copilot-kit — distributed by TomeVault.
1---2name: kit-copilot-create-commit-instructions3description: Generates a commit message instruction file for GitHub Copilot's VS Code commit message generation feature. Use when user asks to create, set up, or customize commit message instructions, commit conventions, commit message format, or Copilot commit generation settings.4---56# Create Commit Message Instructions78## What This Skill Does910Generates a `.github/commit-message-instructions.md` file that customizes how GitHub Copilot generates commit messages in the VS Code Source Control panel. The generated file uses XML-like tags exclusively (no markdown headers, no bullet lists, no tables) because Copilot's commit message generation uses a lower-tier LLM that parses XML boundaries more reliably.1112## Step-by-step Procedure1314### Step 1: Gather Preferences1516Determine the user's commit message preferences. If the user provides no specific preferences, default to Conventional Commits format.1718<context-gathering>19Check existing project conventions before asking questions:20- Look for `CONTRIBUTING.md`, `README.md` for commit guidelines21- Check `.commitlintrc`, `commitlint.config.js` for existing linting rules22- Scan recent git history for established patterns (if accessible)23</context-gathering>2425<questions>261. Format preference — Conventional Commits, Simple Imperative, Ticket-First, or Emoji-Enhanced?272. Should commits include a scope? (e.g., `feat(auth):` vs `feat:`)283. Should commits reference issue/ticket numbers? What format? (e.g., `#123`, `JIRA-123`)294. Should multi-line commits with body text be encouraged?305. How should breaking changes be indicated?316. What language should commit messages be written in?3233If the user's request is clear enough, skip the questions and proceed directly.34</questions>3536### Step 2: Determine Commit Style3738Based on user input, select the appropriate commit message style:3940<decision-guide name="commit-style">41- **Conventional Commits** (default): Structured, parseable commits. Example: `feat(api): add user authentication endpoint`42- **Simple Imperative**: Smaller projects, less formal. Example: `Add user authentication`43- **Ticket-First**: Issue-tracker-centric workflows. Example: `[PROJ-123] Add user authentication`44- **Emoji-Enhanced**: Visual categorization. Example: `✨ feat: add user authentication`45</decision-guide>4647### Step 3: Build Instruction Content4849Construct the instruction file content using **XML-like tags exclusively** — no markdown headers, no bullet lists, no tables. XML-like tags are the most reliable structure for lower-tier LLMs.5051Follow this skeleton:5253<template name="instruction-skeleton">54```xml55<commit-message-guidelines>5657<instruction>58[High-level instruction and spec reference]59</instruction>6061<format>62[Primary format specification]63</format>6465<types>66[Each type as its own <type name="..."> block with a description]67</types>6869<rules>70[Numbered rules]71</rules>7273<breaking-changes>74[How to indicate breaking changes]75</breaking-changes>7677<examples>78[Comprehensive examples for EVERY type prefix — see critical rule below]79</examples>8081</commit-message-guidelines>82```83</template>8485<rules>86The commit message generation feature uses a lower-tier LLM that performs significantly better with abundant examples. Always include at least one realistic example for EVERY type prefix defined in the instruction. This is non-negotiable — sparse examples lead to inconsistent output. For Conventional Commits, provide examples for: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, and `revert`.87</rules>8889### Step 4: Write the File9091Write the generated instruction content to `.github/commit-message-instructions.md` in the workspace root. If the file already exists, overwrite it with the new content.9293<rules>94Do NOT paste the content as a code block in chat — create the actual file.95</rules>9697### Step 5: Guide User on Settings Configuration9899After the file is created, display this message to the user:100101<user-message>102Add the following to your VS Code workspace settings (`.vscode/settings.json`):103104```json105{106 "github.copilot.chat.commitMessageGeneration.instructions": [107 { "file": ".github/commit-message-instructions.md" }108 ]109}110```111112Once this setting is in place, staging changes and clicking the sparkle icon in Source Control will generate commit messages following the instructions in the file.113</user-message>114115## Default Template (Conventional Commits)116117If the user provides no specific preferences, generate this content for `.github/commit-message-instructions.md`:118119```xml120<commit-message-guidelines>121122<instruction>123Generate commit messages following the Conventional Commits specification (https://www.conventionalcommits.org/).124</instruction>125126<format>127type(optional scope): description128129[optional body]130131[optional footer(s)]132</format>133134<types>135 <type name="feat">A new feature</type>136 <type name="fix">A bug fix</type>137 <type name="docs">Documentation only changes</type>138 <type name="style">Changes that do not affect the meaning of the code (formatting, missing semi-colons, etc.)</type>139 <type name="refactor">A code change that neither fixes a bug nor adds a feature</type>140 <type name="perf">A code change that improves performance</type>141 <type name="test">Adding missing tests or correcting existing tests</type>142 <type name="build">Changes that affect the build system or external dependencies</type>143 <type name="ci">Changes to CI configuration files and scripts</type>144 <type name="chore">Other changes that don't modify src or test files</type>145 <type name="revert">Reverts a previous commit</type>146</types>147148<rules>1491. Use the imperative mood in the subject line ("add" not "added" or "adds")1502. Do not capitalize the first letter of the subject line1513. Do not end the subject line with a period1524. Limit the subject line to 50 characters when possible, max 721535. Separate subject from body with a blank line (if body is present)1546. Use the body to explain what and why, not how1557. Wrap the body at 72 characters156</rules>157158<breaking-changes>159Indicate breaking changes by:160- Adding "!" after the type/scope: feat!: remove deprecated API161- Adding a BREAKING CHANGE: footer in the body162</breaking-changes>163164<examples>165 <example type="feat">166 feat(auth): add OAuth2 login support167 feat(cart): implement guest checkout flow168 feat: add dark mode toggle to settings169 </example>170171 <example type="fix">172 fix(api): resolve null pointer exception in user service173 fix(ui): correct button alignment on mobile viewport174 fix: prevent duplicate form submissions175 </example>176177 <example type="docs">178 docs(readme): update installation instructions179 docs(api): add endpoint usage examples180 docs: add contributing guidelines181 </example>182183 <example type="style">184 style: format code with prettier185 style(components): fix indentation in Button component186 style: remove trailing whitespace187 </example>188189 <example type="refactor">190 refactor(api): extract validation logic to middleware191 refactor: simplify conditional rendering in Dashboard192 refactor(db): rename user table columns for clarity193 </example>194195 <example type="perf">196 perf(images): implement lazy loading for gallery197 perf(api): add database query caching198 perf: reduce bundle size by code splitting199 </example>200201 <example type="test">202 test(auth): add unit tests for login validation203 test: increase coverage for utils module204 test(e2e): add checkout flow integration tests205 </example>206207 <example type="build">208 build(deps): upgrade React to v19209 build: configure webpack for production optimization210 build(docker): update base image to node 22211 </example>212213 <example type="ci">214 ci: add GitHub Actions workflow for testing215 ci(deploy): configure automatic staging deployments216 ci: add code coverage reporting to pipeline217 </example>218219 <example type="chore">220 chore: update .gitignore patterns221 chore(deps): bump minor dependency versions222 chore: remove deprecated config files223 </example>224225 <example type="revert">226 revert: revert "feat(auth): add OAuth2 login support"227 revert(api): undo breaking change to user endpoint228 </example>229230 <example type="breaking-change">231 feat(api)!: change response format for user endpoints232233 BREAKING CHANGE: User endpoint now returns data wrapped in "data" property234235 refactor!: drop support for Node.js 16236 </example>237</examples>238239</commit-message-guidelines>240```241242## Common Customizations243244<decision-guide name="customizations">245| Request | Adjustment |246|---------|------------|247| Include Jira ticket | Add rule: Include Jira ticket number at the start: `[PROJ-XXX] type: description` |248| No scope required | Remove scope from format, simplify to `type: description` |249| Max 50 chars | Emphasize character limit in rules |250| Include emoji | Add emoji mapping to types (e.g., `✨ feat`, `🐛 fix`) |251| Multi-language team | Specify commit language: "Write all commit messages in English" |252| Link to PR | Add footer instruction for PR references |253</decision-guide>254255<rules>256- **Always file-based** — always write instructions to `.github/commit-message-instructions.md`. Never output them inline in the chat.257- **XML-like tags only** — the generated file must use exclusively XML-like tags for structure. No markdown headers, bullet lists, or tables in the output file.258- **Examples are critical** — always provide at least one example per type prefix. More examples = better results. This is the single most impactful factor for output quality.259- **Keep rules concise** — while examples should be comprehensive, keep textual rules short and clear.260- **Consider tooling** — if the project uses commitlint, semantic-release, or similar tools, ensure compatibility.261</rules>262263---264> Source: [ikcode-dev/copilot-kit](https://github.com/ikcode-dev/copilot-kit) — distributed by [TomeVault](https://tomevault.io).265<!-- tomevault:4.0:skill_md:2026-06-16 -->