← ClaudeAtlas

create-prlisted

Create a PR with change files, screenshots, and issue linking. Run with /create-pr or /create-pr <ISSUE_NUMBER>.
nick-pape/grackle · ★ 15 · AI & Automation · score 73
Install: claude install-skill nick-pape/grackle
# Create PR — Pull Request Creation Workflow This skill creates a pull request for the current branch: syncs with main, builds, generates Rush change files if needed, captures screenshots for visual changes, and opens the PR with proper issue linking. ## Step 0: Detect Context Determine the issue number using this priority: 1. If an argument was provided, use it as `ISSUE_NUMBER` 2. Otherwise, extract from the branch name (pattern: `<user>/<issue>-<feature>`, e.g., `nick-pape/149-agent-subtask-creation` → `ISSUE_NUMBER=149`) 3. If neither yields a number, set `ISSUE_NUMBER=""` (no issue linked — the PR will be created without a `Closes` reference) Set variables for subsequent steps: ```bash OWNER=$(gh repo view --json owner --jq '.owner.login') REPO=$(gh repo view --json name --jq '.name') BRANCH=$(git branch --show-current) ``` If `ISSUE_NUMBER` is set, fetch the issue title for use in the PR title: ```bash gh issue view $ISSUE_NUMBER --json title --jq '.title' ``` ## Step 1: Verify Branch State 1. Ensure not on `main` — if on main, tell the user to create a feature branch and stop 2. Check for uncommitted changes (`git status --porcelain`) — if any, ask the user whether to commit or stash them 3. Check for unpushed commits (`git log @{u}..HEAD` or if no upstream, note that push is needed) 4. Check if a PR already exists for this branch: ```bash gh pr view --json number,url 2>/dev/null ``` If a PR already exists, report its URL and stop. Suggest using `