# Commit Message

> Write conventional commit messages from git diffs or change summaries. Use when committing, drafting commit messages, or summarizing staged changes. Do NOT use for PR bodies or release notes.

- Skill: `bjg4/commit-message-2` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add bjg4/commit-message-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bjg4/commit-message-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: bjg4 (https://skillmd.com/u/bjg4)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/bjg4/commit-message-2

---


# Commit Message

## Quick start

From diff or summary, output:
```
<type>(<scope>): <subject ≤72 chars>

<body: what and why, wrap at 72>
```

## Conventional types

| Type | When |
|------|------|
| feat | New capability |
| fix | Bug fix |
| docs | Docs only |
| refactor | No behavior change |

Pick the closest type; omit scope if unclear.

## Error handling

No diff? Request `git diff --staged` or a one-line change summary.

## Example

```
feat(auth): add JWT login endpoint

Add POST /login issuing tokens; validate credentials against user store.
```

