/git-commit-helper
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.
$ npx -y skills add alirezarezvani/claude-code-tresor --skill git-commit-helper --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/git-commit-helper
Context preview
The summary Claude sees to decide when to auto-load this skill.
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.
SKILL.md
git-commit-helper.SKILL.mdname: git-commit-helper
description: 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.
allowed-tools: Bash, Read
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, databa
Read more
name: git-commit-helper description: 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. allowed-tools: Bash, Read
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, databa
A world-class collection of Claude Code utilities: autonomous skills, expert agents, slash commands, and prompts that supercharge your development workflow.
Repo: alirezarezvani/claude-code-tresor
Other skills on claude-code-tresor.
- /code-reviewer
Automatic code quality and best practices analysis. Use proactively when files are modified, saved, or committed. Analyzes code style, patterns, potential bugs, and security basics. Triggers on file changes, git diff, code edits, quality mentions.
Open skill - /test-generator
Automatically suggest tests for new functions and components. Use when new code is written, functions added, or user mentions testing. Creates test scaffolding with Jest, Vitest, Pytest patterns. Triggers on new functions, components, test requests, testing mentions.
Open skill - /api-documenter
Auto-generate API documentation from code and comments. Use when API endpoints change, or user mentions API docs. Creates OpenAPI/Swagger specs from code. Triggers on API file changes, documentation requests, endpoint additions.
Open skill - /readme-updater
Keep README files current with project changes. Use when project structure changes, features added, or setup instructions modified. Suggests README updates based on code changes. Triggers on significant project changes, new features, dependency changes.
Open skill - /dependency-auditor
Check dependencies for known vulnerabilities using npm audit, pip-audit, etc. Use when package.json or requirements.txt changes, or before deployments. Alerts on vulnerable dependencies. Triggers on dependency file changes, deployment prep, security mentions.
Open skill - /secret-scanner
Detect exposed secrets, API keys, credentials, and tokens in code. Use before commits, on file saves, or when security is mentioned. Prevents accidental secret exposure. Triggers on file changes, git commits, security checks, .env file modifications.
Open skill

