Loading...
Loading...
A comprehensive Git assistant skill that provides intelligent branch management, commit message conventions, workflow assistance, and code review guidance. Automatically activates when users perform Git operations or use /git commands.
npx skill4agent add lispking/git-skills git-skillsgit commitgit push/git{type}/{ticket-id}-{short-description}feature/feature/123-user-authbugfix/bugfix/456-fix-loginhotfix/hotfix/urgent-security-patchrefactor/refactor/cleanup-apidocs/docs/update-readmetest/test/add-unit-testschore/chore/update-depsgit stash -u| Type | Description | Example |
|---|---|---|
| New feature | |
| Bug fix | |
| Documentation only | |
| Code style (formatting) | |
| Code refactoring | |
| Adding/updating tests | |
| Build/tool changes | |
| Performance improvement | |
| CI/CD changes | |
| Revert previous commit | |
<type>(<scope>): <concise subject in imperative mood>
<detailed body explaining:
- What problem is being solved or what functionality is added
- Why this approach was chosen over alternatives
- Any architectural decisions or trade-offs made
- Side effects or dependencies introduced
- Breaking changes or migration notes if applicable>
<footer with issue references, breaking change notices, etc.>Fixes #123Closes #456Relates to #789BREAKING CHANGE: description of impact and migration pathCo-Authored-By:refactor(utils): extract validation logic into standalone module
Move email and phone validation from UserService to a new ValidationUtils
class. This reduces duplication across the codebase and makes validation
logic easier to test in isolation.
The new ValidationUtils class provides:
- validateEmail() with stricter regex pattern
- validatePhone() supporting international formats
- Centralized error messages for consistency
No breaking changes. All existing validation calls remain functional
through deprecated wrapper methods that will be removed in v2.0.
Relates to #445feat(auth): implement JWT-based authentication with refresh tokens
Add comprehensive JWT authentication system to replace session-based auth.
This change addresses security concerns with session fixation attacks and
enables stateless authentication for API consumers.
Implementation details:
- Use RS256 algorithm with rotating key pairs
- Access tokens expire after 15 minutes, refresh tokens after 7 days
- Implement token blacklisting for logout functionality
- Add middleware for automatic token refresh on 401 responses
Security considerations:
- Private keys stored in environment variables, never committed
- Refresh tokens hashed in database using bcrypt
- Rate limiting applied to token refresh endpoint
Breaking changes:
- Session-based authentication endpoints deprecated but still functional
- New environment variables required: JWT_PRIVATE_KEY, JWT_PUBLIC_KEY
Fixes #234
Relates to #198 (API v2 migration)fix(database): resolve connection pool exhaustion under high load
Fix critical issue where database connections were not being properly
released after query timeout, leading to connection pool exhaustion
and application downtime under sustained high load.
Root cause analysis:
The connection release logic was placed in a finally block that only
executed on successful query completion. When queries timed out, the
exception handler returned early without releasing the connection.
Changes made:
- Move connection.release() to unconditional finally block
- Add connection health check before returning to pool
- Implement connection timeout at pool level (30s) to prevent hangs
- Add metrics logging for pool utilization monitoring
Performance impact:
- Connection pool utilization reduced from 100% to ~40% under load
- Eliminates cascading failures when database is slow
Tested with:
- Load test: 1000 concurrent users for 30 minutes
- Chaos test: Random connection failures injected
Fixes #567refactor(api): decouple user service from database layer
Extract database-specific logic from UserService into a dedicated
UserRepository class. This separation of concerns improves testability
and allows for future database migration without service layer changes.
Motivation:
The UserService had grown to over 800 lines with mixed business logic
and SQL queries. Unit testing required database setup, making tests
slow and brittle. This refactoring enables mocking the repository
layer for faster, more isolated tests.
Architectural changes:
- UserService now depends on UserRepository interface
- UserRepositoryImpl contains all PostgreSQL-specific queries
- Added connection pooling configuration to repository layer
- Service layer now purely business logic and validation
Verification:
- All existing tests pass without modification (integration tests)
- New unit tests added for UserService with mocked repository
- No behavioral changes, purely structural refactoring
Closes #345chore(deps): upgrade PostgreSQL driver from 42.3.1 to 42.5.4
Update PostgreSQL JDBC driver to address CVE-2022-31197 security
vulnerability and gain performance improvements in prepared
statement caching.
Security fixes:
- CVE-2022-31197: SQL injection via crafted column names
- CVE-2022-41946: Information disclosure in error messages
Performance improvements:
- Prepared statement cache hit ratio improved by 15%
- Reduced memory allocation during batch operations
Breaking changes: None
Migration: None required, drop-in replacement
Tested against:
- PostgreSQL 13, 14, 15
- Both standard and SSL connection modes
- Full integration test suite passes
Relates to #401 (security audit)/git commitgit commit<type>(<scope>): <concise subject in imperative mood>
<body paragraph 1: what changed and why>
<body paragraph 2: implementation details, considerations, or breaking changes>
<footer: Fixes #123, Relates to #456>Co-Authored-By:^Co-Authored-By:git commitgit log -1git commit --amend -m "<cleaned message>"## Summary
Brief description of changes and motivation
## Changes
- Detailed change 1 with rationale
- Detailed change 2 with rationale
## Testing
How was this tested? Include:
- Unit tests added/modified
- Integration test results
- Manual testing performed
- Edge cases considered
## Breaking Changes
List any breaking changes and migration steps
## Related Issues
Fixes #123
Relates to #456/git sync# See conflicted files
git status
# Open and edit files, resolve markers
# Then mark as resolved
git add <file>
# Complete merge
git commit/git stats# Contribution stats
git shortlog -sn --all
# Lines changed
git diff --stat
# Activity graph
git log --graph --oneline --all
# Recent commits with bodies
git log --format="%h %s%n%b" -10# Branch operations
git branch -a # List all branches
git branch -d <branch> # Delete branch
git branch -D <branch> # Force delete
git checkout -b <new-branch> # Create and switch
# Stashing
git stash # Stash changes
git stash -u # Include untracked
git stash pop # Apply and remove stash
git stash list # List stashes
# Undo operations
git reset --soft HEAD~1 # Undo last commit, keep changes
git reset --hard HEAD~1 # Discard last commit
git revert HEAD # Create revert commit
# Inspection
git log --oneline -20 # Recent commits
git show <commit> # Show commit details
git diff HEAD~1 # Show last changes{
"commit": {
"types": ["feat", "fix", "docs", "style", "refactor", "test", "chore"],
"scopes": ["api", "ui", "auth", "db"],
"requireScope": false,
"requireBody": true,
"minBodyLength": 50
},
"branch": {
"mainBranch": "main",
"namingPattern": "{type}/{ticket-id}-{description}"
}
}git diff --cachedgit reflog