Generating conventional commit messages from staged changes
When NOT To Use
Full PR preparation: use sanctum:pr-prep
Amending existing commits: use git directly
Steps
Gather context (run in parallel):
git status -sb
git diff --cached --stat
git diff --cached
git log --oneline -5
When sem is available (see leyline:sem-integration):
sem diff --staged --json for entity-level changes
If nothing is staged, tell the user and stop.
When sem output is available, use entity names
(function, class, method) in the commit subject and
body instead of parsing raw diff hunks. For example,
"add function validate_webhook_url" instead of
"add validation logic to notify.py".
Classify: Pick type (feat, fix, docs, refactor,
test, chore, style, perf, ci) and optional scope.
This is the only signal scripts/reconcile_discussions.py
accepts as proof a finding is done. It posts the resolution
comment and closes the discussion, so the board stops
carrying work that is already finished.
Only add it when this commit resolves the finding. Prose
that merely names a discussion is read as a mention and is
never written back. That distinction is load-bearing:
6b28aa1a says "posted 13 insights to discussions
#424-#436", which is the commit that opened those
discussions. A trailer there would have announced
"Addressed" on findings nobody had looked at yet.
Cite a discussion in the body for context as often as it
helps. Reserve the trailer for resolution.
Slop check: reject these words and replace with plain
alternatives:
Reject
Use instead
leverage, utilize
use
seamless
smooth
comprehensive
complete
robust
solid
facilitate
enable
streamline
simplify
optimize
improve
delve
explore
multifaceted
varied
pivotal
key
intricate
detailed
Also reject: "it's worth noting", "at its core",
"in essence", "a testament to"
4a. Character-level slop check: load shared/output-hygiene.md
(Contract A) and strip these markers. Inline fallback if that
module is absent:
Marker
Replace with
"+" as a prose conjunction
and (keep + in versions/code)
em-dash —
colon, period, comma, or rewrite
-- as prose punctuation
colon or rewrite
arrows -> / → as connectors
to / into
smart quotes “ ” ‘ ’
straight " and '
a , so tail after fact after fact
delete a consequence the reader can infer, else its own sentence
4b. Subject-matter check (Contract B): describe the change by its
reader-facing effect. Name neither the AI origin nor the specific
marker removed. Do NOT write remove AI slop, de-slop,
AI-generated content, AI phrasing, replace em-dashes, or
remove smart quotes. Test: if the subject only makes sense as "I
cleaned up AI output", rewrite it. For example docs: clarify the setup section, not style: replace em-dashes with colons.
Write to ./commit_msg.txt and preview.
Rules
NEVER use git commit --no-verify or -n
Write for humans, not to impress
If pre-commit hooks fail, fix the issues
This skill drafts a message, it does not commit. Whoever commits
confirms HEAD advanced (git rev-parse HEAD before and after)
before reporting the commit as landed. An auto-fixing hook aborts
the commit while printing a tail that reads like success, so hook
output is not evidence. See discussion #614.
Exit Criteria
commit_msg.txt written to the working directory containing
the drafted conventional commit message
Subject line follows <type>(<scope>): <summary> format and
is at most 50 characters
Slop word check passes: none of the banned words (leverage,
utilize, seamless, comprehensive, robust, etc.) appear in the
message
Character-level check passes: no em-dashes, no + as prose
conjunction, no smart quotes, no -> as prose connector
Body carries at most one , so consequence tail
(scripts/slop_score.py --audit lists each as so_connective)
If nothing is staged, skill halts immediately and reports
"nothing staged" without producing a commit message
1---2name: commit-messages-23description: Generates conventional commit messages from staged changes. Use when committing and needing a well-formatted message. For full PR prep, use pr-prep.4alwaysApply: false5category: artifact-generation6tags:7- git8- commit9- conventional-commits10tools: []11complexity: low12estimated_tokens: 35013metadata:14 source: https://skillmd.com/skills/athola/commit-messages-215---1617# Conventional Commit Workflow1819## When To Use2021- Generating conventional commit messages from staged changes2223## When NOT To Use2425- Full PR preparation: use sanctum:pr-prep26- Amending existing commits: use git directly2728## Steps29301. **Gather context** (run in parallel):31 - `git status -sb`32 - `git diff --cached --stat`33 - `git diff --cached`34 - `git log --oneline -5`35 - When sem is available (see `leyline:sem-integration`):36 `sem diff --staged --json` for entity-level changes3738 If nothing is staged, tell the user and stop.3940 When sem output is available, use entity names41 (function, class, method) in the commit subject and42 body instead of parsing raw diff hunks. For example,43 "add function validate_webhook_url" instead of44 "add validation logic to notify.py".45462. **Classify**: Pick type (`feat`, `fix`, `docs`, `refactor`,47 `test`, `chore`, `style`, `perf`, `ci`) and optional scope.48493. **Draft the message**:50 - **Subject**: `<type>(<scope>): <imperative summary>` (50 chars max)51 - **Body**: What and why, wrapped at 72 chars52 - **Footer**: BREAKING CHANGE, issue refs, and the53 discussion trailer below54553a. **Discussion trailer**: when the change resolves a finding56 from the Discussions board, add a trailer on its own line:5758 ```59 Addresses-Discussion: #65460 Addresses-Discussion: #604, #61061 ```6263 This is the only signal `scripts/reconcile_discussions.py`64 accepts as proof a finding is done. It posts the resolution65 comment and closes the discussion, so the board stops66 carrying work that is already finished.6768 **Only add it when this commit resolves the finding.** Prose69 that merely names a discussion is read as a mention and is70 never written back. That distinction is load-bearing:71 `6b28aa1a` says "posted 13 insights to discussions72 #424-#436", which is the commit that *opened* those73 discussions. A trailer there would have announced74 "Addressed" on findings nobody had looked at yet.7576 Cite a discussion in the body for context as often as it77 helps. Reserve the trailer for resolution.78794. **Slop check**: reject these words and replace with plain80 alternatives:8182 | Reject | Use instead |83 |--------|-------------|84 | leverage, utilize | use |85 | seamless | smooth |86 | comprehensive | complete |87 | robust | solid |88 | facilitate | enable |89 | streamline | simplify |90 | optimize | improve |91 | delve | explore |92 | multifaceted | varied |93 | pivotal | key |94 | intricate | detailed |9596 Also reject: "it's worth noting", "at its core",97 "in essence", "a testament to"98994a. **Character-level slop check**: load `shared/output-hygiene.md`100 (Contract A) and strip these markers. Inline fallback if that101 module is absent:102103 | Marker | Replace with |104 |--------|--------------|105 | `"+"` as a prose conjunction | `and` (keep `+` in versions/code) |106 | em-dash `—` | colon, period, comma, or rewrite |107 | `--` as prose punctuation | colon or rewrite |108 | arrows `->` / `→` as connectors | `to` / `into` |109 | smart quotes `“ ” ‘ ’` | straight `"` and `'` |110 | a `, so` tail after fact after fact | delete a consequence the reader can infer, else its own sentence |1111124b. **Subject-matter check** (Contract B): describe the change by its113 reader-facing effect. Name neither the AI origin nor the specific114 marker removed. Do NOT write `remove AI slop`, `de-slop`,115 `AI-generated content`, `AI phrasing`, `replace em-dashes`, or116 `remove smart quotes`. Test: if the subject only makes sense as "I117 cleaned up AI output", rewrite it. For example `docs: clarify the118 setup section`, not `style: replace em-dashes with colons`.1191205. **Write** to `./commit_msg.txt` and preview.121122## Rules123124- NEVER use `git commit --no-verify` or `-n`125- Write for humans, not to impress126- If pre-commit hooks fail, fix the issues127- This skill drafts a message, it does not commit. Whoever commits128 confirms HEAD advanced (`git rev-parse HEAD` before and after)129 before reporting the commit as landed. An auto-fixing hook aborts130 the commit while printing a tail that reads like success, so hook131 output is not evidence. See discussion #614.132133## Exit Criteria134135- [ ] `commit_msg.txt` written to the working directory containing136 the drafted conventional commit message137- [ ] Subject line follows `<type>(<scope>): <summary>` format and138 is at most 50 characters139- [ ] Slop word check passes: none of the banned words (leverage,140 utilize, seamless, comprehensive, robust, etc.) appear in the141 message142- [ ] Character-level check passes: no em-dashes, no `+` as prose143 conjunction, no smart quotes, no `->` as prose connector144- [ ] Body carries at most one `, so` consequence tail145 (`scripts/slop_score.py --audit` lists each as `so_connective`)146- [ ] If nothing is staged, skill halts immediately and reports147 "nothing staged" without producing a commit message
Run npx get-skill add athola/commit-messages-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Generates conventional commit messages from staged changes. Use when committing and needing a well-formatted message. For full PR prep, use pr-prep. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
athola (@athola) published this skill. Their other Agent Skills are listed on their SkillMD profile.