commit-suggest
Inspect the current working-tree changes and propose a commit message that
follows the commit message rules embedded below. This skill suggests only —
it never runs git commit. Present the message and let the user decide.
Steps
Gather the changes. Run these to see what is actually changing:
git status --short
git diff HEAD --stat
git diff HEAD
git diff HEAD shows staged + unstaged together. If the diff is very large,
fall back to git diff HEAD --stat plus reading the most relevant hunks —
the message must reflect the real change, not a guess from filenames.
Derive the ticket ID from the branch name (branches look like
feature/PROJ-47-...):
git rev-parse --abbrev-ref HEAD | grep -oE '[A-Z]+-[0-9]+' | head -1
Use it as the [TICKET-ID] prefix. If none is found, omit the prefix and
note that no ticket ID was detected.
Compose the message following the rules in the section below.
Present the suggestion in a fenced ```text block so the user can copy it.
If the staged and unstaged sets differ meaningfully, mention which files are
staged vs. not, since git commit without -a would only capture the staged
ones. Do not commit.
Notes
- End the message with the required co-author trailer only if the user asks to
actually commit — suggestions stay clean.
- This repo's convention puts the ticket ID in
[BRACKETS]; recent history uses
prefixes like [PROJ-24], [PROJ-101].
Commit Message Rules
Recommended Format
[TICKET-42] Write header in imperative form without period
After a blank line, optionally add more details about the change.
Explain the "why" here, while the header focuses on the "what".
- Bullet points can be used
- Add technical clarifications when needed
- Keep lines around 80 characters
Header
- Always include the ticket ID in
[BRACKETS] if available (e.g. [ABC-1234],
[PROJ-26], [XYZ-10592]).
- Use imperative form — start with a present-tense verb:
Add, Fix,
Refactor, Update, Remove, Migrate. Never use past tense (Fixed,
Fixes).
- No trailing period.
- Keep it short and focused on the what.
Body
Explain the why: the issue it solves, business/technical motivation, or
context that future developers need.
Do not restate the diff or describe line-by-line what changed.
For bug fixes, use **Issue** / **Solution** sections:
[XYZ-10592] Enhance light button delay
**Issue**
When the user clicks on the light button, it takes several seconds
(from 2 to 15 seconds) to reflect the new UI state. This creates
ambiguity and may cause the user to repeatedly press the button,
leading to inconsistent backend state updates.
**Solution**
Update the UI state immediately before sending the backend request.
If the request succeeds, keep the current state. Otherwise, revert
to the previous state.
For new features, use a **Changes** section with bullet points:
[ABC-1234] Display a banner indicating the network status
**Changes**
- Add an observer to detect network status
- Display a corresponding banner depending on connectivity state
Feature commits with obvious scope may use a concise title-only message.
What to Avoid
- Vague or meta messages:
fix previous commit, apply PR comments,
minor fixes, WIP. Instead, amend before pushing or describe the actual
change.
- Describing how the code works (that belongs in code comments).
- More than one blank line between sections.
Quick Checklist
1---2name: commit-suggest3description: Suggest a commit message for the current changes following this project's commit message guide. Use when asked to suggest, draft, propose, or write a commit message for the staged/unstaged changes.4---56# commit-suggest78Inspect the current working-tree changes and propose a commit message that9follows the commit message rules embedded below. This skill **suggests only** —10it never runs `git commit`. Present the message and let the user decide.1112## Steps13141. **Gather the changes.** Run these to see what is actually changing:1516 ```bash17 git status --short18 git diff HEAD --stat19 git diff HEAD20 ```2122 `git diff HEAD` shows staged + unstaged together. If the diff is very large,23 fall back to `git diff HEAD --stat` plus reading the most relevant hunks —24 the message must reflect the *real* change, not a guess from filenames.25262. **Derive the ticket ID** from the branch name (branches look like27 `feature/PROJ-47-...`):2829 ```bash30 git rev-parse --abbrev-ref HEAD | grep -oE '[A-Z]+-[0-9]+' | head -131 ```3233 Use it as the `[TICKET-ID]` prefix. If none is found, omit the prefix and34 note that no ticket ID was detected.35363. **Compose the message** following the rules in the section below.37384. **Present the suggestion** in a fenced ```text block so the user can copy it.39 If the staged and unstaged sets differ meaningfully, mention which files are40 staged vs. not, since `git commit` without `-a` would only capture the staged41 ones. Do not commit.4243## Notes44- End the message with the required co-author trailer only if the user asks to45 actually commit — suggestions stay clean.46- This repo's convention puts the ticket ID in `[BRACKETS]`; recent history uses47 prefixes like `[PROJ-24]`, `[PROJ-101]`.4849---5051## Commit Message Rules5253### Recommended Format5455```text56[TICKET-42] Write header in imperative form without period5758After a blank line, optionally add more details about the change.59Explain the "why" here, while the header focuses on the "what".6061- Bullet points can be used62- Add technical clarifications when needed63- Keep lines around 80 characters64```6566### Header6768- Always include the ticket ID in `[BRACKETS]` if available (e.g. `[ABC-1234]`,69 `[PROJ-26]`, `[XYZ-10592]`).70- Use **imperative form** — start with a present-tense verb: `Add`, `Fix`,71 `Refactor`, `Update`, `Remove`, `Migrate`. Never use past tense (`Fixed`,72 `Fixes`).73- No trailing period.74- Keep it short and focused on the *what*.7576### Body7778- Explain the **why**: the issue it solves, business/technical motivation, or79 context that future developers need.80- Do **not** restate the diff or describe line-by-line what changed.81- For **bug fixes**, use `**Issue**` / `**Solution**` sections:8283 ```text84 [XYZ-10592] Enhance light button delay8586 **Issue**87 When the user clicks on the light button, it takes several seconds88 (from 2 to 15 seconds) to reflect the new UI state. This creates89 ambiguity and may cause the user to repeatedly press the button,90 leading to inconsistent backend state updates.9192 **Solution**93 Update the UI state immediately before sending the backend request.94 If the request succeeds, keep the current state. Otherwise, revert95 to the previous state.96 ```9798- For **new features**, use a `**Changes**` section with bullet points:99100 ```text101 [ABC-1234] Display a banner indicating the network status102103 **Changes**104 - Add an observer to detect network status105 - Display a corresponding banner depending on connectivity state106 ```107108- Feature commits with obvious scope may use a concise title-only message.109110### What to Avoid111112- Vague or meta messages: `fix previous commit`, `apply PR comments`,113 `minor fixes`, `WIP`. Instead, amend before pushing or describe the actual114 change.115- Describing *how* the code works (that belongs in code comments).116- More than one blank line between sections.117118### Quick Checklist119120- [ ] Ticket ID included (if available)121- [ ] Imperative form verb122- [ ] Header clearly states the technical change, no trailing period123- [ ] Body explains the *why*, not the *what*124- [ ] No vague/meta descriptions125- [ ] Concise but informative