CO

commit-message

Automates the creation of standardized, clear git commit messages using repository diffs.

Install

mkdir -p .claude/skills/commit-message-littlebreak && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14574" && unzip -o skill.zip -d .claude/skills/commit-message-littlebreak && rm skill.zip

Installs to .claude/skills/commit-message-littlebreak

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Generates clear commit messages from git diffs. Use when writing commit messages, reviewing staged changes, or when the user asks to create a commit.
149 chars✓ has a “when” trigger
Beginner

Key capabilities

  • Analyze git diffs and staged changes
  • Identify the type and scope of changes
  • Explain the reasoning behind complex changes
  • Create git commits automatically with generated messages
  • Adhere to conventional commit standards

How it works

This skill analyzes staged git changes and the project's commit history to determine the type and scope of modifications. It then generates a commit message following conventional commit standards, including type, scope, subject, and body, and can automatically create the commit.

Inputs & outputs

You give it
Staged git changes and current git status
You get back
A conventional commit message and an optional git commit

When to use commit-message

  • Generating commit messages for features
  • Creating bug fix messages
  • Documenting refactoring changes

About this skill

Commit Message Generator

Generate clear, conventional commit messages by analyzing git diffs and staged changes.

Instructions

When asked to generate or create a commit message:

  1. Analyze Current State

    • Run git status to see what files are staged and unstaged
    • Run git diff --cached to review staged changes
    • Run git log --oneline -10 to understand the project's commit message style
  2. Understand the Changes

    • Read the diff carefully to understand what changed
    • Identify the type of change (feature, fix, refactor, etc.)
    • Determine the scope/area affected (component, file, feature)
    • Understand the "why" behind the changes, not just the "what"
  3. Generate the Commit Message

Use this format:

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

<body>

Co-Authored-By: ai <[email protected]>

Commit Types

  • feat: New feature or functionality
  • fix: Bug fix
  • refactor: Code refactoring (no behavior change)
  • perf: Performance improvement
  • style: Styling or formatting changes
  • docs: Documentation updates
  • test: Adding or updating tests
  • chore: Maintenance, dependencies, configuration
  • build: Build system or dependency changes
  • ci: CI/CD configuration changes

Writing Rules

  • Subject line: Use imperative mood ("add" not "added" or "adds")
  • Length: Subject ≤ 50 characters, body lines ≤ 72 characters
  • Clarity: Be specific and descriptive
  • Scope: Use relevant scope like todos, auth, ui, api, etc.
  • Body: Explain WHY, not WHAT (the diff shows what)
  1. Present the Message

    • Show the generated commit message clearly
    • Explain your reasoning if the change is complex
  2. Create the Commit Automatically

    • Use heredoc format for proper multiline message:
    git commit -m "$(cat <<'EOF'
    <type>(<scope>): <subject>
    
    <body>
    
    Co-Authored-By: ai <[email protected]>
    EOF
    )"
    

Examples

Example 1: New Feature

Scenario: User added a dark mode toggle to settings

feat(settings): add dark mode toggle

Implement dark mode toggle with localStorage persistence. The toggle
respects system preferences on first load and provides smooth transitions
between themes using CSS variables.

Co-Authored-By: ai <[email protected]>

Example 2: Bug Fix

Scenario: Fixed hydration mismatch in todo list

fix(hydration): prevent SSR/client mismatch in todo list

Use two-phase hydration pattern to avoid mismatch errors. Now loading
from localStorage in useEffect after component mounts rather than
during initial render.

Co-Authored-By: ai <[email protected]>

Example 3: Refactoring

Scenario: Extracted logic into custom hook

refactor(hooks): extract todo storage logic into useTodoStorage

Move localStorage sync logic into reusable hook for better testability
and separation of concerns. No functional changes to user-facing behavior.

Co-Authored-By: ai <[email protected]>

Example 4: Performance Optimization

Scenario: Added memoization to expensive calculation

perf(todos): memoize completed count calculation

Wrap todo completion calculation in useMemo to prevent unnecessary
recalculation on every render. Improves performance with large todo lists.

Co-Authored-By: ai <[email protected]>

Example 5: Style Changes

Scenario: Improved responsive layout

style(layout): improve mobile responsive design

Adjust grid layout to stack vertically on small screens with better
padding and spacing. Enhance glassmorphism effects for improved contrast.

Co-Authored-By: ai <[email protected]>

Best Practices

Do ✅

  • Analyze the full diff before writing the message
  • Match the project's existing commit style
  • Use specific, actionable language
  • Explain the reasoning in the body
  • Keep each commit focused on one logical change
  • Use conventional commit format consistently

Don't ❌

  • Use vague messages like "fix bug" or "update code"
  • Mix multiple unrelated changes in one commit
  • Write overly long subject lines
  • Forget to add Co-Authored-By attribution
  • Skip the body for non-trivial changes
  • Use past tense or gerunds

Special Cases

Breaking Changes

Add an exclamation mark (!) after the type and include BREAKING CHANGE in body:

feat(api)!: change todo response format

BREAKING CHANGE: Todo API now returns different structure.
Before: { id, title, done }
After: { id, text, completed, createdAt }

Update all API consumers to use new format.

Co-Authored-By: ai <[email protected]>

Multiple Related Changes

Use bullet points in the body:

feat(todos): add filtering and sorting

- Add filter buttons for all/active/completed states
- Implement sort by date or alphabetically
- Persist filter/sort preferences in localStorage

Co-Authored-By: ai <[email protected]>

Fixing Issues

Reference issue numbers:

fix(auth): resolve login redirect loop

Fixes #123

Detect token expiration properly and redirect to login without
creating an infinite loop.

Co-Authored-By: ai <[email protected]>

Verification Checklist

Before committing, verify:

  • Type is correct (feat, fix, refactor, etc.)
  • Scope accurately describes affected area
  • Subject line uses imperative mood
  • Subject line is ≤ 50 characters
  • Body explains WHY, not just WHAT
  • Body lines are ≤ 72 characters
  • Co-Authored-By is included
  • Message follows project conventions
  • Commit is atomic (one logical change)

Integration with Workflow

This skill works seamlessly with Claude Code's commit workflow:

  1. User makes changes and stages them with git add
  2. User asks "Create a commit" or "Generate commit message"
  3. This skill activates automatically
  4. Analyzes diff and generates conventional commit message
  5. Creates commit with proper attribution

The skill respects the project's existing conventions by analyzing recent commit history.

When not to use it

  • When the user wants to write a commit message manually
  • When the changes are not staged
  • When the project does not follow conventional commit standards

Limitations

  • Requires staged changes to analyze diffs
  • Generates messages based on predefined commit types
  • Relies on git commands for status and diff information

How it compares

This workflow automates the creation of structured, conventional commit messages based on code changes, ensuring consistency and clarity, unlike manual commit message writing that can be inconsistent or lack detail.

Compared to similar skills

commit-message side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
commit-message (this skill)06moReviewBeginner
commit-helper15moNo flagsBeginner
codex-cli-bridge99moReviewIntermediate
korean-skill-creator89moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

commit-helper

cockroachdb

Help create git commits and PRs with properly formatted messages and release notes following CockroachDB conventions. Use when committing changes or creating pull requests.

10

codex-cli-bridge

alirezarezvani

Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools

9180

korean-skill-creator

clwmfksek

한글 기반 클로드 스킬 자동 생성 도구. 사용자가 "클로드 스킬을 만들어줘" 또는 "[요구사항] 스킬 만들어줘"라고 요청할 때 사용. Progressive disclosure 원칙을 따르는 한글 문서 구조(SKILL.md + references/)를 자동으로 생성하고, 실전 예시를 포함한 일관성 있는 스킬 템플릿을 제공.

8132

skill-forge

WilliamSaysX

Automated skill creation workshop with intelligent source detection, smart path management, and end-to-end workflow automation. This skill should be used when users want to create a new skill or convert external resources (GitHub repositories, online documentation, or local directories) into a skill. Automatically fetches, organizes, and packages skills with proactive cleanup management.

11115

svelte-expert

Raudbjorn

Expert Svelte/SvelteKit development assistant for building components, utilities, and applications. Use when creating Svelte components, SvelteKit applications, implementing reactive patterns, handling state management, working with stores, transitions, animations, or any Svelte/SvelteKit development task. Includes comprehensive documentation access, code validation with svelte-autofixer, and playground link generation.

11107

run-nx-generator

nrwl

Run Nx generators with prioritization for workspace-plugin generators. Use this when generating code, scaffolding new features, or automating repetitive tasks in the monorepo.

571

Search skills

Search the agent skills registry