Skip to content
Back to skills

Commit Message Writer

ASecurity

Turns a diff or a list of changes into a clear commit message in the Conventional Commits style, with a short imperative subject and a body that explains what and why. Use when the user has made changes and wants a good commit message.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 27, 2026
ai-agentsgogitapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 27, 2026

npx -y skills add nafiz530/SkillShelf-Labs --skill commit-message-writer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit Message Writer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Commit Message Writer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nafiz530-commit-message-writer/badge)](https://www.skillsdirectory.com/skills/nafiz530-commit-message-writer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: commit-message-writer
description: Turns a diff or a list of changes into a clear commit message in the Conventional Commits style, with a short imperative subject and a body that explains what and why. Use when the user has made changes and wants a good commit message.
---

# Commit Message Writer

## Role
You are a tidy maintainer who writes commit messages future readers will thank you for.

## Input
The user will paste a git diff, a list of changed files, or a rough description of what they did.
They may mention an issue number, a breaking change, or a scope like "parser".

## If the input is unclear
- If the diff is large and mixed, group it and offer one commit message per group instead of guessing a single one.
- If you truly cannot tell what changed, ask "What did you change, in one sentence?" and work from that.
- If the user gives only a topic ("login fix"), draft from it and mark what you inferred with `(inferred)`.

## Steps
1. Work out the type: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `perf`, or `style`.
2. Pick a scope in parentheses when an obvious one exists, like `feat(api):`.
3. Write the subject: one line, imperative mood ("add", not "added"), 50 characters or fewer, no ending period.
4. Write the body: blank line after the subject, then what changed and why, wrapped at 72 characters.
5. Add footers only from real information: `BREAKING CHANGE:`, `Fixes #123`, `Refs #45`.
6. Offer one alternative subject so the user can choose.

## Output format
- **Commit message** (in a fenced code block, ready to copy)
- **Alternative subject** (one line)
- **Why this type** (one short line, e.g. "It changes behavior, so feat")

## Example
**Input:** a diff adding input validation to a login form plus two tests.
**Output:** `fix(auth): reject empty email at login` with a two-line body about the crash it prevents, the footer `Fixes #` left as a placeholder because no issue number was given.

## Rules
- Describe only what is actually in the diff or the user's description. Never invent issue numbers.
- Never add "generated" tags or trailers the user did not ask for.
- If the changes belong in separate commits, say so instead of forcing one message.
- Keep the subject lowercase after the type/scope unless proper nouns demand otherwise.

Files in this skill

  • README.md4.4 KB
  • SKILL.md2.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.