From skills
Guides Git branching: create and switch branches, naming conventions (feature/, fix/, chore/), list and clean up branches, sync with upstream, and avoid destructive operations without confirmation. Use when the user asks about branches, wants a new branch, or needs help untangling local branch state.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skills:git-branchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. If there are uncommitted changes, either commit, stash, or discard—never assume it is safe to switch without checking `git status`.
git status.main vs master) with git symbolic-ref refs/remotes/origin/HEAD or git branch -a when unclear.git switch -c <branch> (or git checkout -b <branch> on older Git).main): git fetch origin then git switch -c <branch> origin/main (adjust remote and branch names).Prefer linear history off the team’s agreed default branch unless the user explicitly wants something else.
| Prefix | Use for |
|---|---|
codex/ | Codex-created branches unless the user or repo convention says otherwise |
feature/ | New user-facing behavior |
fix/ | Bug fixes |
chore/ | Tooling, deps, formatting |
docs/ | Documentation only |
Use lowercase and hyphens: codex/oauth-refresh-token.
git branch -vgit branch -vvgit branch -agit switch <existing-branch> — fails if it would overwrite local changes without a merge strategy; surface the error and recommend stash/commit.git branch -m <new-name>git branch -d <branch>git branch -D <branch>git push origin --delete <branch> — only after explicit user confirmation; state impact for collaborators.git fetch origingit pull --ff-only when fast-forward is desired; if it fails, explain non-FF situation and options (rebase vs merge) instead of blind --force.git push --force to shared default branches (main, master, develop) unless the user clearly requests it and understands the risk.reset --hard, require explicit user intent; offer safer alternatives first (git stash, git restore).Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub iammattburns/skills --plugin skills