branchlisted
Install: claude install-skill hashgesh/skill-hive
# Branch Skill
Create a branch with a consistent name from the right base branch.
## When Invoked
1. **Check the working tree**: `git status --porcelain`. If there are uncommitted changes, ask: carry them to the new branch (the default with `git switch`), stash them (`git stash push -u -m "before {name}"`), or stop.
2. **Gather the input** - ask for whatever is missing:
- **Type**: one of the prefixes below.
- **Description**: a few words, or an **issue number**. With an issue and `gh` available, read it:
`gh issue view {n} --json number,title,labels`
and suggest the type from its labels (`bug` → `fix`, `enhancement`/`feature` → `feat`, `documentation` → `docs`).
3. **Follow the repo's convention**: look at existing branch prefixes and reuse them (e.g. `feature/` vs `feat/`, `bugfix/` vs `fix/`):
`git fetch --prune origin && git for-each-ref --format='%(refname:lstrip=3)' refs/remotes/origin | grep / | cut -d/ -f1 | sort | uniq -c | sort -rn`
With no existing convention, use the short prefixes below.
4. **Build the name**: `{prefix}/{issue-}{slug}`, e.g. `feat/42-add-login-endpoint`, `fix/null-token-crash`.
- Slug: lowercase ASCII, words joined with `-`, no other punctuation, max ~50 characters, drop filler words.
- Transliterate non-ASCII letters (`ç→c ğ→g ı→i ö→o ş→s ü→u`, `ä→a ß→ss é→e` …) instead of dropping them.
- Validate: `git check-ref-format --branch "{name}"` (non-zero exit = invalid).
- Must not exist: `git show-ref --verify --