# Writing Commit Messages

> Writes a git commit message for staged changes with a 50/72 subject and body, a Conventional Commits type, footers, and issue citations, keeping any subject, type, or body line the caller fixes byte for byte. Use when the user says "write a commit message", or when the user explicitly asks for a commit message. Never infer from staged changes or a request to commit.

- Skill: `bostonaholic/writing-commit-messages` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx get-skill add bostonaholic/writing-commit-messages`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bostonaholic/writing-commit-messages/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: bostonaholic (https://skillmd.com/u/bostonaholic)
- Updated: 2026-11-16
- Page: https://skillmd.com/skills/bostonaholic/writing-commit-messages

---


# Writing commit messages

- Read the staged diff (`git diff --cached`) and the recent subjects
  (`git log --oneline -10`) before you write.
- A caller can fix the subject, the type, or a body line, such as a plan
  citation. Use each fixed part byte for byte, even when it breaks a rule
  below, and apply the rules only to the parts you write.
- Write the message per [commit messages](references/messages.md), and the
  prose per the [writing standards](shared/writing.md).
- When asked to commit, write the message to a file with the file-writing
  tool, then run `git commit -F <message-file>`, never a bare `git commit`.
  Never run `git add -p` or `git add -i`: they open a prompt.
- Report the full message.

