Skip to main content
commandsSource-backedReview first Safety · Privacy ·

Git Smart Commit for Claude Code

Intelligently analyzes changes and creates well-formatted git commits with conventional commit messages

by JSONbored·added 2025-09-15·
Claude Code
HarnessClaude Code
Invocation:/git-smart-commit [type] [message]
Review first review before installing

Open the source and read safety notes before installing.

Schema details

Install type
copy
Reading time
2 min
Difficulty score
24
Troubleshooting
Yes
Breaking changes
No
Runtime and command metadata
Command syntax
/git-smart-commit [type] [message]
Argument hint
[type] [message]
Allowed tools
Bash(git add:*)Bash(git status:*)Bash(git diff:*)Bash(git commit:*)
Full copyable content
/git-smart-commit feat "add structured content schema"

About this resource

Context

  • Current git status: !git status --short
  • Staged changes: !git diff --cached --stat
  • Unstaged changes: !git diff --stat
  • Recent commits: !git log --oneline -5

Your Task

Analyze the changes and create a git commit following these guidelines:

  1. Conventional Commit Format:

    • feat: New feature
    • fix: Bug fix
    • docs: Documentation changes
    • style: Code style changes (formatting, etc)
    • refactor: Code refactoring
    • perf: Performance improvements
    • test: Test changes
    • build: Build system changes
    • ci: CI/CD changes
    • chore: Other changes
  2. Commit Message Structure:

    <type>(<scope>): <subject>
    
    <body>
    
    <footer>
    
  3. Best Practices:

    • Subject line: 50 characters max
    • Use imperative mood ("Add" not "Added")
    • Body: Wrap at 72 characters
    • Explain what and why, not how
    • Reference issues if applicable
  4. Smart Analysis:

    • Group related changes
    • Suggest splitting if changes are unrelated
    • Detect breaking changes
    • Identify files that shouldn't be committed

If arguments provided: Use $1 as type and $2 as message. Otherwise: Analyze changes and suggest appropriate commit.

Command Metadata

allowed-tools:
  - Bash(git add:*)
  - Bash(git status:*)
  - Bash(git diff:*)
  - Bash(git commit:*)
argument-hint: [type] [message]
description: Create a smart git commit
model: claude-3-5-sonnet-20241022

Steps

  1. Review all changes
  2. Identify the commit type
  3. Stage appropriate files
  4. Create descriptive commit message
  5. Commit the changes
#git#commit#version-control#conventional-commits

Source citations

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.