Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
davila7 avatar

Git Commit Helper

  • 440 installs
  • 30.1k repo stars
  • Updated August 4, 2026
  • davila7/claude-code-templates

git commit helper is a Claude Code skill that analyzes git diff --staged output and drafts conventional commit messages for developers who want accurate summaries without writer's block.

About

git commit helper is a davila7/claude-code-templates skill that generates descriptive conventional commit messages by analyzing staged changes. Developers start with git diff --staged, then the agent proposes a message following conventional commits format with clear type and scope. The skill hooks PostToolUse on Bash commands and logs analysis timestamps to ~/.claude/git-commit-helper.log for traceability. Reach for git commit helper when finishing a change set, reviewing staged files, or asking an agent to phrase commits that match the actual diff instead of generic placeholders.

  • Automatically analyzes staged changes and suggests Conventional Commits
  • Produces messages that follow the conventionalcommits.org standard
  • Reduces context switching when preparing commits for agents or PRs
  • Works directly with git in your terminal or agent workflow
  • Helps maintain clean project history across every phase

Git Commit Helper by the numbers

  • 440 all-time installs (skills.sh)
  • Ranked #112 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/davila7/claude-code-templates --skill git-commit-helper

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs440
repo stars30.1k
Last updatedAugust 4, 2026
Repositorydavila7/claude-code-templates

How do you write conventional commit messages from a git diff?

Generate consistent, high-quality conventional commit messages that accurately summarize changes without writer's block.

Who is it for?

Developers using Claude Code who stage focused changes and want conventional commit messages that reflect the real diff before committing.

Skip if: Repositories that forbid conventional commits, or changes with nothing staged where git diff --staged is empty.

When should I use this skill?

The user asks for commit message help, reviews staged changes, or runs git diff --staged before committing.

What you get

Conventional commit message text aligned with git diff --staged changes

  • Commit message text

Files

SKILL.mdMarkdownGitHub ↗

Git Commit Helper

Quick start

Analyze staged changes and generate commit message:

# View staged changes
git diff --staged

# Generate commit message based on changes
# (Claude will analyze the diff and suggest a message)

Commit message format

Follow conventional commits format:

<type>(<scope>): <description>

[optional body]

[optional footer]

Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, missing semicolons)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks

Examples

Feature commit:

feat(auth): add JWT authentication

Implement JWT-based authentication system with:
- Login endpoint with token generation
- Token validation middleware
- Refresh token support

Bug fix:

fix(api): handle null values in user profile

Prevent crashes when user profile fields are null.
Add null checks before accessing nested properties.

Refactor:

refactor(database): simplify query builder

Extract common query patterns into reusable functions.
Reduce code duplication in database layer.

Analyzing changes

Review what's being committed:

# Show files changed
git status

# Show detailed changes
git diff --staged

# Show statistics
git diff --staged --stat

# Show changes for specific file
git diff --staged path/to/file

Commit message guidelines

DO:

  • Use imperative mood ("add feature" not "added feature")
  • Keep first line under 50 characters
  • Capitalize first letter
  • No period at end of summary
  • Explain WHY not just WHAT in body

DON'T:

  • Use vague messages like "update" or "fix stuff"
  • Include technical implementation details in summary
  • Write paragraphs in summary line
  • Use past tense

Multi-file commits

When committing multiple related changes:

refactor(core): restructure authentication module

- Move auth logic from controllers to service layer
- Extract validation into separate validators
- Update tests to use new structure
- Add integration tests for auth flow

Breaking change: Auth service now requires config object

Scope examples

Frontend:

  • feat(ui): add loading spinner to dashboard
  • fix(form): validate email format

Backend:

  • feat(api): add user profile endpoint
  • fix(db): resolve connection pool leak

Infrastructure:

  • chore(ci): update Node version to 20
  • feat(docker): add multi-stage build

Breaking changes

Indicate breaking changes clearly:

feat(api)!: restructure API response format

BREAKING CHANGE: All API responses now follow JSON:API spec

Previous format:
{ "data": {...}, "status": "ok" }

New format:
{ "data": {...}, "meta": {...} }

Migration guide: Update client code to handle new response structure

Template workflow

1. Review changes: git diff --staged 2. Identify type: Is it feat, fix, refactor, etc.? 3. Determine scope: What part of the codebase? 4. Write summary: Brief, imperative description 5. Add body: Explain why and what impact 6. Note breaking changes: If applicable

Interactive commit helper

Use git add -p for selective staging:

# Stage changes interactively
git add -p

# Review what's staged
git diff --staged

# Commit with message
git commit -m "type(scope): description"

Amending commits

Fix the last commit message:

# Amend commit message only
git commit --amend

# Amend and add more changes
git add forgotten-file.js
git commit --amend --no-edit

Best practices

1. Atomic commits - One logical change per commit 2. Test before commit - Ensure code works 3. Reference issues - Include issue numbers if applicable 4. Keep it focused - Don't mix unrelated changes 5. Write for humans - Future you will read this

Commit message checklist

  • [ ] Type is appropriate (feat/fix/docs/etc.)
  • [ ] Scope is specific and clear
  • [ ] Summary is under 50 characters
  • [ ] Summary uses imperative mood
  • [ ] Body explains WHY not just WHAT
  • [ ] Breaking changes are clearly marked
  • [ ] Related issue numbers are included

Related skills

How it compares

Pick git commit helper over manual commit templates when you already have staged diffs and need messages grounded in actual file changes.

FAQ

What git command does git commit helper analyze?

git commit helper analyzes git diff --staged output to understand staged file changes, then proposes a conventional commit message that summarizes those changes with an appropriate type and scope.

Does git commit helper log its activity?

git commit helper registers a PostToolUse Bash hook that appends timestamped analysis entries to ~/.claude/git-commit-helper.log whenever commit message assistance runs during a session.

Git & Pull Requestsgitintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.