agentsclimarketplace

Gh pr checkout

Skill dceoy/github-cli-agent-skills/skills/gh-pr-checkout

Agent skills for GitHub CLI

Install
npx -y skills add dceoy/github-cli-agent-skills --skill gh-pr-checkout

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Check out a GitHub pull request locally using gh CLI to review or test changes.

SKILL.md

2.1 KB, 480 tokens by cl100k_base, as published. Nobody here has run it

GitHub PR Checkout

When to use

  • The user asks to check out a PR locally.
  • You need to test or review PR changes on your machine.
  • Switching between PRs for code review.

Inputs to confirm

  • PR number, URL, or branch name.
  • Custom local branch name (optional).
  • Target repo if not current (--repo OWNER/REPO).

Workflow

  1. Verify auth and git status:

    gh --version
    gh auth status
    git status
    
  2. Check out the PR:

    gh pr checkout 123
    gh pr checkout https://github.com/OWNER/REPO/pull/123
    gh pr checkout feature-branch
    
  3. Use options as needed:

    # Custom local branch name
    gh pr checkout 123 --branch my-review-branch
    
    # Force update existing branch
    gh pr checkout 123 --force
    
    # Detached HEAD (no local branch)
    gh pr checkout 123 --detach
    
  4. After checkout, verify:

    git branch --show-current
    git log --oneline -5
    

Examples

# Check out PR #123
gh pr checkout 123

# Check out with custom branch name
gh pr checkout 123 --branch review-feature-x

# Force refresh an already checked out PR
gh pr checkout 123 --force

# Interactive selection from recent PRs
gh pr checkout

Flags reference

FlagDescription
-b, --branchLocal branch name (default: head branch name)
--detachCheckout with detached HEAD
-f, --forceReset existing local branch to PR state
--recurse-submodulesUpdate submodules after checkout

Notes

  • Without arguments, interactively select from recent PRs.
  • The --force flag is useful when PR has been updated.
  • Use --detach for quick inspection without creating a branch.

References

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.