git-operations
Git Operations
Activate when creating commits, managing branches, creating pull requests, resolving conflicts, or following Git workflows.
Commit Format
Follow the Conventional Commits specification:
type(scope): description
optional body
optional footer
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
Subject line rules:
- Keep under 50 characters
- Lowercase after type prefix
- No period at the end
- Use imperative mood ("add" not "added" or "adds")
Body (optional): Wrap at 72 characters. Focus on the what and how — never describe the changes themselves, as the git diff handles that.
Footer (optional): Reference issues (Closes #123), note breaking changes (BREAKING CHANGE: ...).
NEVER include attribution — no Co-Authored-By, Signed-off-by, or similar footers. This rule has no exceptions.
Examples:
# Single-line (preferred for most commits)
feat(auth): add JWT authentication
fix(api): handle null values in user response
docs(readme): add installation instructions
chore(deps): bump plugin versions
# With body and footer
feat(api): add user search endpoint
Implement full-text search across user names and emails using
PostgreSQL's full-text search capabilities.
BREAKING CHANGE: API now requires PostgreSQL 12+
Closes #789
PR Format
Title matches commit format. Body is a bullet list of changes only.
gh pr create --title "feat(auth): add JWT authentication" --body "- Add JWT generation and validation
- Implement refresh token rotation
- Add authentication middleware"
Rules:
- No attribution (no "Generated with Claude Code" or similar)
- No PR templates or boilerplate sections
- No "Summary", "Test Plan", or other headers
- Just the changes as bullet points
- Keep it minimal and scannable
PR Workflow
- Local CI:
mise run ci— fix until 0 failures - Commit: Conventional commit, no attribution
- Gitleaks: Scan committed changes for secrets (
/core:security) - Push:
git push -u origin <branch> - Create PR:
gh pr createwith minimal format (title + bullets) - Watch CI:
gh pr checks --watch(wait for CI to complete) - After CI passes (if using bees):
bees close <task-id>git add .bees/ && git commit -m "chore(bees): close <task-id>"git push
- Notify: "CI passed, PR ready for merge review"
- Cleanup (after user merges):
git checkout main && git pullgit branch -d <branch>
- Continue:
bees readyfor next task
Merge Strategy
Always squash merge PRs:
gh pr merge <number> --squash
Never use regular merge or rebase merge for PRs. Squash merge keeps main history clean with one commit per PR.
Branch Naming
<type>/<description>
<type>/<issue-number>-<description>
Examples: feature/user-authentication, fix/456-null-pointer-error, chore/update-dependencies
GitHub PR Commands
gh pr create --title "type(scope): description" --body "- change 1"
gh pr create --draft # Draft PR
gh pr list # List PRs
gh pr view 123 # View PR
gh pr checkout 123 # Checkout PR locally
gh pr merge 123 --squash # Squash merge PR
Key Rules
- No attribution: Never add
Co-Authored-By,Signed-off-by, or similar to commits. No "Generated with Claude Code" or similar in PRs - Squash merge PRs: Always use
gh pr merge --squash - Single-line commits preferred: Use body only when explanation is needed
- Never merge without approval: Always wait for user to approve PR merges
- Clean up after merge: Delete branches locally and remotely
- Use gcms: Generate commit messages with
/core:gcmsskill
References
For detailed command references and advanced topics, see:
- commands.md — Branch management, staging, committing, viewing changes, stashing, remote operations, tags, aliases
- advanced.md — Rebasing, merge strategies, conflict resolution, interactive rebase, history management, cherry-picking, bisect, submodules
- troubleshooting.md — Common issues (wrong branch, sensitive data, recover deleted branch, bad merge) and best practices
More from vinnie357/claude-skills
material-design
Guide for implementing Material Design 3 (Material You). Use when designing Android apps, implementing dynamic theming, or following Material component patterns.
18elixir-testing
Guide for Elixir testing with ExUnit. Use when writing unit tests, implementing property-based tests, setting up mocks, or organizing test suites.
16elixir-anti-patterns
Identify and refactor Elixir anti-patterns. Use when reviewing Elixir code for smells, refactoring problematic patterns, or improving code quality.
15phoenix-framework
Guide for Phoenix web applications. Use when building Phoenix apps, implementing LiveView, designing contexts, setting up channels, or integrating Tidewave MCP dev tools.
14nushell
Guide for using Nushell for structured data pipelines and scripting. Use when writing shell scripts, processing structured data, or working with cross-platform automation.
14documentation-writing
Guide for writing technical documentation. Use when creating README files, API documentation, guides, or inline code documentation.
12