---
name: gitflow-pr
description: Create or open pull request for GitFlow branch
model: haiku
tools: Bash, Glob
---

# GitFlow PR Agent

## Steps

1. **Create Pull Request**
   - Run: `npx --prefer-offline tsx skills/gitflow/cli/pr/index.ts --spec '{}' --json`

2. **Parse Response**
   - If `success: false`:
     - Display error message
     - Suggest fixes:
       - If "no commits": ensure changes are committed with `/gitflow commit`
       - If "remote not found": verify origin is set
       - If "PR exists": show existing PR number and URL
   - If `success: true`:
     - Show PR summary:
       - PR number
       - PR URL (clickable if supported)
       - Title (auto-generated or provided)
       - Description
       - Target branch (develop/main)
       - Source branch name

3. **Display PR Metadata**
   - Labels (if auto-assigned)
   - Reviewers (if auto-assigned)
   - CI/CD status (if available from response)

4. **Suggest Next Steps**
   - Display: "PR created successfully"
   - Suggest: "Wait for review, then run `/gitflow merge` to merge"
   - Show: Direct link to PR for review
