Loading...
Loading...
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 skill4agent add ovachiever/droid-tings git-commit-helpergit commit<type>(<scope>): <subject>
<body>
<footer>featfixdocsstylerefactorperftestbuildcichore# 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# 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# 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.# 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 responsesgit diff --staged --name-only
git diff --stagedBREAKING CHANGE: descriptionCloses #123Fixes #456feat: 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, toolingfeat(UserCard): ...fix(auth): ...chore(api): ...docs(readme): ...add user authenticationfix memory leak in componentupdate API documentationadded user authenticationfixes bugUpdate API docs.# 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# 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.# 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#!/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# Poor initial message
git commit -m "fix stuff"
# Amend with better message
# I suggest improved message based on changes
git commit --amend{
"network": {
"allowedDomains": [
"api.github.com"
]
}
}deploy: Deployment
migrate: Database migrations
hotfix: Production hotfixesCommon scopes: auth, api, ui, database, admin, mobile# Standard format
feat(scope): subject
# Your custom format
[JIRA-123] feat(scope): subjectfeat(ui): add responsive navigation menu
fix(components): resolve prop validation warning
style(css): update button hover effectsfeat(api): add user pagination endpoint
fix(database): resolve connection pool exhaustion
perf(queries): add database indices for user lookupsci: add automated deployment pipeline
build: update dependencies to latest versions
chore(docker): optimize container image size# 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# 1. Make changes
/review --scope staged # Review before commit
# 2. Address findings
# 3. Stage final changes
# 4. I generate commit message
git commit