Loading...
Loading...
Create standardized git commit messages. Prioritize following the project's existing commit conventions, and support the Conventional Commits format. Usage scenarios: Users request to create commits or write commit messages
npx skill4agent add krissss/skills git-commit# View the last 5 commits only
git log -5 --pretty=format:"%s"featfeaturefixbugfix# View current changes
git diff --statgit status
git log @{u}..HEAD --oneline 2>/dev/null# View only the last 5 commits
git log -5 --pretty=format:"%s"featfeaturefixbugfixfeat: #123 xxxCloses #123<type>(<scope>): <subject>
<body>
<footer>typesubjectscopebodyfooter| Type | Description | Example |
|---|---|---|
| New feature | feat: add user authentication |
| Bug fix | fix: resolve login timeout |
| Documentation change | docs: update API documentation |
| Code format | style: unify code indentation |
| Refactoring | refactor: extract common methods |
| Performance optimization | perf: optimize query performance |
| Test-related | test: add unit tests |
| Build/toolchain | chore: update dependency versions |
addaddedaddsBREAKING CHANGE: API endpoints now require authenticationCloses #123
Refs #456| Project Type | Scope Examples |
|---|---|
| Web Application | |
| Library/Framework | |
| Mobile Application | |
| DevOps | |
Changed content:
- src/api/users.ts (user module)
- src/types/user.ts (user module)
- src/api/orders.ts (order module, unrelated)
Main module: User module
Unrelated changes (recommend not committing for now):
- src/api/orders.ts (order module, unrelated)
Skip unrelated content and only commit user module-related changes? (y/n)Changed content:
- src/api/users.ts (user module, 50 lines)
- src/types/user.ts (user module, 20 lines)
- src/api/orders.ts (order module, 60 lines)
- src/types/order.ts (order module, 30 lines)
User module: 70 lines
Order module: 90 lines
Order module has more changes, recommend committing order module-related content:
- src/api/orders.ts
- src/types/order.ts
Commit only order module? (y/n)
Or commit all? (all)# Only stage files related to the main module
git add src/api/users.ts src/types/user.ts
git commit -m "feat(api): add user interface"
# Unrelated files are not staged, leave for later processing# Check if there are ahead commits
AHEAD=$(git rev-list --count @{u}..HEAD 2>/dev/null || echo "0")
if [ "$AHEAD" -eq 0 ]; then
# No ahead commits, create new commit directly
echo "Local is synchronized with remote, create new commit directly"
else
# There are ahead commits, perform merge judgment
echo "There are $AHEAD ahead commits locally, check if merging is needed"
fi# Get the last commit
LAST_COMMIT_MSG=$(git log -1 --pretty=format:"%s")
# View current changes
git diff --stat| Condition | Action |
|---|---|
| Same type + same module files | Ask if merging is needed |
| Fix for the same bug | Ask if merging is needed |
| Continuous documentation updates | Ask if merging is needed |
| Other cases | Do not merge |
# Stage current changes
git add <files>
# Merge into the last commit
git commit --amend --no-edit
# Or update the commit message
git commit --amend -m "Updated commit message"feat: add dark mode support
fix: resolve login timeout issue
docs: update README with new installation stepsfeat: 添加深色模式支持
fix: 修复登录超时问题
docs: 更新安装指南feat(auth): implement OAuth2 login
fix(ui): correct button alignment on mobile
refactor(db): optimize user query performancefeat(auth): 实现 OAuth2 登录
fix(ui): 修复移动端按钮对齐问题
refactor(db): 优化用户查询性能feat(api): add pagination support
Implement pagination for list endpoints:
- Add `page` and `limit` query parameters
- Return total count and pagination metadata
- Update documentation with examples
Closes #42fix(auth): resolve token expiration issue
The JWT token expiration was not being checked
correctly, allowing expired tokens to be used.
Added proper validation middleware.
Fixes #128feat(api): remove deprecated endpoints
Remove v1 endpoints in favor of v2:
- DELETE /api/v1/users
- DELETE /api/v1/posts
BREAKING CHANGE: v1 endpoints are no longer available.
Please migrate to v2 endpoints.
Migration guide: docs/migration.mdfeat(auth): require email verification
All new users must verify their email before
accessing the platform.
BREAKING CHANGE: Email verification is now mandatory.
Existing users are grandfathered in.feat: add comprehensive user authentication system with OAuth2 support and token management
↓
feat: add user authentication
Implement OAuth2 login and token management systemNew feature → feat
Bug fix → fix
Refactoring (no functional change) → refactor
Performance optimization → perf
Documentation → docs
Format adjustment → style
Testing → test
Others → chore