Slash command
/commit
Stages and commits with a clean conventional-commit message generated from the actual diff — no "update files" commits.
Install to
~/.claude/commands/commit.md descriptionReview the staged + unstaged changes and create a well-formed commit.
Look at the current changes and create a commit:
- Run
git statusandgit diff(staged and unstaged) to see what changed. - Run
git log --oneline -10to match this repo’s message style. - Stage the relevant files by name (never
git add -Ablindly — skip.env, build artifacts, anything that looks like a secret). - Write a concise message: a
type(scope): summarysubject line under ~70 chars, then a body explaining the WHY if it isn’t obvious. - Commit. Do NOT push unless I ask.
If there are no changes, say so — don’t create an empty commit.
---
description: Review the staged + unstaged changes and create a well-formed commit.
---
Look at the current changes and create a commit:
1. Run `git status` and `git diff` (staged and unstaged) to see what changed.
2. Run `git log --oneline -10` to match this repo's message style.
3. Stage the relevant files by name (never `git add -A` blindly — skip
`.env`, build artifacts, anything that looks like a secret).
4. Write a concise message: a `type(scope): summary` subject line under
~70 chars, then a body explaining the WHY if it isn't obvious.
5. Commit. Do NOT push unless I ask.
If there are no changes, say so — don't create an empty commit. How to install
- Copy the code and save it to
~/.claude/commands/commit.md(user) or.claude/commands/commit.md(project). - Commands hot-reload — it's available in the current session immediately.
- Run it by typing
/commitin the prompt. - Verify: type
/and look for it in the command list.