Skip to content
Back to skills

Commit Message

ASecurity

Generate a Conventional Commits-compliant commit message for the currently staged changes. Use whenever the user asks to "commit", "write a commit message", or finalize staged git work — even without saying "conventional".

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

Works with

  • api

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add dmrtnv/stepwright --skill commit-message --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit Message?

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

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

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
description: Generate a Conventional Commits-compliant commit message for the currently staged changes. Use whenever the user asks to "commit", "write a commit message", or finalize staged git work — even without saying "conventional".
---

# Conventional Commit Generator

## Workflow

1. Run `git diff --cached --stat`. If nothing is staged: in commit mode, report "nothing staged" in one line and
   continue the task; in message mode, tell the user and stop.
2. Read `git diff --cached` (chunk if large).
3. Pick the mode:
   - **Commit mode** — the user already told you to commit (a task or plan that commits as it goes, or "commit it"). Run the commit yourself, then keep working. See **Commit mode** below.
   - **Message mode** — anything else. Output the message only, and do **not** run the commit. See **Output (message mode)** below.

## Format

```
<type>: <Description>

<body>

<footer>
```

**Types:** `feat` `fix` `docs` `style` `refactor` `perf` `test` `build` `ci` `chore` `revert`

**No scope**, even in a monorepo: `feat: …`, never `feat(web): …`.

**Description:** imperative, **capitalized first letter**, no period, ~72 chars, concrete.

**Breaking changes:** append `!` after type and add `BREAKING CHANGE: ...` footer.

**Body/footers:** optional. Add body only when the *why* isn't obvious. Blank line before body/footers.

## Rules

- One logical change per commit. If the diff mixes unrelated changes: in commit mode, split it into separate commits
  yourself (unstage, then stage each change by path or `git add -p`), then continue; in message mode, stop and tell the
  user to split with `git add -p` — don't produce a message.
- Be specific — no "Update stuff", "Misc changes".
- Always flag breaking changes (removed exports, changed signatures, altered API/DB shape).
- Never mention Claude co-authorship

## Commit mode

Commit with the message on stdin, with no trailers:

```
git commit -F - <<'EOF'
<message>
EOF
```

If a hook rejects it, fix the cause and commit again. Report the commit in one line (short hash + subject), then continue the task in the same turn. Never push.

## Output (message mode)

Output **only** a single fenced code block containing the commit message itself — no `git commit`, no language tag, no preamble, no explanation, no trailing text.

Single-line:

````
```
feat: Add password reset endpoint
```
````

Multi-line:

````
```
fix: Return 409 instead of 500 on duplicate email

Catch the unique constraint violation and map it to a typed
ConflictError instead of letting it bubble up.
```
````

That's the entire response. Nothing before, nothing after.

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.