chore: add conventional-commit skill for Copilot#167
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new Copilot skill document to guide users in generating Conventional Commit messages.
Changes:
- Introduces
.github/skills/conventional-commit/SKILL.mdwith a structured workflow and XML-formatted template for commit message generation. - Provides examples and validation guidance aligned to the Conventional Commits specification.
Comments suppressed due to low confidence (1)
.github/skills/conventional-commit/SKILL.md:71
- The "Final Step" repeats the single-line
git commit -m "type(scope): description"command while also noting users should include body/footer if needed, which isn’t possible with that exact command alone. Align this section with the earlier workflow update (e.g., describe how to include body/footer or instruct using the editor).
```xml
<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>
| 4. Construct your commit message using the following XML structure. | ||
| 5. After generating your commit message, Copilot will automatically run the following command in your integrated terminal (no confirmation needed): | ||
|
|
||
| ```bash | ||
| git commit -m "type(scope): description" | ||
| ``` | ||
|
|
||
| 6. Just execute this prompt and Copilot will handle the commit for you in the terminal. |
There was a problem hiding this comment.
The workflow text states Copilot will "automatically run" git commit in the terminal with "no confirmation needed". That’s misleading and can encourage unsafe automation; this skill should instead instruct the user to review the message and run the command themselves (or say Copilot may suggest the command, depending on environment).
| ```bash | ||
| git commit -m "type(scope): description" | ||
| ``` |
There was a problem hiding this comment.
The guidance implies users can include body/footer while using a single git commit -m "..." invocation, but body/footer require either multiple -m flags or letting Git open an editor. Please update the example/wording so it’s accurate for multi-line Conventional Commit messages.
This issue also appears on line 67 of the same file.
| ```xml | ||
| <commit-message> | ||
| <type>feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert</type> | ||
| <scope>()</scope> |
There was a problem hiding this comment.
<scope>()</scope> is likely to be interpreted as including parentheses inside the scope value, which would produce doubled parentheses or empty () in the final header. Consider making scope explicitly optional and representing it as the raw scope text (without parentheses), with guidance to omit the scope segment entirely when not used.
| <scope>()</scope> | |
| <scope>optional scope such as parser or ui; omit this element if not needed</scope> |
| <commit-message> | ||
| <type>feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert</type> | ||
| <scope>()</scope> |
There was a problem hiding this comment.
The commit structure restricts <type> to a fixed list, but the examples include feat!: (breaking change marker). As written, the validation rules would reject that example. Update the structure/validation to account for the optional ! breaking-change indicator (either by allowing it in the header pattern or by representing it separately).
| <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> |
There was a problem hiding this comment.
The example refactor: improve performance of data processing is inconsistent with the Conventional Commits intent where performance improvements are typically perf. Consider changing this example to avoid teaching an ambiguous mapping between types and change intent.
| <example>refactor: improve performance of data processing</example> | |
| <example>refactor(core): simplify data processing pipeline</example> | |
| <example>perf(api): reduce response time for search endpoint</example> |
Add a conventional-commit skill under
.github/skills/to guide Copilot in generating standardized commit messages following the Conventional Commits specification.