name: commit-messages
description: |
Triggers: messages, conventional-commits, git, changelog, commit
Generate conventional commit messages from staged changes with correct type/scope.
Triggers: commit message, conventional commit, git commit
Use when: generating commit messages in conventional commits format
DO NOT use when: full PR preparation - use pr-prep instead.
category: artifact-generation
tags: [git, commit, conventional-commits, changelog]
tools: [Bash, Write, TodoWrite]
complexity: low
estimated_tokens: 600
dependencies:
- sanctum:shared
- sanctum:git-workspace-review
Conventional Commit Workflow
When to Use
Use this skill to write a commit message for staged changes.
As a prerequisite, run Skill(sanctum:git-workspace-review) so the repository path, status, and diffs are already captured. If that skill reveals no staged changes, stage the desired files before continuing.
Required Steps
- Validate code quality (REQUIRED BEFORE DRAFTING)
- Run linting and formatting checks:
make format && make lint
- If errors are found, FIX THEM before proceeding
- NEVER use
git commit --no-verify or -n - pre-commit hooks exist to maintain quality
- If hooks fail, the code is not ready to commit
- Classify the change
- Choose the correct type:
feat, fix, docs, refactor, test, chore, style, perf, or ci.
- Select a concise scope (directory/module or
core, cli, etc.). The scope is optional but preferred.
- Decide if the change is breaking. If so, plan a
BREAKING CHANGE: footer.
- Draft the message
- Subject:
<type>(<scope>): <imperative summary> (scope optional, ≤50 characters).
- Body: Wrap at 72 characters per line, explain the "what" and "why", and list key bullets if useful.
- Footer: Add
BREAKING CHANGE: … or issue references if needed.
- Write the output
- The prompt passes a destination path (e.g.,
{0|./commit_msg.txt}) - always use a relative path in cwd, never an absolute path.
- Overwrite the file with only the final commit message—no commentary.
- Preview
- Display the file path and contents (
cat <file> or sed -n '1,120p' <file>) for confirmation.
Guardrails
We maintain strict quality gates by forbidding the use of git commit --no-verify or the -n flag. Pre-commit hooks are enforced to maintain code quality, and any reported issues must be fixed rather than bypassed. Commit messages should not include AI attribution lines or filler phrases such as "leverage" or "seamless," which are common markers of AI-generated text. Messages must remain plain text without emojis and be written in a human voice, using present-tense imperative style for the subject line. For non-trivial changes involving multiple files or complex logic, a multi-line body is required to explain the technical rationale.
Integration Notes
- Combine with
Skill(imbue:catchup) or /git-catchup when you need additional context before drafting.
- If unsure about the type or scope, rerun the diff commands or consult the specification or plan before finalizing.
Troubleshooting
Common Issues
If pre-commit hooks fail, you must address the specific errors identified by the hooks instead of using bypass flags. For linting errors, use make format to resolve formatting issues and make lint to identify logic or style violations. All detected issues should be fixed before you attempt to commit again. In the event of a merge conflict, use git merge --abort to return to a clean state and then resolve the conflicts manually. A rejected commit typically provides output from a failed quality gate; analyze this output and apply the necessary fixes before retrying.
1---2name: commit-messages-43description: Use this skill to write a commit message for staged changes.4---5
6---
7name: commit-messages
8description: |
9
10Triggers: messages, conventional-commits, git, changelog, commit
11 Generate conventional commit messages from staged changes with correct type/scope.
12
13 Triggers: commit message, conventional commit, git commit
14 Use when: generating commit messages in conventional commits format
15 DO NOT use when: full PR preparation - use pr-prep instead.
16category: artifact-generation
17tags: [git, commit, conventional-commits, changelog]
18tools: [Bash, Write, TodoWrite]
19complexity: low
20estimated_tokens: 600
21dependencies:
22 - sanctum:shared
23 - sanctum:git-workspace-review
24---
25
26# Conventional Commit Workflow
27
28## When to Use
29Use this skill to write a commit message for staged changes.
30As a prerequisite, run `Skill(sanctum:git-workspace-review)` so the repository path, status, and diffs are already captured. If that skill reveals no staged changes, stage the desired files before continuing.
31
32## Required Steps
331. **Validate code quality (REQUIRED BEFORE DRAFTING)**
34 - Run linting and formatting checks: `make format && make lint`
35 - If errors are found, FIX THEM before proceeding
36 - **NEVER use `git commit --no-verify` or `-n`** - pre-commit hooks exist to maintain quality
37 - If hooks fail, the code is not ready to commit
382. **Classify the change**
39 - Choose the correct type: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `style`, `perf`, or `ci`.
40 - Select a concise scope (directory/module or `core`, `cli`, etc.). The scope is optional but preferred.
41 - Decide if the change is breaking. If so, plan a `BREAKING CHANGE:` footer.
423. **Draft the message**
43 - Subject: `<type>(<scope>): <imperative summary>` (scope optional, ≤50 characters).
44 - Body: Wrap at 72 characters per line, explain the "what" and "why", and list key bullets if useful.
45 - Footer: Add `BREAKING CHANGE: …` or issue references if needed.
464. **Write the output**
47 - The prompt passes a destination path (e.g., `{0|./commit_msg.txt}`) - always use a relative path in cwd, never an absolute path.
48 - Overwrite the file with only the final commit message—no commentary.
495. **Preview**
50 - Display the file path and contents (`cat <file>` or `sed -n '1,120p' <file>`) for confirmation.
51
52## Guardrails
53
54We maintain strict quality gates by forbidding the use of `git commit --no-verify` or the `-n` flag. Pre-commit hooks are enforced to maintain code quality, and any reported issues must be fixed rather than bypassed. Commit messages should not include AI attribution lines or filler phrases such as "leverage" or "seamless," which are common markers of AI-generated text. Messages must remain plain text without emojis and be written in a human voice, using present-tense imperative style for the subject line. For non-trivial changes involving multiple files or complex logic, a multi-line body is required to explain the technical rationale.
55
56## Integration Notes
57- Combine with `Skill(imbue:catchup)` or `/git-catchup` when you need additional context before drafting.
58- If unsure about the type or scope, rerun the diff commands or consult the specification or plan before finalizing.
59
60## Troubleshooting
61
62### Common Issues
63
64If pre-commit hooks fail, you must address the specific errors identified by the hooks instead of using bypass flags. For linting errors, use `make format` to resolve formatting issues and `make lint` to identify logic or style violations. All detected issues should be fixed before you attempt to commit again. In the event of a merge conflict, use `git merge --abort` to return to a clean state and then resolve the conflicts manually. A rejected commit typically provides output from a failed quality gate; analyze this output and apply the necessary fixes before retrying.