← ClaudeAtlas

checkoutlisted

Use when checking out a PR, branch, or ref for local work - sets up worktree with context
technicalpickles/pickled-claude-plugins · ★ 10 · AI & Automation · score 74
Install: claude install-skill technicalpickles/pickled-claude-plugins
# Git Checkout ## Overview Check out a PR, branch, or ref into an isolated worktree with relevant context. **Announce:** "Using git:checkout to set up a worktree for {target}..." ## When to Use - User wants to review a PR locally - User wants to work on a specific branch in isolation - User provides PR URL/number or branch name - Following `git:inbox` when user picks a PR ## Input Formats Accept: - Full PR URL: `https://github.com/{owner}/{repo}/pull/{number}` - Short PR: `{repo}#{number}` or `#{number}` (infer repo from cwd) - PR number only: `{number}` (infer owner/repo from git remote) - Branch name: `feature/auth`, `main`, etc. - Ref: commit SHA, tag ## Workflow ### For PRs #### 1. Parse PR Reference ```bash # Get owner/repo from current directory if needed gh repo view --json owner,name -q '"\(.owner.login)/\(.name)"' ``` #### 2. Fetch PR Details ```bash gh pr view {number} --json title,body,author,state,baseRefName,headRefName,url,reviews,reviewRequests ``` #### 3. Set Up Worktree **REQUIRED:** Use `superpowers:using-git-worktrees` skill for directory selection. ```bash # Fetch the PR branch git fetch origin {headRefName} # Create worktree git worktree add .worktrees/pr-{number}-{short-desc} origin/{headRefName} ``` Naming: `pr-{number}-{2-3-word-description}` (e.g., `pr-1234-add-oauth`) #### 4. Present Context ```markdown ## PR #{number} Ready for Review **Title:** {title} **Author:** @{author} **Branch:** {headRefName} → {baseRefName} **URL:** {fu