/checkout - Git Branch Creation
The manual counterpart of build's Branch stage. Both assemble the name by the same rules.
Input
$ARGUMENTS may contain context or a ticket number. Trim whitespace; if empty, analyze the Git changes alone. If non-empty, treat it as a hint for the branch name scope or ticket ID.
Execution
- Run
git statusandgit diff HEADin parallel to read the changes. Plaingit diffhides staged changes - Settle on one branch name from the changes and
$ARGUMENTS(§ Branch Naming) - Create the new branch via
git checkout -b <the settled name>
Branch Naming
Assemble the name and read the type per ${CLAUDE_SKILL_DIR}/references/branch-naming.md.
Error Handling
| Error | Treatment |
|---|---|
| No changes | Do not create a branch; report that there are no changes |
| Branch exists | Settle on another name and create that instead |
| No git repository | Do not create a branch; report that this is not a git repo |