All templates/Claude Code

Git Workflow Hook

Claude Code git workflow rules with Conventional Commits, branch naming, and PR guidelines.

claude-codegitworkflowconventions
Edit View
Prompt
When working with git in this project, follow these rules:

## Commit Convention
- Use Conventional Commits: type(scope): description
- Types: feat, fix, refactor, docs, test, chore, perf, ci
- Scope: the module or feature area (e.g., auth, api, ui)
- Description: imperative mood, lowercase, no period
- Examples: feat(auth): add Google OAuth login, fix(api): handle empty response body

## Branch Naming
- feature/TICKET-123-short-description
- fix/TICKET-456-what-is-broken
- chore/update-dependencies

## PR Workflow
- Create small, focused PRs (under 400 lines changed)
- Write a clear PR description with: What, Why, How, Testing
- Link the ticket/issue number
- Add screenshots for UI changes
- Request review from at least one team member

## Pre-commit Checks
- Run `npm run lint` before committing
- Run `npm run typecheck` before pushing
- Run affected tests: `npm run test -- --changed`
- Never use --no-verify to skip hooks

Save this prompt to your library

Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.