Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Branch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/p2p2sp-branch)
---
name: branch
description: Creates a local git branch of a viber.yml branch type. Only on the user's explicit request.
argument-hint: <type> [#issue] [text]
allowed-tools: Bash(${CLAUDE_SKILL_DIR}/scripts/branch.sh:*)
user-invocable: true
---
# branch
One local branch of a type of `branching:` in `.claude/viber.yml`, cut from the freshly fetched remote base. Run the script on `/viber:branch` and on the user's explicit request in a sentence, never otherwise.
Run `"${CLAUDE_SKILL_DIR}/scripts/branch.sh" "<type>" ["<issue>"] ["<text>"]` as one Bash line: the type is the key of a branch type, the issue `#N` or an issue link (only that form, never a bare number) when the user gave one, the text what the branch is for. With an issue and no text the script takes the slug from the issue's title. Never resolve the base, the remote or the name yourself.
When the script prints `ask: type`, the first word of the argument was no type and nothing was created: `type:` lines are the keys of the types in file order, `text:` the whole argument. Ask the user for the type through `AskUserQuestion`: the first 4 `type:` lines in file order as the options, any other type by free text. Then run the script again with the chosen type before the whole `text:` (the issue, if any, stays inside it).
When the script prints `ask: text`, the type had neither text nor issue and nothing was created. Ask the user in prose what the branch is for (no `AskUserQuestion`), then run the script again with the type and the answer as text.
When the script prints `STOP: no slug came out of the text`, the text (or the issue's title) held no letter or digit and nothing was created. Ask the user in prose for another text (no `AskUserQuestion`), then run the script again with the type, the issue if any, and the new text.
Report the script's lines: `branch:` the new name, `base:` the remote branch it was cut from, `start:` the commit it starts at. A `note:` line means the fetch failed: the branch was cut from the last known remote base. Tell the user plainly that the base was not refreshed and the remote was not checked for the name. An `issue:` line means the type has no `{issue}` in its `name`: tell the user that the type has no `{issue}`, so the issue number is not in the branch name. A `STOP:` line is the reason nothing was created (no `branching:` group, a failed lookup of the issue title, a type lacking `base`, `name` or `target`, a name already taken locally or on the remote, and the others): relay its message to the user as it stands. Uncommitted changes go along to the new branch; when they conflict with the base, git's error follows `STOP:`: relay git's error as it is and tell the user that no branch was created and the changes are intact. Show no preview of the name before the run, and never push the branch.