commitsmith
Writes git commit messages in a strict, scoped one-line style such as "fix(order): correct tax calculation for international shipments". Use whenever the user asks for a commit message, wants to commit changes, or asks to review, rewrite or squash commit messages, even if they on
Install
npx skills add https://github.com/MehranQadirian/skills/tree/main/git/commitsmith
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install mehranqadirian-skills@llmmart
git clone https://github.com/MehranQadirian/skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole mehranqadirian/skills collection as a plugin from our marketplace. Git is the plain clone.
README
Commitsmith
A Claude skill that writes clean, scoped, one-line git commit messages from your diff.
fix(order): correct tax calculation for international shipments
perf(inventory): reduce database query time for stock lookup
refactor(user): extract password hashing logic into separate utility
test(notification): add integration tests for email delivery service
chore(deploy): update Kubernetes config for staging environment
feat(cart): apply discount code before final price calculation
fix(gateway): handle timeout errors gracefully on checkout route
Format
type(scope): description
- type:
featfixperfrefactortestchore(plusdocsbuildcirevert) - scope: one lowercase domain word, like
cartorgateway - description: imperative, lowercase, specific, no period, 72 characters max
What it does
- Reads your staged diff and picks the right type and scope
- Reuses scope names already found in your git history
- Reviews or rewrites existing messages to match the style
- Flags commits that mix unrelated changes
- Commits only when you ask, never pushes on its own
Try it
Write a commit message for my staged changes.
Rewrite these commit messages to match our style.
Install
Claude.ai: zip this folder, then go to Settings > Capabilities > Skills > Upload.
Claude Code:
cp -r git/commitsmith ~/.claude/skills/
Structure
commitsmith/
├── SKILL.md skill instructions for Claude
└── references/examples.md good and bad examples
Skill manifest
commitsmith
One consistent commit style: type(scope): description
fix(order): correct tax calculation for international shipments
perf(inventory): reduce database query time for stock lookup
refactor(user): extract password hashing logic into separate utility
test(notification): add integration tests for email delivery service
chore(deploy): update Kubernetes config for staging environment
feat(cart): apply discount code before final price calculation
fix(gateway): handle timeout errors gracefully on checkout route
Workflow
- Read the change. Run
git diff --staged(if empty,git diff). Also rungit status --shortto see which files are involved. - Pick the type from the table below.
- Pick the scope: the one domain area the change belongs to.
- Write the description: what the change does, in the imperative mood.
- Check the rules below, then output the message in a code block.
- If the user asked to commit, run
git commit -m "<message>". Never push unless asked.
Types
| Type | Use for |
|---|---|
feat |
New behavior or capability for users |
fix |
Bug fix |
perf |
Performance improvement with no behavior change |
refactor |
Code restructure with no behavior change |
test |
Adding or updating tests only |
chore |
Config, tooling, dependencies, deployment, maintenance |
docs |
Documentation only |
build |
Build system or packaging |
ci |
CI pipeline changes |
revert |
Reverting an earlier commit |
If two types fit, choose the one that describes the main intent. A bug fix that also adds a test is fix.
Scope
- Required. One lowercase word naming the domain:
order,inventory,user,notification,deploy,cart,gateway. - Prefer the business area over a file or folder name (
cart, notcart-service.ts). - Use the singular form and no spaces. Join two words with a hyphen only when unavoidable (
user-profile). - Follow the scope names already used in
git log --oneline -20when they exist. - If a change spans several areas, use the area where the main behavior changes. If it truly has no single owner, split it into separate commits.
Description rules
- Imperative mood, lowercase first letter:
add,fix,handle,reduce,extract,update,apply,correct. - Be specific: say what and where, not "update stuff" or "fix bug".
- No period at the end.
- Whole first line at most 72 characters.
- No ticket numbers, emojis, author names or file names in the first line.
- Describe the change itself, not the process ("fix typo" is fine, "address review comments" is not).
Body (optional)
Add a body only when the reason is not obvious from the diff. Leave one blank line after the first line, wrap at 72 characters, and explain why, not what. Breaking changes go in a final BREAKING CHANGE: line.
Reviewing or rewriting messages
When given existing messages, show each one as before -> after and keep only the changes that fix a rule. If a commit mixes unrelated changes, say so and suggest how to split it.
Do not
- Do not write multiple lines for a simple change.
- Do not invent a scope that is not in the project when a matching one already exists.
- Do not use past tense (
fixed) or gerunds (fixing). - Do not commit or push without the user asking for it.
See references/examples.md for more good and bad examples.
Files (skills)
-
references
-
examples.md 1.6 KB
Loading…
-
-
README.md 1.6 KB
# Commitsmith A [Claude skill](../../README.md) that writes clean, scoped, one-line git commit messages from your diff. ``` fix(order): correct tax calculation for international shipments perf(inventory): reduce database query time for stock lookup refactor(user): extract password hashing logic into separate utility test(notification): add integration tests for email delivery service chore(deploy): update Kubernetes config for staging environment feat(cart): apply discount code before final price calculation fix(gateway): handle timeout errors gracefully on checkout route ``` ## Format ``` type(scope): description ``` - **type**: `feat` `fix` `perf` `refactor` `test` `chore` (plus `docs` `build` `ci` `revert`) - **scope**: one lowercase domain word, like `cart` or `gateway` - **description**: imperative, lowercase, specific, no period, 72 characters max ## What it does - Reads your staged diff and picks the right type and scope - Reuses scope names already found in your git history - Reviews or rewrites existing messages to match the style - Flags commits that mix unrelated changes - Commits only when you ask, never pushes on its own ## Try it > Write a commit message for my staged changes. > Rewrite these commit messages to match our style. ## Install **Claude.ai:** zip this folder, then go to Settings > Capabilities > Skills > Upload. **Claude Code:** ```bash cp -r git/commitsmith ~/.claude/skills/ ``` ## Structure ``` commitsmith/ ├── SKILL.md skill instructions for Claude └── references/examples.md good and bad examples ``` -
SKILL.md 3.8 KB
--- name: commitsmith description: Writes git commit messages in a strict, scoped one-line style such as "fix(order): correct tax calculation for international shipments". Use whenever the user asks for a commit message, wants to commit changes, or asks to review, rewrite or squash commit messages, even if they only say "commit this" or "write a commit". Reads the staged diff to pick the right type, scope and wording. --- # commitsmith One consistent commit style: `type(scope): description` ``` fix(order): correct tax calculation for international shipments perf(inventory): reduce database query time for stock lookup refactor(user): extract password hashing logic into separate utility test(notification): add integration tests for email delivery service chore(deploy): update Kubernetes config for staging environment feat(cart): apply discount code before final price calculation fix(gateway): handle timeout errors gracefully on checkout route ``` ## Workflow 1. **Read the change.** Run `git diff --staged` (if empty, `git diff`). Also run `git status --short` to see which files are involved. 2. **Pick the type** from the table below. 3. **Pick the scope**: the one domain area the change belongs to. 4. **Write the description**: what the change does, in the imperative mood. 5. **Check the rules** below, then output the message in a code block. 6. If the user asked to commit, run `git commit -m "<message>"`. Never push unless asked. ## Types | Type | Use for | |---|---| | `feat` | New behavior or capability for users | | `fix` | Bug fix | | `perf` | Performance improvement with no behavior change | | `refactor` | Code restructure with no behavior change | | `test` | Adding or updating tests only | | `chore` | Config, tooling, dependencies, deployment, maintenance | | `docs` | Documentation only | | `build` | Build system or packaging | | `ci` | CI pipeline changes | | `revert` | Reverting an earlier commit | If two types fit, choose the one that describes the main intent. A bug fix that also adds a test is `fix`. ## Scope - Required. One lowercase word naming the domain: `order`, `inventory`, `user`, `notification`, `deploy`, `cart`, `gateway`. - Prefer the business area over a file or folder name (`cart`, not `cart-service.ts`). - Use the singular form and no spaces. Join two words with a hyphen only when unavoidable (`user-profile`). - Follow the scope names already used in `git log --oneline -20` when they exist. - If a change spans several areas, use the area where the main behavior changes. If it truly has no single owner, split it into separate commits. ## Description rules - Imperative mood, lowercase first letter: `add`, `fix`, `handle`, `reduce`, `extract`, `update`, `apply`, `correct`. - Be specific: say what and where, not "update stuff" or "fix bug". - No period at the end. - Whole first line at most 72 characters. - No ticket numbers, emojis, author names or file names in the first line. - Describe the change itself, not the process ("fix typo" is fine, "address review comments" is not). ## Body (optional) Add a body only when the reason is not obvious from the diff. Leave one blank line after the first line, wrap at 72 characters, and explain **why**, not what. Breaking changes go in a final `BREAKING CHANGE:` line. ## Reviewing or rewriting messages When given existing messages, show each one as `before -> after` and keep only the changes that fix a rule. If a commit mixes unrelated changes, say so and suggest how to split it. ## Do not - Do not write multiple lines for a simple change. - Do not invent a scope that is not in the project when a matching one already exists. - Do not use past tense (`fixed`) or gerunds (`fixing`). - Do not commit or push without the user asking for it. See `references/examples.md` for more good and bad examples.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.