Skip to content
Development
Command

/commit-msg

Draft a Conventional Commit message for staged changes. Analyzes diffs, classifies change type, and formats scope/body.

From plugin
claude-night-market
325163 skills59 agents163 commands1 MCP
Install
$ npx -y skills add athola/claude-night-market --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/commit-msg

Context preview

What this command does when you run it.

Draft a Conventional Commit message for staged changes. Analyzes diffs, classifies change type, and formats scope/body.

Command definition

commit-msg.md
description: Draft a Conventional Commit message for staged changes. Analyzes diffs, classifies change type, and formats scope/body.
model_hint: fast

Draft a Conventional Commit Message

Run these git commands to gather context, then draft the message.

Steps

1. **Gather context** (run in parallel):

  • `git status -sb`
  • `git diff --cached --stat`
  • `git diff --cached`
  • `git log --oneline -5`

2. **If nothing is staged**, tell the user and stop.

3. **Classify the change**: Pick a type from `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `style`, `perf`, `ci`. Pick an optional scope from the changed directory or module.

4. **Draft the message** in this format:

   <type>(<scope>): <imperative summary, ≤50 chars>

   <body: what and why, wrapped at 72 chars>

   <footer: BREAKING CHANGE or issue refs, if any>

5. **Slop check**: the message must NOT contain: leverage, utilize, seamless, comprehensive, robust, facilitate, streamline, delve, multifaceted, pivotal, intricate, optimize, nuanced, furthermore, moreover, revolutionize, elevate, unlock, "it's worth noting", "at its core", "in essence", "a testament to"

If found, replace with plain words (use, smooth, complete, solid, enable, simplify, improve, explore, varied, key, detailed).

5a. **Character-level slop check**: load `shared/output-hygiene.md` (Contract A) and strip these from the message. Inline fallback if that module is absent:

  • `"+"` used as a prose conjunction becomes `and`

(`parser + validator` becomes `parser and validator`). Keep `+` in version strings, math, and code.

  • em-dash `—` becomes a colon, period, comma, or a rewrite.
  • `--` used as prose punctuation becomes a colon or a rewrite.
  • arrows `->` and `→` used as connectors become `to` or `into`.
  • smart quotes `“ ” ‘ ’` become straight `"` and `'`.

5b. **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`, `remove smart quotes`, or similar. 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`.

6. **Write** the message to `./commit_msg.txt` and preview it.

Rules

  • **NEVER** use `git commit --no-verify` or `-n`.
  • Write for humans. "fix auth bug" beats "streamline authentication

optimization."

Read more
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

Get the whole plugin, auto-invoked
Stats
325
Stars
0
Views
35
Forks
Active
Maintenance
Python
Language
MIT
License
1d ago
Last commit
8mo ago
Created

Repo: athola/claude-night-market