Agent skill

Setup PR Branch

by Nuitka in Nuitka/Nuitka

Set up a local branch that tracks a fork PR and can be pushed back to it, without fetching the whole fork.

AGPL-3.0Auto-check passedDevelopment

Install Setup PR Branch

skills CLI
$ npx skills add Nuitka/Nuitka --skill setup-pr-branch -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Nuitka/Nuitka setup-pr-branch --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Nuitka/Nuitka.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/setup-pr-branch .claude/skills/setup-pr-branch && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
setup-pr-branch
GitHub stars
15k
Token cost
~1.1k tokens
SKILL.md length
541 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Set up a local branch that tracks a fork PR and can be pushed back to it, without fetching the whole fork.

  • Works in 6 steps: Discover the PR head → Create/repair the fork remote → Fetch only the PR branch → …
  • The user asks to checkout/setup a PR locally
  • SKILL.md covers 1. Discover the PR head, 2. Create/repair the fork remote, 3. Fetch only the PR branch and 4. Check out with tracking, plus 3 more sections
  • Calls git and gh

What it does

Setup PR Branch is an agent skill from Nuitka/Nuitka. Set up a local branch that tracks a fork PR and can be pushed back to it, without fetching the whole fork. Use when the user asks to "checkout/setup a PR locally", "setup tracking for PR

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with Git, GitHub and Python. The repository describes itself as: Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4-3.14. You feed it your Python app, it does a lot of clever things, and spits out an… The licence is AGPL-3.0.

When your agent uses it

  • The user asks to checkout/setup a PR locally
  • Setup tracking for PR

Example prompts

  • “checkout/setup a PR locally”
  • “/setup-pr-branch”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Discover the PR head
  2. Create/repair the fork remote
  3. Fetch only the PR branch
  4. Check out with tracking
  5. Push back (updates the PR)
  6. Reviewing: PRs must not auto-close issues

What it can do on your machine

Read from SKILL.md and the folder at commit 30b5b77. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Setup PR Branch loads about 1.1k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 541 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Nuitka/Nuitka at commit 30b5b77, republished under its AGPL-3.0 licence (© Nuitka). 541 words, ~1,087 tokens.

Download SKILL.mdSave it as .claude/skills/setup-pr-branch/SKILL.md (or your agent's skills folder).
name
setup-pr-branch
description
Set up a local branch that tracks a fork PR and can be pushed back to it, without fetching the whole fork. Use when the user asks to "checkout/setup a PR locally", "setup tracking for PR

Set Up a Fork PR Branch for Pushing

The goal is a local branch that (a) tracks the fork's PR branch and (b) can be pushed back to update the PR. Two facts matter:

  • GitHub's refs/pull/N/head is read-only; you cannot push to it.
  • Maintainers push to a fork PR by pushing to the fork itself. When "allow edits from maintainers" is enabled, GitHub grants the maintainer temporary write access to the fork's PR branch, so the push updates the PR head directly.

So a fork remote must have both its fetch and push URLs pointing at the fork (git@github.com:<owner>/Nuitka.git).

1. Discover the PR head

bash
gh pr view <N> --json headRepositoryOwner,headRefName,baseRefName \
  --jq '{owner: .headRepositoryOwner.login, branch: .headRefName, base: .baseRefName}'

Remember owner and branch. owner is usually the GitHub username, lowercase.

2. Create/repair the fork remote

Use the owner's login as the remote name. If it does not exist yet:

bash
git remote add <owner> git@github.com:<owner>/Nuitka.git

git remote add sets both fetch and push URLs to the fork. If a previous wrong setup left a --push override, restore it to the fork:

bash
git remote set-url --push <owner> git@github.com:<owner>/Nuitka.git

Do not use git remote update <owner> or git fetch <owner> with no refspec: that fetches every branch of the fork.

3. Fetch only the PR branch

bash
git fetch <owner> <branch>

With the default +refs/heads/*:refs/remotes/<owner>/* refspec, this fetches exactly one branch and creates/updates refs/remotes/<owner>/<branch>, nothing else.

4. Check out with tracking

Name the local branch pr-<N> for clarity (the fork's branch name is often generic). This also makes it unambiguous which PR you are on.

bash
git checkout -b pr-<N> --track <owner>/<branch>

If the branch already exists, just fix its upstream instead:

bash
git branch --set-upstream-to=<owner>/<branch> pr-<N>

5. Push back (updates the PR)

bash
git push <owner> HEAD:<branch>

Use git push --force <owner> HEAD:<branch> only after a rebase. GitHub applies these commits to the open PR automatically.

Show full SKILL.md (275 more words)Show less

6. Reviewing: PRs must not auto-close issues

When reviewing a PR, check that its body does not auto-close the issues it references. Nuitka merges PRs into develop, but issues are closed only once their solution has landed on main (the release/maintenance branch). A closing keyword would close the issue as soon as the PR is merged to develop, i.e. before the fix is released.

Reject/flag closing keywords such as:

  • Fixes #N, fixes #N, Fix #N
  • Closes #N, closes #N, Close #N
  • Resolves #N, resolves #N, Resolve #N
  • the same with a colon (Fixes: #N), and any alternative spelling GitHub recognizes.

Prefer a plain reference in the "Why was it initiated?" list, e.g. - #N, which links the issue without closing it. If the PR already uses a closing keyword, ask the contributor to change it, or edit the body yourself:

bash
gh api -X PATCH repos/Nuitka/Nuitka/pulls/<N> -f body="$(cat fixed-body.md)"

Notes / pitfalls

  • gh pr checkout <N> fetches the entire fork; prefer the manual steps above to fetch only the single PR branch.
  • A pre-push hook (autoformat) runs git diff <remote>..<local> and can list many files when the local and remote branches have diverged; that is only the check, not the push payload. If the hook itself hangs or is slow, --no-verify skips it, but run the autoformatter yourself first.
  • If git status reports the branch "diverged" from <owner>/<branch>, it is usually a stale remote-tracking ref: git fetch <owner> <branch> refreshes it.
  • Because the local branch is named pr-<N> while the remote branch keeps the fork's name, a bare git push refuses (push.default=simple requires the names to match). Use git push <owner> HEAD:<branch>, or git config push.default upstream (repo-local) to make bare git push follow the upstream.

© Nuitka, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/setup-pr-branch of Nuitka/Nuitka.

Open the folder on GitHubat commit 30b5b77

Compare with similar skills

Setup PR Branch next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Setup PR Branch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Setup PR Branch this skillNuitka/Nuitka15k—~1.1kAutomated safety check: PassAGPL-3.0
pybind11 Release Publicationpybind/pybind1118k—~2.5kAutomated safety check: PassCustom licence
GitHub Fork and PR Submissionjxxghp/MoviePilot12k—~1.1kAutomated safety check: NotesGPL-3.0
GitHub PR Descriptionlucasvieirasilva/nx-plugins153—~1.4kAutomated safety check: PassMIT
PR Review Comments Fetcherwarpdotdev/warp65k1 repos~1.1kAutomated safety check: PassAGPL-3.0
Git Batch Commitcat-xierluo/legal-skills717—~1.7kAutomated safety check: NotesMIT

Similar skills

  • Walks a maintainer through publishing a pybind11 release after the preparation PR merges, with preflight checks, confirmations before each push and a GitHub release.

    18k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Submits code changes as a GitHub pull request through an isolated Git clone, reusing or creating your fork and pushing only after you confirm the real diff.

    12k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check: notes
  • GitHub PR Description

    lucasvieirasilva/nx-plugins

    Generates a GitHub Pull Request description for this repository from the commits on the current branch, filling in .github/PULLREQUESTTEMPLATE.md (Current Behavior / Expected Behavior / Related…

    153 GitHub stars~1.4k tokensUpdated 10 days ago
    DevelopmentAuto-check passed
  • Pulls every review comment from the current branch's GitHub pull request into Warp's code review panel, then waits for your direction.

    65k GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed
  • Git Batch Commit

    cat-xierluo/legal-skills

    智能 Git 批量提交快捷按钮。触发词:"git 提交"、"批量提交"、"拆分提交"、"整理提交",或用户明确要把已暂存变更拆成多个聚焦 commit 时使用。只负责 commit 拆分和提交信息生成;分支、PR、push、merge、Issue 关闭语义以 git-workflow 为准。提交完成后,若仓库内存在 skill-publish-sync 或 subtree-publish…

    717 GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check: notes
  • Datadog Data Source Generator

    DataDog/terraform-provider-datadog

    Official

    Generates a Datadog Terraform provider data source from an OpenAPI operation with tfgen and opens a review-ready GitHub PR with a risk scan and testing guide.

    468 GitHub stars~2.7k tokensUpdated today
    DevOps & CloudAuto-check passed

More from Nuitka/Nuitka

  • Diagnose and fix ModuleNotFoundError in Nuitka standalone binaries caused by missing implicit imports.

    15k GitHub stars~519 tokensUpdated today
    Auto-check passed
  • Reproduce macOS Nuitka issues across Python distributions and GitHub Actions Python packaging.

    15k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Create a Nuitka planning document under .planning/ from the standard template.

    15k GitHub stars~468 tokensUpdated today
    Auto-check passed
  • Create Mre

    Nuitka/Nuitka

    Create or reduce a Minimally Reproducible Example (MRE) for a Nuitka bug from a larger reproducer.

    15k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Obs Build Logs

    Nuitka/Nuitka

    Access and diagnose openSUSE Build Service (OBS) package build logs.

    15k GitHub stars~849 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Setup PR Branch

What does Setup PR Branch do?

Set up a local branch that tracks a fork PR and can be pushed back to it, without fetching the whole fork. Setup PR Branch is an agent skill from Nuitka/Nuitka. Set up a local branch that tracks a fork PR and can be pushed back to it, without fetching the whole fork.

When should I use Setup PR Branch?

Setup PR Branch fits situations like: the user asks to checkout/setup a PR locally; setup tracking for PR.

How do I install Setup PR Branch in Claude Code?

Run `npx skills add Nuitka/Nuitka --skill setup-pr-branch -a claude-code`. Or copy the skill folder (.agents/skills/setup-pr-branch in Nuitka/Nuitka) into .claude/skills/setup-pr-branch in your project. Claude Code loads it when a task matches its description.

How do I install Setup PR Branch in Codex?

Run `npx skills add Nuitka/Nuitka --skill setup-pr-branch -a codex`. Or copy the skill folder (.agents/skills/setup-pr-branch in Nuitka/Nuitka) into .agents/skills/setup-pr-branch in your project. Codex loads it when a task matches its description.

Can I use Setup PR Branch in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Nuitka/Nuitka --skill setup-pr-branch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/setup-pr-branch, .gemini/skills/setup-pr-branch, .github/skills/setup-pr-branch and .opencode/skills/setup-pr-branch in your project.

What does Setup PR Branch need to run?

Going by SKILL.md and its folder, Setup PR Branch needs the command-line tools its instructions call (git and gh).

Does Setup PR Branch access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Setup PR Branch safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Setup PR Branch use?

Setup PR Branch is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Setup PR Branch use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Setup PR Branch?

Skills that share tags, products or a category with Setup PR Branch: pybind11 Release Publication (pybind/pybind11, 18k stars), GitHub Fork and PR Submission (jxxghp/MoviePilot, 12k stars), GitHub PR Description (lucasvieirasilva/nx-plugins, 153 stars) and PR Review Comments Fetcher (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Setup PR Branch?

Nuitka (a GitHub organization) maintains it in Nuitka/Nuitka, which has 15,181 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.

Source: Nuitka/Nuitka on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.