skills/git-workflow/SKILL.md
Git workflow, commit conventions, branching, and PR best practices. Use when: writing commit messages, creating branches, setting up git hooks, reviewing PRs, resolving merge conflicts, managing releases, or configuring git workflows.
npx skillsauth add Awais16/skills-vault git-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
<type>(<scope>): <description>
[optional body]
[optional footer]
| Type | When to Use |
|------|------------|
| feat | New feature for the user |
| fix | Bug fix |
| docs | Documentation only changes |
| style | Formatting, missing semicolons (no code logic change) |
| refactor | Code change that neither fixes a bug nor adds a feature |
| perf | Performance improvement |
| test | Adding or fixing tests |
| chore | Build process, tooling, dependencies |
| ci | CI/CD changes |
| revert | Reverting a previous commit |
feat(auth): add OAuth2 login with Google
fix(api): handle null response from payment gateway
refactor(dashboard): extract chart component from stats page
docs(readme): add deployment instructions
chore(deps): bump next from 14.1 to 14.2
perf(db): add index on users.email for login query
feat(auth)!: change session token format
BREAKING CHANGE: Session tokens now use JWT format.
Existing sessions will be invalidated.
Closes #123feat/user-authentication
fix/payment-null-response
chore/update-dependencies
refactor/extract-chart-component
hotfix/critical-auth-bypass
release/v2.1.0
main (production)
└── develop (integration)
├── feat/feature-a
├── feat/feature-b
└── fix/bug-fix
main — always deployable, tagged releasesdevelop — integration branch (if using gitflow; skip for trunk-based)main, merge back to main and developmainFollow Conventional Commits format: feat(auth): add Google OAuth login
## What
Brief description of the change.
## Why
Context and motivation — link to issue if applicable.
## How
Technical approach taken.
## Testing
- [ ] Unit tests added/updated
- [ ] Manual testing performed
- [ ] Edge cases considered
## Screenshots
(if UI changes)
# Setup
pnpm add -D husky lint-staged
pnpm exec husky init
// package.json
{
"lint-staged": {
"*.{ts,tsx}": ["eslint --fix", "prettier --write"],
"*.{json,md,yml}": ["prettier --write"]
}
}
# .husky/pre-commit
pnpm exec lint-staged
# .husky/commit-msg
pnpm exec commitlint --edit $1
// commitlint.config.js
export default {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', [
'feat', 'fix', 'docs', 'style', 'refactor',
'perf', 'test', 'chore', 'ci', 'revert',
]],
'subject-max-length': [2, 'always', 72],
},
};
git pull origin maingit rebase main (preferred) or mergegit push --force-with-lease (safe force push)# Interactive rebase — clean up commits before PR
git rebase -i HEAD~3
# Amend last commit (before push)
git commit --amend --no-edit
# Stash with message
git stash push -m "wip: dashboard refactor"
# Cherry-pick a specific commit
git cherry-pick <commit-hash>
# See what changed in a file
git log --oneline -10 -- path/to/file
# Undo last commit (keep changes staged)
git reset --soft HEAD~1
tools
TypeScript best practices, advanced type patterns, and strict typing. Use when: writing TypeScript code, creating type definitions, fixing type errors, designing type-safe APIs, using generics, creating utility types, or migrating from JavaScript to TypeScript.
development
Testing strategies and patterns for TypeScript/React/Next.js. Use when: writing unit tests, integration tests, e2e tests, setting up Vitest/Jest/Playwright, testing React components, testing API routes, mocking dependencies, or establishing testing patterns.
development
Web application security best practices and OWASP patterns. Use when: implementing authentication, authorization, input validation, sanitization, CSRF/XSS prevention, securing API endpoints, managing secrets, handling file uploads, configuring CORS, or auditing code for security vulnerabilities.
development
React best practices, component patterns, hooks, and state management. Use when: building React components, managing state with Zustand or Context API, writing custom hooks, optimizing renders, handling forms, implementing accessibility, or structuring component architecture.