jackin-checkout-pr — Claude Code skill: what it does, install
Moves the current repository to a pull request branch with gh pr checkout after checking for local changes. It runs only when explicitly requested.
npx skills add jackin-project/jackin-dev --skill jackin-checkout-pr -a claude-codeWhat jackin-checkout-pr does
The skill accepts a pull request number, URL, or branch name. Numbers and URLs go straight to gh pr checkout; a branch is resolved with gh pr list --head <branch> --state all --json number -q '.[0].number'. If no PR matches, it stops instead of falling back to raw git checkout.
Before changing branches, it runs git status --porcelain and records the current branch. A dirty worktree stops the process and requires the operator to commit, stash, or discard the changes; the skill never stashes automatically. It checks the PR state, asks for confirmation on merged or closed requests, verifies the resulting branch, and reports git switch <old> as the way back.
What it helps with
- move a repository to a pull request branch
- resolve a PR from its head branch
- block checkout when local changes exist
- check whether a PR is still open
- show how to return to the previous branch
Example prompts for the agent
- Explicitly use
jackin-checkout-prto switch to pull request123. - Use
jackin-checkout-prto reach the pull request for branchfeature/login. - Run
jackin-checkout-prwith the pull request URL and check the worktree first.
How to install jackin-checkout-pr
1Skills CLI (Vercel)
npx skills add jackin-project/jackin-dev --skill jackin-checkout-pr -a claude-code2Manually: put the files in place
~/.claude/skills/jackin-checkout-pr/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/jackin-checkout-pr/
1Skills CLI (Vercel)
npx skills add jackin-project/jackin-dev --skill jackin-checkout-pr -a codex2Manually: put the files in place
.agents/skills/jackin-checkout-pr/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add jackin-project/jackin-dev --skill jackin-checkout-pr -a cursor2Manually: put the files in place
.cursor/skills/jackin-checkout-pr/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install jackin-project/jackin-dev jackin-checkout-pr2Manually: put the files in place
.github/skills/jackin-checkout-pr/SKILL.md1Skills CLI (Vercel)
npx skills add jackin-project/jackin-dev --skill jackin-checkout-pr -a gemini-cli2Platform CLI
gemini skills install https://github.com/jackin-project/jackin-dev --path skills/jackin-checkout-prManually: put the files in place
.devin/skills/jackin-checkout-pr/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add jackin-project/jackin-dev --skill jackin-checkout-pr -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about jackin-checkout-pr
How do I install jackin-checkout-pr in Claude Code?
Run npx skills add jackin-project/jackin-dev --skill jackin-checkout-pr -a claude-code, then inspect ~/.claude/skills/jackin-checkout-pr/SKILL.md.
What does jackin-checkout-pr do?
It resolves a pull request from a number, URL, or branch, checks the worktree, and changes branches with gh pr checkout. It then verifies the branch and gives the command for switching back.
What happens when the worktree is dirty?
The skill stops and asks you to commit, stash, or discard the changes. It does not auto-stash them.
Source text
SKILL.md · Apache-2.0
--- name: jackin-checkout-pr description: Use only when the user explicitly requests this skill. Switches the current jackin❯ repo onto a pull request's branch via gh pr checkout, guarding the working tree first. argument-hint: "<PR number | URL | branch>" disable-model-invocation: true license: Apache-2.0 user-invocable: true --- # jackin-checkout-pr Switch the working repo onto a PR's branch via `gh pr checkout`. Accepts a number, URL, or branch name. ## Process 1. **Resolve to a PR number.** Number or URL → pass to `gh pr checkout` directly. Branch name → `gh pr list --head <branch> --state all --json number -q '.[0].number'`; no match → STOP, do not fall back to raw `git checkout`. 2. **Guard the working tree.** `git status --porcelain` — if dirty, STOP and ask the operator to commit, stash, or discard first. Never auto-stash. Note `git branch --show-current` (the way back). 3. **Check the PR is open.** `gh pr view <N> --json state,headRefName`. `MERGED` or `CLOSED` → warn (the branch may be stale) and confirm before proceeding. 4. **Switch.** `gh pr checkout <N>`. Verify `git branch --show-current` matches `headRefName`. 5. **Report.** Switched from `<old>` to `<headRefName>` (PR #N). Way back: `git switch <old>`.
© jackin-project · Apache-2.0 · jackin-project/jackin-dev