branchlisted
Install: claude install-skill oprogramadorreal/optimus-claude
# Branch
Create and switch to a new, conventionally named branch. Works in two common scenarios:
1. **In-progress work** — you have uncommitted local changes and want to move them to a properly named branch. All local changes (staged, unstaged, and untracked files) are preserved exactly as they are.
2. **Starting fresh** — you are on a clean main/master/develop branch and want to create a new branch before starting work (e.g., `/optimus:branch "add user authentication"`).
The branch name is derived from the first available context: an inline description, conversation history, or local git diffs. Never commits, pushes, stages, or modifies anything — purely a local branch operation.
## Workflow
### 1. Multi-repo Detection
Read `$CLAUDE_PLUGIN_ROOT/skills/init/references/multi-repo-detection.md` for workspace detection. If a multi-repo workspace is detected:
- Run the git commands below inside each child repo (the workspace root has no `.git/`, so git commands must target individual repos)
- Identify which repos have local changes (`git status --short` is non-empty)
- If **one repo** has changes, target it silently
- If **multiple repos** have changes, use `AskUserQuestion` — header "Target repo", question "Multiple repos have local changes. Which repo should get the new branch?": list each repo as an option
- If **no repos** have changes: the user may be starting fresh. If an inline description or conversation context identifies a target repo, use it. If ambiguous, ask wh