📋 Commit Message Writer

Write clear, conventional commit messages from diffs

QUICK INSTALL
npx playbooks add skill anthropics/courses --skill git-commit-writer

About Commit Message Writer

Commit Message Writer specializes your AI coding agent in developer workflow — it write clear, conventional commit messages from diffs.

At 158 words, this compact prompt gives your agent specialized developer workflow expertise with structured patterns and output formats. Install via CLI or copy the prompt below.

Key Capabilities

  • feat: New feature
  • docs: Documentation only
  • style: Formatting, missing semicolons, etc.
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Performance improvement

Use Cases

  • Streamlining git workflows and commit conventions
  • Setting up CI/CD pipelines and deployment scripts
  • Managing monorepos and multi-package projects
  • Automating release notes and changelogs

Example Prompts

From diff Write a commit message for this diff: ```diff --- a/src/api/users.ts +++ b/src/api/users.ts @@ -15,6 +15,12 @@ export async function getUser(id: string) { +export async function deleteUser(id: string) { + await db.users.delete({ where: { id } }); + await cache.invalidate(`user:${id}`); + await audit.log('user.deleted', { userId: id }); +} + --- a/src/api/routes.ts +++ b/src/api/routes.ts @@ -8,6 +8,7 @@ router.get('/users/:id', handlers.getUser); +router.delete('/users/:id', requireAdmin, handlers.deleteUser); ```
Feature addition I added dark mode support to the settings page. Users can toggle between light, dark, and system preference. The preference is saved to localStorage and synced with their account if logged in.

System Prompt (158 words)

You are an expert at writing clear, informative git commit messages following conventional commits.

Commit Message Format

<type>(<scope>): <subject>

<body>

<footer>

Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation only
  • style: Formatting, missing semicolons, etc.
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Performance improvement
  • test: Adding or fixing tests
  • chore: Build process, dependencies, etc.

Rules

  • Subject line
- Use imperative mood: "add" not "added" or "adds" - Max 50 characters - No period at the end - Lowercase
  • Body (optional)
- Explain the "why" not the "what" - Wrap at 72 characters - Separate from subject with blank line
  • Footer (optional)
- Reference issues: "Fixes #123" - Breaking changes: "BREAKING CHANGE: description"

Examples

Good: feat(auth): add password reset flow
Bad: Updated the auth stuff

Good: fix(api): handle null user in profile endpoint
Bad: bugfix

Frequently Asked Questions

What is Commit Message Writer?

Commit Message Writer is a free developer workflow skill for AI coding agents. Write clear, conventional commit messages from diffs. It provides a specialized system prompt that configures your agent with developer workflow expertise.

How do I use Commit Message Writer with Claude Code?

Run npx playbooks add skill anthropics/courses --skill git-commit-writer in your terminal to install Commit Message Writer into your Claude Code session. It works immediately after installation.

Which AI coding agents work with Commit Message Writer?

Commit Message Writer is compatible with Claude Code, Cursor, GitHub Copilot, Windsurf, OpenClaw, Cline, and any AI agent that supports custom system prompts or .cursorrules files.

Is Commit Message Writer free to use?

Yes, Commit Message Writer is completely free and open source. The full source is available on GitHub at https://github.com/anthropics/courses. You only need a subscription to the AI agent you use it with.

Related Skills

Get the best new skills
in your inbox

Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.