git-branch-createlisted
Install: claude install-skill pivoshenko/pivoshenko.ai
# Create Branch
Make + checkout new branch. No confirm.
## Flow
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:
- Default `main`. Fall back `master`.
- 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 remote ref — current HEAD is the base).
6. Print branch + base.
## Naming
`<type>/<short-kebab-desc>` or `<type>/<scope>-<short-kebab-desc>`.
### Type
Same set + picks as `git-commit`. See that skill's **Type pick** + **Tiebreakers** for disambiguation. Quick list: `feat|fix|perf|refactor|docs|test|build|ci|chore`.
### Desc
- kebab-case. Not camel / snake.
- Imperative present: `add`, `fix`, `remove`. Not `added`, `fixes`.
- < ~50 chars.
- No ticket IDs unless asked. Why -> history readable + tool-agnostic; trackers come+go, branches stay. Asked -> suffix: `feat/add-auth-middleware-PROJ-123`.
### Examples
- `feat/add-oauth-login`
- `fix/api-time