Skip to content

chore: add conventional-commit skill for Copilot#167

Merged
mahata merged 1 commit into
mainfrom
feat/agent-skills
Apr 2, 2026
Merged

chore: add conventional-commit skill for Copilot#167
mahata merged 1 commit into
mainfrom
feat/agent-skills

Conversation

@mahata
Copy link
Copy Markdown
Owner

@mahata mahata commented Apr 2, 2026

Add a conventional-commit skill under .github/skills/ to guide Copilot in generating standardized commit messages following the Conventional Commits specification.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 2, 2026 12:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Copilot skill document to guide users in generating Conventional Commit messages.

Changes:

  • Introduces .github/skills/conventional-commit/SKILL.md with 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>

Comment on lines +19 to +26
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.
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +24
```bash
git commit -m "type(scope): description"
```
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
```xml
<commit-message>
<type>feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert</type>
<scope>()</scope>
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<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.

Suggested change
<scope>()</scope>
<scope>optional scope such as parser or ui; omit this element if not needed</scope>

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +33
<commit-message>
<type>feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert</type>
<scope>()</scope>
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
<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>
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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>

Copilot uses AI. Check for mistakes.
@mahata mahata enabled auto-merge April 2, 2026 12:50
@mahata mahata merged commit 7fd7e8c into main Apr 2, 2026
7 checks passed
@mahata mahata deleted the feat/agent-skills branch April 2, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants