# Commit Message Writer

> Generates conventional commit messages from staged git diffs. Activates when the user requests a commit message and produces type(scope) subject format.

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

---


# Commit Message Writer

Generate a commit message for the currently staged changes.

## Instructions

1. Read the staged diff using `git diff --staged`
2. Analyze the changes to determine:
   - The type (feat, fix, docs, refactor, test, chore, ci, style)
   - The scope (affected module or component)
   - A concise subject line (under 72 characters)
3. Output the commit message in conventional commit format

## Format

```text
type(scope): subject line

Optional body explaining the motivation for the change.
```

## Examples

Input: A diff showing a new function added to `auth.ts`
Output: `feat(auth): add token refresh endpoint`

Input: A diff fixing a typo in `README.md`
Output: `docs(readme): fix installation instructions typo`

