Generates clear, consistent commit messages following Conventional Commits format with project-appropriate scopes and changelog-friendly structure. Covers commit types, scope selection, subject/body/footer rules, breaking changes, multi-package commits, and anti-pattern avoidance. Use when writing commits, reviewing staged changes, generating commit messages, or enforcing commit conventions. Triggers: commit, commit message, write commit, generate commit, staged changes, conventional commits, git commit, changelog.
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Cross-cutting changes -- Omit scope when the change is truly global
Workflow
Generating a Commit Message
Analyze staged changes -- Run git diff --staged to understand what changed
Identify the type -- Classify as feat, fix, refactor, docs, etc.
Determine the scope -- Which package or module is affected
Write the subject -- Concise imperative description under 50 chars
Add body if needed -- For non-trivial changes, explain the reasoning
Add footer if needed -- Issue refs, breaking changes, co-authors
Breaking Change Format
Use the ! marker in the type/scope AND a BREAKING CHANGE: footer:
feat(api)!: rename UserResponse to UserResult
BREAKING CHANGE: All imports of UserResponse must be updated
to UserResult. The structure remains the same.
Migration:
- import { UserResponse } -> import { UserResult }
- UserResponse<T> -> UserResult<T>
Quick Reference: Good vs Bad
Avoid
# Too vague
fix: bug fix
# Wrong tense
feat(cli): added new command
# Too long subject
feat(server): implement comprehensive middleware system with logging, timing, rate limiting, and authentication support
# Missing scope when package is clear
feat: add batch execution
# Mixed concerns (should be two commits)
feat(server): add middleware and fix timeout bug
Prefer
# Specific
fix(client): prevent duplicate connections on reconnect
# Present tense, imperative
feat(cli): add format flag for output
# Concise subject with body for details
feat(server): add middleware system
Includes:
- Logging middleware with configurable levels
- Timing middleware for performance tracking
- Rate limiting with sliding window
# Clear scope
feat(server): add batch execution support
# Atomic -- one concern per commit
feat(server): add middleware pipeline
fix(server): handle timeout in long-running commands
Checklist
Type accurately reflects the nature of the change
Scope matches the affected package or module
Subject is under 50 characters
Subject uses imperative mood, present tense, lowercase, no period
Body (if present) explains what and why, wrapped at 72 characters
Breaking changes use both ! marker and BREAKING CHANGE: footer
Each commit addresses a single concern (no mixed feat + fix)
Issue references use proper format (Closes #N, Fixes #N)
Message is suitable for automated changelog generation
When to Escalate
Condition
Action
Change spans many packages with unrelated concerns
Split into multiple atomic commits
Unclear whether change is feat vs fix vs refactor
Review the diff -- if behavior changes for users it is feat or fix; if not, refactor
Breaking change with complex migration
Include detailed migration steps in the body and notify the team
Staged changes include unrelated modifications
Unstage unrelated files and commit separately
Commit would include secrets or credentials
Stop and remove sensitive content before committing