About branch
branch is a workflow skill for preparing a Git branch before implementation. It checks repository state, follows the repository’s naming style, and protects existing uncommitted work.
Key features
- 01Review branch, status, remotes, and task
- 02Name branches using repository conventions
- 03Branch from the latest default branch
- 04Reuse existing branches and report commits
- 05Preserve uncommitted work
Use cases
- 01Prepare a task branch before coding
- 02Resume an existing branch and inspect its divergence
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ owainlewis/ blueprint --skill branchAfter installing, type/branchin Claude Code to confirm it loaded.
Details
From the project READMEBranch
- Check the current branch,
git status --short, remotes, and task details. - Name it. A name from the user wins as given. Otherwise use
<ticket-id>-<short-kebab-summary>, or just the summary if there is no ticket. Follow the repo's existing naming style. - Fetch, then branch from the latest default branch when a remote exists, unless the user says otherwise.
- If the branch already exists, switch to it and report commits it has beyond the base.
- Report the branch name, its base, and any uncommitted work that was present.
Rules
- Never stash, discard, or force through uncommitted work. If switching is blocked, stop and ask.
- Never invent ticket IDs. If a ticket exists but its ID is not visible, ask; if no human is available, proceed without it and say so in the report.
Comments
Markdown supported