Agent skill

Refresh Stale PR

by jggonz in jggonz/os8088

Bring one of the maintainer's own stale pull requests (a branch on jggonz/os8088 that main has moved past) back to mergeable - merge main into it in a scratch worktree, decide whether it is still…

MITAuto-check passedDevelopment

Install Refresh Stale PR

skills CLI
$ npx skills add jggonz/os8088 --skill refresh-stale-pr -a claude-code

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

GitHub CLI
$ gh skill install jggonz/os8088 refresh-stale-pr --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/jggonz/os8088.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/refresh-stale-pr .claude/skills/refresh-stale-pr && 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
refresh-stale-pr
GitHub stars
104
Token cost
~2.6k tokens
SKILL.md length
1,236 words
Files
2
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Bring one of the maintainer's own stale pull requests (a branch on jggonz/os8088 that main has moved past) back to mergeable - merge main into it in a scratch worktree, decide whether it is still…

  • Works in 9 steps: Which PR, and is this the right skill → Preflight - a worktree of its own → Merge main in → …
  • The user asks whether a PR is still valid
  • SKILL.md covers 1. Which PR, and is this the…, 2. Preflight - a worktree of…, 3. Merge main in and 4. Is it still valid, and…, plus 6 more sections
  • Calls git, gh and python3

What it does

Refresh Stale PR is an agent skill from jggonz/os8088. Bring one of the maintainer's own stale pull requests (a branch on jggonz/os8088 that main has moved past) back to mergeable - merge main into it in a scratch worktree, decide whether it is still valid and still needed against what main now contains, fix what main's drift broke or what the PR got wrong, run the gates and an end-to-end check against real build artefacts, push to the PR's own branch, rewrite the PR body's validation, and (only when asked) squash-merge it. Use when the user asks whether a PR is…

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `LESSONS.md`).

It sits in Development, covering Pull requests and Git worktrees. The licence is MIT.

When your agent uses it

  • The user asks whether a PR is still valid
  • Bring main into an older PR
  • Make a stale PR ready to merge

Example prompts

  • “s own branch, rewrite the PR body”
  • “still valid”
  • “refresh”
  • “/refresh-stale-pr”

Requirements

  • Python 3

Workflow steps

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

  1. Which PR, and is this the right skill
  2. Preflight - a worktree of its own
  3. Merge main in
  4. Is it still valid, and still needed?
  5. Fix and improve
  6. Verify
  7. Push and rewrite the PR
  8. Merge - only on the user's word
  9. Clean up and hand back

What it can do on your machine

Read from SKILL.md and the folder at commit 95f7e97. 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
    • python3
    • make

    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

Refresh Stale PR loads about 2.6k tokens when it runs. Until then it costs about 178 tokens; SKILL.md has 1,236 words of instructions outside code blocks.

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

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 jggonz/os8088 at commit 95f7e97, republished under its MIT licence (© jggonz). 1,236 words, ~2,574 tokens.

Download SKILL.mdSave it as .claude/skills/refresh-stale-pr/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
refresh-stale-pr
description
Bring one of the maintainer's own stale pull requests (a branch on jggonz/os8088 that main has moved past) back to mergeable - merge main into it in a scratch worktree, decide whether it is still valid and still needed against what main now contains, fix what main's drift broke or what the PR got wrong, run the gates and an end-to-end check against real build artefacts, push to the PR's own branch, rewrite the PR body's validation, and (only when asked) squash-merge it. Use when the user asks whether a PR is "still valid", to "refresh", "revive", "update" or "bring main into" an older PR, or to make a stale PR ready to merge. For a PR from someone else's fork use review-fork-pr instead.

Refresh a stale pull request

The PRs this is for are the maintainer's own: a branch on jggonz/os8088, usually one focused change, cut from a main that has since moved by tens of commits. Nobody else is going to push to it. The question is never "is this code good in the abstract" - it was good enough to open - but "is it still right on the main that exists today, and does anyone still need it".

It exists because PR #200 (the imager keeping SYSTEM.CFG) was 28 commits stale, merged with no conflict at all, passed every test it shipped - and was still wrong on today's main: #203 had taken FAT16 volumes to 2GB and the in-OS installer writes partition type 06h past 32MB, which the PR's reader refused. Git, the PR's tests and the fast tier all reported nothing. Finding it took reading what main gained around the PR, not in its files. Read LESSONS.md before step 3.

The user is the maintainer. Decisions that are theirs - close a PR, change its scope, merge it - go through AskUserQuestion or wait for their word; everything else you decide and record in the PR body.

1. Which PR, and is this the right skill

The number(s) may arrive as the argument (/refresh-stale-pr 200, or 200 201 for several, done one at a time). With none, list the candidates - the open PRs whose base has moved - and ask:

sh
gh pr list --state open --json number,title,headRefName,headRepositoryOwner,updatedAt,isDraft

Then the facts:

sh
gh pr view <N> --json number,title,state,isDraft,headRefName,headRepositoryOwner,\
baseRefName,mergeable,mergeStateStatus,additions,deletions,changedFiles,body,commits
gh pr view <N> --json comments,reviews --jq '.comments[].body, .reviews[].body'
git fetch -q origin main <headRef>
BASE=$(git merge-base origin/main origin/<headRef>)
git rev-list --count $BASE..origin/main                     # how stale
gh pr diff <N> --name-only
  • headRepositoryOwner is not jggonz ⇒ stop and use review-fork-pr: pushing to origin would not update a fork's PR (that skill's LESSONS §1).
  • state is not OPEN ⇒ say so and stop.
  • Draft ⇒ ask whether it is meant to be finished now; a draft is often parked on purpose.

Tell the user the shape in two lines: what it does, how far behind, which files, conflicting or not.

2. Preflight - a worktree of its own

sh
git rev-parse --is-shallow-repository     # true => git fetch --unshallow first (docs/UPSTREAM.md rule 0)
git worktree list | grep <headRef>        # the branch is often ALREADY checked out elsewhere

The PR's branch is usually still checked out in the worktree it was written in (../os8088-<feature>), so git worktree add <path> <headRef> refuses. Do not touch that worktree - it may hold the user's uncommitted work. Make a local branch off the remote head instead, and push it to the PR's branch by name at the end:

sh
git worktree add -b pr<N>-refresh /tmp/pr<N> origin/<headRef>

/tmp/pr<N>, not the scratchpad: QMP and the zharness use AF_UNIX sockets with a ~104-byte path limit, and a scratchpad path is too long for them. The user's main checkout stays untouched for the whole run - other sessions write to it.

3. Merge main in

sh
cd /tmp/pr<N> && git merge --no-edit origin/main

A conflict is resolved by docs/UPSTREAM.md's defaults (ours for what the PR deliberately changed, theirs for what it merely lacks). Then the checks a clean merge reports nothing about:

sh
grep -oE '^#+ [0-9.]+' SPEC.md | sort | uniq -d    # a § number both sides took
python3 tools/checkdocs.py
python3 tools/os88index.py --check                 # docs/INDEX.md is generated

A § number main took while the PR sat open is the common collision: the PR's section renumbers (it is the newcomer now), with every reference to it.

Run the PR's own tests on the merged tree before editing anything - that separates "main's drift broke it" from "my fix broke it".

4. Is it still valid, and still needed?

This is the step the skill exists for. Two questions, answered with evidence:

Still needed? - has main already done this, or removed the thing it changes?

sh
git log --oneline $BASE..origin/main -- <every file the PR touches>
git log --oneline $BASE..origin/main --grep '<the feature's key words>'

Grep main for the PR's new function names, flags and SPEC wording. If main superseded it, the answer is to recommend closing, with the commit that superseded it - ask before closing, never close unasked.

Still valid? - the PR's files merging cleanly says nothing about the code they call or the formats they read. For every module, tool, constant and on-disk format the PR depends on (not just the ones it edits):

sh
git diff $BASE origin/main --stat -- <dependencies>
git diff $BASE origin/main -- <dependency> | less       # read it

Then read the commit titles of everything main gained and ask, of each one in the PR's subject area, does the PR's assumption still hold? Usual suspects: a format version bump (PKG_FMT, DRV_VER, SC_VER), a file that moved (SYSTEM/, APPDATA/), a limit that grew (volume size, cluster size, entry count), a new geometry, an API slot relayout, a knob made default. Check the kernel's own acceptance rules (what it mounts, what it reads, what version it refuses) against what the PR accepts - a host tool stricter than the kernel refuses real users' disks.

Say the verdict to the user plainly - valid and needed / needs fixes / superseded - with the commit or file that decides it, before fixing.

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

5. Fix and improve

Fixes go in their own commit after the merge commit, with a message that names what main changed and why the PR's old assumption broke. Each fix gets a test that fails without it. Update the PR's SPEC.md section and docs in the same commit - SPEC.md is updated before or with the code, never after (CLAUDE.md).

Keep improvements inside the PR's scope. A tempting adjacent cleanup is a separate PR; a refresh that grows is a review nobody asked for.

6. Verify

Cheapest first, and every one on the MERGED tree:

sh
python3 -m unittest tests/unit/<the PR's tests>.py
make -j8 > /tmp/pr<N>-make.log 2>&1; echo "exit $?"      # the fast tier rides it
make test-full > /tmp/pr<N>-full.log 2>&1; echo "exit $?" # the pre-merge gate

Read the exit code and the os88test: summary line, not a wrapper's tail - make failing after a green-looking last line is a known trap. A SKIP (needs marty|cc) row is environment, and is reported as skipped with its reason, never as passed.

Then an end-to-end check against a real artefact, because unit tests build their own fixtures and fixtures encode the author's assumptions (that is exactly how #200's 04h-only reader passed its own tests). Use what the change actually consumes: the main checkout's build/ images, a volume laid out the way the kernel or installer lays one out, os88disk.py --verify-hdd / --verify on whatever the change writes. A change with a UI claim gets the functional-check skill's on-the-glass pass.

Every check you write must be able to fail. A comparison of a value with itself prints "ok" forever (LESSONS.md §3).

7. Push and rewrite the PR

sh
git push origin HEAD:<headRef>
gh pr view <N> --json commits --jq '.commits[-1].oid'   # the PR moved?

Append to the PR body - never replace the author's text - a section headed Brought up to date with main (<date>): what was merged (how many commits, conflicts or not), each fix with the main change that made it necessary, and the validation with real numbers (tests, tiers with pass/fail/skip, the end-to-end check and what it ran on). Keep the body's "still outstanding" line honest - a hardware test nobody ran is still outstanding. End with the Claude Code attribution line.

sh
gh pr view <N> --json body -q .body > /tmp/pr<N>-body.md
# ...append...
gh pr edit <N> --body-file /tmp/pr<N>-body.md

8. Merge - only on the user's word

Ready-to-merge is the deliverable. Merge only when the invocation asked for it ("...then merge it") or the user says so now; otherwise ask once, with the verdict and the evidence in the question.

sh
gh pr merge <N> --squash --admin
gh pr view <N> --json state,mergeCommit -q '.state + " " + .mergeCommit.oid'

--admin because the ruleset wants a review the sole maintainer cannot give. One gh mutation per command - never chain merge, retarget and branch delete with &&; a stacked PR's base vanishing closes it.

9. Clean up and hand back

sh
git worktree remove /tmp/pr<N> && git branch -D pr<N>-refresh
git -C <main checkout> pull --ff-only       # only if that checkout is clean and on main

Leave the PR's original worktree and remote branch alone unless the user asks - it may hold work in progress, and a merged branch is theirs to delete.

The report: the verdict (valid / fixed / superseded) and what decided it, each fix in a sentence, the gates with their numbers, what was NOT tested and why, and the merge commit or the PR link.

What this skill does not do

  • A fork's PR - review-fork-pr (pushing elsewhere, hand-holding comment).
  • A multi-agent review - a stale PR of the maintainer's own is one change; if the merge reveals it is really large or risky, say so and offer review-fork-pr's workflow shape or /code-review rather than inventing one.
  • Close a PR unasked, delete a branch unasked, or force-push. A refresh only ever adds commits.

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

Files

SKILL.md and 1 other file in .claude/skills/refresh-stale-pr of jggonz/os8088.

  • SKILL.md
  • LESSONS.md

Open the folder on GitHubat commit 95f7e97

Compare with similar skills

Refresh Stale PR 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.

Refresh Stale PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Refresh Stale PR this skilljggonz/os8088104—~2.6kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT
Cap Feature Building WorkflowCapSoftware/Cap23k—~2.5kAutomated safety check: WarnCustom licence
Om Auto Fix Issuego-musicfox/go-musicfox2.6k1 repos~5kAutomated safety check: NotesGPL-3.0
Codewhale Landing Workflowcodewhale-hq/Codewhale41k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Builds a Cap feature in an isolated Git worktree with disposable dev resources, verification, a recorded demo and a neutral pull request, started with /building.

    23k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check: warnings
  • Om Auto Fix Issue

    go-musicfox/go-musicfox

    Fix or implement a tracker issue end to end from a single command — takes an issue id or a plain problem description (filed first via om-prepare-issue), classifies, then drives the bug autofix chain…

    2.6k GitHub starsUsed in 1 repo~5k tokens
    DevelopmentAuto-check: notes
  • Codewhale Landing Workflow

    codewhale-hq/Codewhale

    Decides how verified work should reach main, directly, in a worktree or on an integration branch, while keeping contributor credit and respecting merge gates.

    41k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Clean Complete Branches

    jtenniswood/espcontrol

    Clean up completed Git branches and worktrees for this repository both locally and on GitHub.

    1.1k GitHub stars~820 tokensUpdated today
    DevelopmentAuto-check passed

More from jggonz/os8088

  • Functional Check

    jggonz/os8088

    Functionally verify a change on the glass before it merges - boot the built OS in QEMU, drive the actual UI the change proposes (mouse, keys, menus) over QMP, screenshot the evidence for every…

    104 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Native Game Port

    jggonz/os8088

    Build a native 8086 assembly remake of a console/arcade game (reference = a disassembly or source tree) as an os8088 package, the way apps/drmario (DrMarco), apps/1942 and apps/excitebike were made…

    104 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Port To Os8088

    jggonz/os8088

    Port an existing program - written in C or in any other language - to os8088 as a C package (SPEC.md §73), the way apps/cword ported Microsoft Word 1.1a.

    104 GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed
  • Review Fork PR

    jggonz/os8088

    Review an incoming pull request that comes from someone else's fork of os8088 - fetch it, merge main into it, review it with a team of agents for memory safety, lost-from-main regressions, redraw…

    104 GitHub stars~4.3k tokensUpdated yesterday
    Auto-check passed
  • Release Os8088

    jggonz/os8088

    Build os8088 and publish the floppy images to the os8088.com website repo as a pull request, plus a GitHub release on the OS repo.

    104 GitHub stars~10k tokensUpdated yesterday
    Auto-check passed
  • Vga Face

    jggonz/os8088

    Give an os8088 package a COLOUR FACE on VGA/EGA - fewer redraws first, then a neater layout, styled panes and bevelled, picture-faced buttons with their captions inside - while the Hercules and CGA…

    104 GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Refresh Stale PR

What does Refresh Stale PR do?

Bring one of the maintainer's own stale pull requests (a branch on jggonz/os8088 that main has moved past) back to mergeable - merge main into it in a scratch worktree, decide whether it is still…. Refresh Stale PR is an agent skill from jggonz/os8088. Bring one of the maintainer's own stale pull requests (a branch on jggonz/os8088 that main has moved past) back to mergeable - merge main into it in a scratch worktree, decide whether it is still valid and still needed against what main now contains, fix what main's drift broke or what the PR got wrong, run the gates and an end-to-end check against real build artefacts, push to the PR's own branch, rewrite the PR body's validation, and (only when asked) squash-merge it.

When should I use Refresh Stale PR?

Refresh Stale PR fits situations like: the user asks whether a PR is still valid; bring main into an older PR; make a stale PR ready to merge.

How do I install Refresh Stale PR in Claude Code?

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

How do I install Refresh Stale PR in Codex?

Run `npx skills add jggonz/os8088 --skill refresh-stale-pr -a codex`. Or copy the skill folder (.claude/skills/refresh-stale-pr in jggonz/os8088) into .agents/skills/refresh-stale-pr in your project. Codex loads it when a task matches its description.

Can I use Refresh Stale PR 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 jggonz/os8088 --skill refresh-stale-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refresh-stale-pr, .gemini/skills/refresh-stale-pr, .github/skills/refresh-stale-pr and .opencode/skills/refresh-stale-pr in your project.

What does Refresh Stale PR need to run?

Going by SKILL.md and its folder, Refresh Stale PR needs the command-line tools its instructions call (git, gh, python3 and make). Our summary lists: Python 3.

Does Refresh Stale PR 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 Refresh Stale PR 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 Refresh Stale PR use?

Refresh Stale PR is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Refresh Stale PR use?

About 2.6k tokens (SKILL.md is roughly 10k 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 Refresh Stale PR?

Skills that share tags, products or a category with Refresh Stale PR: Finishing a Development Branch (obra/superpowers, 297k stars), Pre-Release PR Triage (jamiepine/voicebox, 57k stars), Cap Feature Building Workflow (CapSoftware/Cap, 23k stars) and Om Auto Fix Issue (go-musicfox/go-musicfox, 2.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Refresh Stale PR?

jggonz (a GitHub user) maintains it in jggonz/os8088, which has 104 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 8, 2026.

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