git-branch-createlisted
Install: claude install-skill pivoshenko/pivoshenko.ai
# Create Branch
Make + checkout new branch. No confirm.
## Flow
0. User named an issue (`#42`, "the oauth issue", "start 42") -> stop, this is `git-issue-start`'s flow: it assigns the issue, derives the type from its `type: *` label, and branches using the naming rules below. Why -> branching from an issue without assigning it leaves the tracker claiming nobody picked the work up
1. Parallel: `git status` + `git branch --show-current`
2. Dirty tree -> stop. Tell user to stash or commit first. Why -> `checkout -b` carries staged + unstaged changes into the new branch silently, mixing them with future work
3. Pick base:
- Detect, don't assume: `git symbolic-ref --short refs/remotes/origin/HEAD` -> strip the `origin/`. Ref missing (never fetched) -> `git remote set-head origin -a`, re-read. No remote -> `main`, fall back `master`. Why -> a repo based on `develop` or `trunk` gets branched off the wrong parent otherwise, and the mistake surfaces at PR time as a diff full of other people's commits
- On feature branch + user wants to branch off it -> use current. Skip step 4's fetch; go to step 5 "off current" variant
4. Exists? `git show-ref --verify --quiet refs/heads/<name>` -> 0 = stop, surface conflict, no overwrite. Why -> `checkout -b` errors anyway, but check early so message is clean + no half-state
5. Create:
- Off `<base>` (default): `git fetch origin <base>` + `git checkout -b <name> origin/<base>`
- Off current: `git checkout -b <name>` (no fetch, no remo