git-commit-helper

21
0
Source

Generate conventional commit messages automatically. Use when user runs git commit, stages changes, or asks for commit message help. Analyzes git diff to create clear, descriptive conventional commit messages. Triggers on git commit, staged changes, commit message requests.

Install

mkdir -p .claude/skills/git-commit-helper && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1295" && unzip -o skill.zip -d .claude/skills/git-commit-helper && rm skill.zip

Installs to .claude/skills/git-commit-helper

About this skill

Git Commit Helper Skill

Generate conventional commit messages from your git diff.

When I Activate

  • git commit without message
  • ✅ User asks "what should my commit message be?"
  • ✅ Staged changes exist
  • ✅ User mentions commit or conventional commits
  • ✅ Before creating commits

What I Generate

Conventional Commit Format

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

<body>

<footer>

Types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style (formatting, no logic change)
  • refactor: Code refactoring
  • perf: Performance improvements
  • test: Test additions or fixes
  • build: Build system changes
  • ci: CI/CD changes
  • chore: Maintenance tasks

Examples

Feature Addition

# You staged:
git add auth.service.ts login.component.tsx

# I analyze diff and suggest:
feat(auth): add JWT-based user authentication

- Implement login/logout functionality
- Add token management service
- Include auth guards for protected routes
- Add unit tests for auth service

Closes #42

Bug Fix

# You staged:
git add UserList.tsx

# I suggest:
fix(components): resolve memory leak in UserList

Fixed subscription not being cleaned up in useEffect,
causing memory leak when component unmounts.

Closes #156

Breaking Change

# You staged:
git add api/users.ts

# I suggest:
feat(api): update user API response format

Changed response structure to include metadata
for better pagination and filtering support.

BREAKING CHANGE: User API now returns { data, metadata }
instead of direct array. Update client code accordingly.

Documentation Update

# You staged:
git add README.md docs/api.md

# I suggest:
docs: update API documentation with authentication examples

- Add authentication flow diagrams
- Include cURL examples for protected endpoints
- Document error responses

Analysis Process

Step 1: Check Staged Changes

git diff --staged --name-only
git diff --staged

Step 2: Categorize Changes

  • New files → feat
  • Modified files → fix, refactor, or feat
  • Deleted files → chore or refactor
  • Test files → test
  • Documentation → docs

Step 3: Analyze Content

  • What was changed?
  • Why was it changed?
  • What's the impact?
  • Are there breaking changes?

Step 4: Generate Message

Subject line:

  • Max 50 characters
  • Imperative mood ("add" not "added")
  • No period at end
  • Lowercase after type

Body:

  • Explain WHAT and WHY, not HOW
  • Wrap at 72 characters
  • Bullet points for multiple changes

Footer:

  • Breaking changes: BREAKING CHANGE: description
  • Issue references: Closes #123, Fixes #456

Message Components

Type Selection

feat: New functionality
  - New components, features, capabilities

fix: Bug fixes
  - Resolving issues, fixing bugs

refactor: Code improvements
  - No functional changes, better code structure

perf: Performance
  - Speed improvements, optimization

docs: Documentation
  - README, comments, guides

test: Testing
  - Adding or fixing tests

style: Formatting
  - Code style, linting, formatting

chore: Maintenance
  - Dependencies, build config, tooling

Scope Selection

Common scopes:

  • Component name: feat(UserCard): ...
  • Module: fix(auth): ...
  • Package: chore(api): ...
  • Area: docs(readme): ...

Subject Guidelines

✅ Good:

  • add user authentication
  • fix memory leak in component
  • update API documentation

❌ Bad:

  • added user authentication (past tense)
  • fixes bug (too vague)
  • Update API docs. (period at end)

Advanced Examples

Multiple Changes

# Multiple files in auth feature
feat(auth): implement complete authentication system

- Add JWT token generation and validation
- Implement password hashing with bcrypt
- Create login/logout API endpoints
- Add auth middleware for protected routes
- Include refresh token functionality

Closes #42, #43, #44

Refactoring

# Code restructuring
refactor(api): extract database logic into repository pattern

Moved database queries from controllers to repository classes
for better separation of concerns and testability.

No functional changes or API modifications.

Performance Improvement

# Optimization
perf(queries): optimize user data fetching

- Implement query batching to eliminate N+1 queries
- Add database indices on frequently queried columns
- Cache user profile data with 5-minute TTL

Performance improvement: 80ms → 12ms average response time

Git Integration

Pre-commit Hook

I work great with pre-commit hooks:

#!/bin/sh
# .git/hooks/prepare-commit-msg

# If no commit message provided, trigger skill
if [ -z "$2" ]; then
  # Skill suggests message based on staged changes
  echo "# Suggested commit message (edit as needed)" > "$1"
fi

Amending Commits

# Poor initial message
git commit -m "fix stuff"

# Amend with better message
# I suggest improved message based on changes
git commit --amend

Sandboxing Compatibility

Works without sandboxing: ✅ Yes Works with sandboxing: ✅ Yes

May need network access for:

  • Fetching issue details from GitHub API
  • Checking if issue numbers are valid

Sandbox config (optional):

{
  "network": {
    "allowedDomains": [
      "api.github.com"
    ]
  }
}

Customization

Custom Commit Types

Edit SKILL.md to add company-specific types:

deploy: Deployment
migrate: Database migrations
hotfix: Production hotfixes

Custom Scopes

Train the skill to recognize your project structure:

Common scopes: auth, api, ui, database, admin, mobile

Message Templates

Customize message format for your team:

# Standard format
feat(scope): subject

# Your custom format
[JIRA-123] feat(scope): subject

Tips for Best Messages

  1. Be specific: "fix login button" not "fix bug"
  2. Use imperative mood: "add" not "added" or "adds"
  3. Include context: Why this change was needed
  4. Reference issues: Always include issue numbers
  5. Breaking changes: Always flag in footer

Common Patterns

Frontend Changes

feat(ui): add responsive navigation menu
fix(components): resolve prop validation warning
style(css): update button hover effects

Backend Changes

feat(api): add user pagination endpoint
fix(database): resolve connection pool exhaustion
perf(queries): add database indices for user lookups

Infrastructure Changes

ci: add automated deployment pipeline
build: update dependencies to latest versions
chore(docker): optimize container image size

Related Tools

  • code-reviewer skill: Reviews code before commit
  • @docs-writer sub-agent: Generates changelog from commits
  • /review command: Pre-commit code review

Integration

With code-reviewer

# 1. Write code
# 2. code-reviewer flags issues
# 3. Fix issues
# 4. Stage changes
# 5. I generate commit message
git commit  # Uses my suggested message

With /review Command

# 1. Make changes
/review --scope staged  # Review before commit
# 2. Address findings
# 3. Stage final changes
# 4. I generate commit message
git commit

Learn More

More by alirezarezvani

View all →

senior-architect

alirezarezvani

Comprehensive software architecture skill for designing scalable, maintainable systems using ReactJS, NextJS, NodeJS, Express, React Native, Swift, Kotlin, Flutter, Postgres, GraphQL, Go, Python. Includes architecture diagram generation, system design patterns, tech stack decision frameworks, and dependency analysis. Use when designing system architecture, making technical decisions, creating architecture diagrams, evaluating trade-offs, or defining integration patterns.

123101

content-creator

alirezarezvani

Create SEO-optimized marketing content with consistent brand voice. Includes brand voice analyzer, SEO optimizer, content frameworks, and social media templates. Use when writing blog posts, creating social media content, analyzing brand voice, optimizing SEO, planning content calendars, or when user mentions content creation, brand voice, SEO optimization, social media marketing, or content strategy.

11110

content-trend-researcher

alirezarezvani

Advanced content and topic research skill that analyzes trends across Google Analytics, Google Trends, Substack, Medium, Reddit, LinkedIn, X, blogs, podcasts, and YouTube to generate data-driven article outlines based on user intent analysis

979

ceo-advisor

alirezarezvani

Executive leadership guidance for strategic decision-making, organizational development, and stakeholder management. Includes strategy analyzer, financial scenario modeling, board governance frameworks, and investor relations playbooks. Use when planning strategy, preparing board presentations, managing investors, developing organizational culture, making executive decisions, or when user mentions CEO, strategic planning, board meetings, investor updates, organizational leadership, or executive strategy.

826

email-template-builder

alirezarezvani

Email Template Builder

83

coo-advisor

alirezarezvani

Operations leadership for scaling companies. Process design, OKR execution, operational cadence, and scaling playbooks. Use when designing operations, setting up OKRs, building processes, scaling teams, analyzing bottlenecks, planning operational cadence, or when user mentions COO, operations, process improvement, OKRs, scaling, operational efficiency, or execution.

43

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

267784

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

203415

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

183270

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

206231

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

163194

rust-coding-skill

UtakataKyosui

Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.

163173

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.