feat: add commit-normalize skill - #1
Conversation
Adds a new agent skill that rewrites informal/inconsistent commit messages to Conventional Commits format (type(scope): description). Covers type classification, scope inference, subject line rules, body/footer formatting, breaking change notation, and a pattern reference mapping common informal messages to their conventional equivalents. Nightshift-Task: commit-normalize Nightshift-Ref: https://github.com/marcus/nightshift Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughA new documentation file defines a Commit Message Normalizer skill that prescribes rewriting informal commit messages to Conventional Commits format, including type classifications, scope inference rules, subject line conventions, breaking change handling, pattern mappings, and practical examples. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~18 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
commit-normalize/SKILL.md (1)
17-23: Add language identifiers to fenced code blocks.These fences trip markdownlint MD040 and make the examples render less clearly in some viewers.
Proposed doc fix
-``` +```text type(scope): subject [optional body] [optional footer(s)] -``` +``` -``` +```text Before: Added dark mode toggle to settings page After: feat(settings): add dark mode toggle -``` +``` -``` +```text Before: fix the login issue that users reported After: fix(auth): prevent session expiry during active use Users were being logged out mid-session because the token refresh timer was not reset on activity. Fixes `#892` -``` +``` -``` +```text Before: updated packages After: chore(deps): update react to 19.1 and next to 15.3 -``` +``` -``` +```text Before: changed API response format After: feat(api)!: return JSON arrays instead of wrapped objects BREAKING CHANGE: all list endpoints now return raw arrays instead of { data: [], meta: {} } wrappers. Clients must update their response parsing. -``` +``` -``` +```text Before: refactoring After: refactor(payments): extract shared validation logic Moved duplicate card validation from checkout and billing into a shared validator module. -``` +```Also applies to: 130-133, 136-144, 147-150, 153-160, 163-169
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@commit-normalize/SKILL.md` around lines 17 - 23, The fenced code blocks in SKILL.md (the examples starting with the block that shows "type(scope): subject" and the subsequent Before/After example blocks) lack language identifiers and trigger markdownlint MD040; update each triple-backtick fence in those example blocks (including the main template block and all Before/After example blocks around lines shown in the diff) to include a language tag such as "text" (e.g., change ``` to ```text) so markdownlint passes and viewers render the examples consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@commit-normalize/SKILL.md`:
- Around line 15-23: Update the canonical format in the "Rewrite commit
messages..." section of SKILL.md so it allows scope-less and breaking-change
variants instead of requiring only "type(scope): subject"; replace the single
example "type(scope): subject" with the accepted variants "type: subject",
"type(scope): subject", "type!: subject", and "type(scope)!: subject" (keeping
the optional body and footer lines unchanged) so the documented canonical format
matches the valid outputs and examples elsewhere.
- Around line 96-100: The table entry that rewrites "WIP / work in progress" to
`wip: [describe what's in progress]` conflicts with the allowed Conventional
Commit types; update the SKILL.md table so WIP is not normalized to a
non-supported `wip` type—either remove that row or change its mapping to an
allowed type (e.g., map to `chore:`) or explicitly state to keep "WIP" unchanged
and recommend squashing before merge; edit the row that currently reads `WIP /
work in progress` → `wip: [describe what's in progress]` and ensure consistency
with the allowed type list above.
---
Nitpick comments:
In `@commit-normalize/SKILL.md`:
- Around line 17-23: The fenced code blocks in SKILL.md (the examples starting
with the block that shows "type(scope): subject" and the subsequent Before/After
example blocks) lack language identifiers and trigger markdownlint MD040; update
each triple-backtick fence in those example blocks (including the main template
block and all Before/After example blocks around lines shown in the diff) to
include a language tag such as "text" (e.g., change ``` to ```text) so
markdownlint passes and viewers render the examples consistently.
| Rewrite commit messages to follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. Every commit message must match: | ||
|
|
||
| ``` | ||
| type(scope): subject | ||
|
|
||
| [optional body] | ||
|
|
||
| [optional footer(s)] | ||
| ``` |
There was a problem hiding this comment.
Make the canonical format match the valid outputs.
This section says every normalized message must be type(scope): subject, but later rules/examples allow scope-less commits (chore: ...) and breaking-change syntax (feat(api)!: ...). As written, the skill can reject formats it later tells itself to generate.
Proposed doc fix
-Rewrite commit messages to follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. Every commit message must match:
+Rewrite commit messages to follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. Normalized commit messages should match one of these forms:
-type(scope): subject
+type: subject
+type(scope): subject
+type!: subject
+type(scope)!: subject
[optional body]
[optional footer(s)]
```
</details>
Also applies to: 50-50, 87-90
<details>
<summary>🧰 Tools</summary>
<details>
<summary>🪛 markdownlint-cli2 (0.21.0)</summary>
[warning] 17-17: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<details>
<summary>🤖 Prompt for AI Agents</summary>
```
Verify each finding against the current code and only fix it if needed.
In `@commit-normalize/SKILL.md` around lines 15 - 23, Update the canonical format
in the "Rewrite commit messages..." section of SKILL.md so it allows scope-less
and breaking-change variants instead of requiring only "type(scope): subject";
replace the single example "type(scope): subject" with the accepted variants
"type: subject", "type(scope): subject", "type!: subject", and "type(scope)!:
subject" (keeping the optional body and footer lines unchanged) so the
documented canonical format matches the valid outputs and examples elsewhere.
```
</details>
<!-- fingerprinting:phantom:triton:grasshopper -->
<!-- This is an auto-generated comment by CodeRabbit -->
| | Informal Message | Normalized | | ||
| |-----------------|------------| | ||
| | `updated README` | `docs(readme): update README` | | ||
| | `fixed bug` / `bugfix` | `fix: resolve [describe the actual bug]` | | ||
| | `WIP` / `work in progress` | `wip: [describe what's in progress]` — or better, squash before merge | |
There was a problem hiding this comment.
Don't normalize WIP into a non-supported wip type.
The pattern table currently rewrites WIP to wip: ..., but wip is not in the allowed type list above and is not part of the Conventional Commits types this skill claims to enforce. That would make the normalizer produce output that violates its own rules.
Proposed doc fix
-| `WIP` / `work in progress` | `wip: [describe what's in progress]` — or better, squash before merge |
+| `WIP` / `work in progress` | Prefer not to create the commit yet; if it must exist, use the real type, e.g. `feat: ...`, `fix: ...`, or `refactor: ...` |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | Informal Message | Normalized | | |
| |-----------------|------------| | |
| | `updated README` | `docs(readme): update README` | | |
| | `fixed bug` / `bugfix` | `fix: resolve [describe the actual bug]` | | |
| | `WIP` / `work in progress` | `wip: [describe what's in progress]` — or better, squash before merge | | |
| | Informal Message | Normalized | | |
| |-----------------|------------| | |
| | `updated README` | `docs(readme): update README` | | |
| | `fixed bug` / `bugfix` | `fix: resolve [describe the actual bug]` | | |
| | `WIP` / `work in progress` | Prefer not to create the commit yet; if it must exist, use the real type, e.g. `feat: ...`, `fix: ...`, or `refactor: ...` | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@commit-normalize/SKILL.md` around lines 96 - 100, The table entry that
rewrites "WIP / work in progress" to `wip: [describe what's in progress]`
conflicts with the allowed Conventional Commit types; update the SKILL.md table
so WIP is not normalized to a non-supported `wip` type—either remove that row or
change its mapping to an allowed type (e.g., map to `chore:`) or explicitly
state to keep "WIP" unchanged and recommend squashing before merge; edit the row
that currently reads `WIP / work in progress` → `wip: [describe what's in
progress]` and ensure consistency with the allowed type list above.
Summary
commit-normalizeagent skill that rewrites informal/inconsistent commit messages to Conventional Commits formatTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Automated by nightshift