Git Commit Guidelines

VerifiedSafe

Git commit guidelines adhering to Conventional Commits with allowed types (feat, fix, refactor, etc.) and `<type>: <lowercase imperative description>` format. Helps structure commit messages, review staged and unstaged changes for logical splitting into separate commits, and decide between creating a new commit or amending the previous one.

Sby Skills Guide Bot
DevelopmentIntermediate
1306/2/2026
Claude CodeCursorWindsurfCopilotCodex
#git#commits#conventional-commits#version-control

Recommended for

Our review

Provides guidelines for creating, amending, squashing, or rewording Git commits following the Conventional Commits standard.

Strengths

  • Enforces strict Conventional Commits format with predefined types
  • Encourages logical separation of changes into distinct commits
  • Suggests amending last commit when appropriate, with explicit user approval
  • Automatically signs commits with -S

Limitations

  • Not suitable for projects using scopes or a different message format
  • May slow down workflow by requiring user decisions on amending or splitting
  • Does not handle pushing commits automatically
When to use it

For any Git commit operation when a disciplined commit message convention is desired.

When not to use it

If the workflow requires scoped commit messages, non-conventional formats, or if the user prefers quick single commits without review.

Security analysis

Safe
Quality score95/100

The skill only uses safe Git commands (add, commit, diff, log, status) and does not instruct any destructive, exfiltrating, or obfuscated actions. No system or network risks are introduced.

No concerns found

Examples

Simple commit with conventional message
Stage all changes and create a commit with message 'fix: resolve login bug'
Suggest commit splitting
Review my staged changes and suggest how to split them into multiple logical commits
Amend vs new commit decision
I just made a small fix for a previous commit that hasn't been pushed. Should I amend or create a new commit?

name: commit description: Git commit guidelines. Use when creating, amending, squashing, or rewording git commits, staging files, or writing commit messages. allowed-tools: Bash(git add:), Bash(git commit:), Bash(git diff:), Bash(git log:), Bash(git status:*)

Git Commit Guidelines

Follow Conventional Commits with these overrides:

  • Allowed types: feat, fix, refactor, chore, docs, test, ci
  • Message format: <type>: <lowercase imperative description>
  • No scopes — do not use <type>(scope): form
  • Add body, separated by blank line, only when subject line insufficient

Pre-Commit Review

Before committing, review all staged and unstaged changes to determine if they should be split into multiple commits. Changes belong in separate commits when they have different types (e.g., feat + fix), affect unrelated areas, or serve distinct purposes.

If the user has not explicitly asked to split, suggest doing so and list the proposed commits. Proceed with a single commit only if all changes are logically cohesive.

Also check for changes made outside the current session (e.g., editor saves, other tools). If they are relevant to the commit, offer to include them. If they are unrelated, silently ignore them unless the user asks to include them.

New Commit vs. Amend

When changes closely follow a previous commit (e.g., a quick fix or forgotten file), evaluate whether amending the previous commit is more appropriate than creating a new one. Amending is preferable when the change corrects or completes the previous commit and that commit has not been pushed.

Never amend without the user's explicit approval. Present the two options (new commit vs. amend) and let the user decide.

Additional Guidelines

  • Always sign commits with git commit -S
  • Do NOT include AI co-authoring information
  • Do NOT use git -C <path> when the current directory is already the repository root
Related skills