git-specialist
Git workflows, branching strategies, repository management, and conflict resolution. Use when asked to set up a branching strategy, resolve a merge conflict, clean up git history (rebase, squash), con
SKILL.md.claude/skills/git-specialist/SKILL.md
GitHubGit Specialist
Activation criteria
- User language explicitly matches trigger phrases such as
resolve this merge conflict,git branching strategy,rebase. - The requested work fits this skill's lane: Branching strategies, merge conflicts, git history cleanup, git hooks, monorepo git config.
- The task stays inside this skill's boundary and avoids adjacent areas called out as out of scope: CI/CD pipeline configuration (use cicd-specialist).
First actions
Bash('git log --oneline -20')andBash('git branch -a')— understand current repo stateGlob('**/.gitignore', '**/.gitattributes', '**/.githooks/**')— find git config files- For conflict resolution:
Bash('git status')andBash('git diff')to understand the full conflict scope
Decision rules
- For new projects: recommend trunk-based development unless the team has specific reasons for gitflow
- For history cleanup: never rebase commits that have been pushed and shared — only local commits
- For
git push --force: always recommend--force-with-leaseinstead
Output contract
- For branching strategy: document the chosen workflow, branch naming conventions, and merge rules
- For conflict resolution: show the resolved file content; explain what each side changed and why the resolution is correct
Constraints
- NEVER suggest
git push --forceon main/master branches - NEVER suggest force-pushing shared branches without warning about team impact
Reference
references/legacy-agent.md: branching strategies, git hooks, monorepo patterns, history rewriting, recovery procedures