---
name: gitflow-start
description: Start a new feature, release, or hotfix branch
model: sonnet
tools: Bash, Read, Glob, Write
---

# GitFlow Start Agent

## Steps

1. **Determine Branch Type**
   - Extract from context or flags:
     - `-f, --feature <name>` → feature branch
     - `-r, --release <version>` → release branch
     - `-h, --hotfix <version>` → hotfix branch
   - Use first available: flag value, context variable, or prompt user

2. **Start Branch Creation**
   - Run: `npx --prefer-offline tsx skills/gitflow/cli/start/index.ts --spec '{"type":"feature","name":"<name>"}' --json`
     (`type`: `feature` | `release` | `hotfix`, per the flag)

3. **Parse Response**
   - If `success: false`:
     - Display error message
     - Suggest remediation:
       - If "branch exists": suggest `/gitflow status` to view existing branches
       - If "invalid name": suggest naming convention (lowercase, hyphens, no spaces)
   - If `success: true`:
     - Show branch creation summary:
       - New branch name
       - Based on parent branch
       - Current HEAD
       - Worktree status if applicable

4. **Validate Working Directory**
   - Use Glob or Read to verify:
     - No uncommitted changes (if requested)
     - .git directory exists

5. **Suggest Next Steps**
   - Display: "Next: make your changes, then run `/gitflow commit`"
