Agent skill

PR Stack

by r0adkll in r0adkll/Campfire

Open, describe, and maintain pull requests in Campfire, especially stacks of dependent PRs (each branch built on the one before).

GPL-3.0Auto-check passedDevelopment

Install PR Stack

skills CLI
$ npx skills add r0adkll/Campfire --skill pr-stack -a claude-code

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

GitHub CLI
$ gh skill install r0adkll/Campfire pr-stack --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/r0adkll/Campfire.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/pr-stack .claude/skills/pr-stack && 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
pr-stack
GitHub stars
139
Token cost
~1.7k tokens
SKILL.md length
919 words
Files
2 (incl. scripts)
Skills in repo
9
Repo updated
First seen
Licence
GPL-3.0

At a glance

Open, describe, and maintain pull requests in Campfire, especially stacks of dependent PRs (each branch built on the one before).

  • Works in 3 steps: Push every branch: git push -u origin .… → Open the PRs bottom-up, each with --base… → Run stack_section.py --apply once all of…
  • Splitting work into a series of PRs
  • SKILL.md covers Before anything leaves the…, Building the stack, Writing the description and Opening the stack, plus 2 more sections
  • Runs Python scripts from its folder; calls git, gh and python3

What it does

PR Stack is an agent skill from r0adkll/Campfire. Open, describe, and maintain pull requests in Campfire, especially stacks of dependent PRs (each branch built on the one before). Use when opening a PR, splitting work into a series of PRs, restacking after a lower branch changes or merges, writing or updating PR descriptions, closing a superseded PR, or when asked for the "Stack" section.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/stack_section.py`).

It sits in Development, covering Pull requests. It works with iOS and Android. The repository describes itself as: A KMP Compose app for Audiobookshelf. The licence is GPL-3.0.

When your agent uses it

  • Splitting work into a series of PRs
  • Restacking after a lower branch changes
  • Updating PR descriptions
  • Closing a superseded PR

Example prompts

  • “/pr-stack”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Push every branch: git push -u origin . A branch created from origin/main tracks main until you do this.
  2. Open the PRs bottom-up, each with --base set to its parent's branch: gh pr create --base --head --title ... --body-file . Write bodies to…
  3. Run stack_section.py --apply once all of them exist. It fills in every PR's Stack section, so you don't need to cross-link with…

What it can do on your machine

Read from SKILL.md and the folder at commit e52e0de. 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

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • gh
    • python3

    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

PR Stack loads about 1.7k tokens when it runs. Until then it costs about 88 tokens; SKILL.md has 919 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from r0adkll/Campfire at commit e52e0de, republished under its GPL-3.0 licence (© r0adkll). 919 words, ~1,729 tokens.

Download SKILL.mdSave it as .claude/skills/pr-stack/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
pr-stack
description
Open, describe, and maintain pull requests in Campfire, especially stacks of dependent PRs (each branch built on the one before). Use when opening a PR, splitting work into a series of PRs, restacking after a lower branch changes or merges, writing or updating PR descriptions, closing a superseded PR, or when asked for the "Stack" section.

Pull requests and PR stacks

A stack is a chain, sometimes a tree, of PRs where each PR's base is the previous PR's branch. Reviewers can then read one concern at a time while the work keeps moving. Every PR in a stack carries a Stack section listing the whole stack.

Before anything leaves the machine

  • Ask before pushing or opening PRs unless the user said to go ahead. Building and committing locally needs no asking.

  • Check each PR on its own. Every branch in the stack must pass by itself, not just the top one:

    • ./scripts/ktlint --check;
    • the app compiles: :app:desktop:compileKotlin, :app:android:compileAlphaDebugKotlin, and iOS (:app:ios:compileKotlinIosSimulatorArm64) when shared or iOS code changed;
    • ./gradlew jvmTest test.

    Never pipe Gradle into tail, because that hides the exit code.

  • Behavior changes get a device run. Use the campfire-device-tester agent against the throwaway testbed, never a real server. For data or storage changes, include the upgrade path: install the parent branch's build, set non-default values, then install -r the new build.

  • Changelog (see CLAUDE.md):

    • A feature keeps one entry across the whole stack, added by the PR where users first see the change.
    • A bug fix found along the way gets its own entry, in the PR that fixes it.
    • Refactors get no entry, and the PR says so.
  • Labels: ignore-db-change for .sq changes that need no migration, and skip-coverage only when the user agrees. Add labels with gh issue edit <n> --add-label ....

Building the stack

  • Branch each step from the previous one: git switch -c <next-branch> <previous-branch>. Name branches so they sort by step (refactor/settings-async-1a, -1b, -1c).
  • Keep one concern per PR. A fix discovered on the way is its own PR, branched from where it applies, even if that makes the stack a tree.
  • Commit signing goes through 1Password and sometimes fails with "failed to fill whole buffer". Tell the user and wait for them to say "retry". Never bypass signing (--no-gpg-sign), and never add Co-Authored-By trailers or session links.

Writing the description

Lead with a short paragraph: what the PR does and why, and which issue it's part of (Part of #607). Then the sections that apply. Recent PRs use:

  • What changed: the substance, grouped by area. Name the types and files reviewers should look at.
  • What didn't change, for refactors: the behavior, keys or APIs that stayed the same.
  • Verification: the exact checks you ran and their results, the on-device results, and anything you excluded and why (for example, native-library tests that can't run locally). Don't claim checks you didn't run.
  • Follow-ups: known gaps, and links to the issues filed for them.

Put Closes #N in the top PR of the stack. GitHub only closes the issue when a PR merges into main, which happens once the whole stack has landed. End with the footer the session's attribution instructions give.

Don't write "Stacked on #N" prose. The Stack section says it, and stays true as the stack changes.

The Stack section

Every open PR in a stack gets the same nested list, with each PR indented under its parent and [This PR] marking the PR being viewed. Bare #N references are enough, because GitHub renders them as rich links:

markdown
## Stack

- #1189
  - #1195
    - [This PR] #1196
      - #1197
        - #1198
        - #1199

Don't write it by hand. scripts/stack_section.py builds the tree from the open PRs' base and head branches, so it doesn't matter which PR you start from. It keeps the section between hidden <!-- pr-stack:start --> / <!-- pr-stack:end --> markers at the top of each body, replacing it in place on reruns:

bash
python3 .claude/skills/pr-stack/scripts/stack_section.py 1196          # dry run: print each PR's section
python3 .claude/skills/pr-stack/scripts/stack_section.py 1196 --apply  # write the ones that changed

Run it after every change to the stack's shape: a PR opened, merged, closed or retargeted. When only one PR is left, it removes the section.

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

Opening the stack

  1. Push every branch: git push -u origin <branch>. A branch created from origin/main tracks main until you do this.
  2. Open the PRs bottom-up, each with --base set to its parent's branch: gh pr create --base <parent-branch> --head <branch> --title ... --body-file <file>. Write bodies to files rather than inline heredocs.
  3. Run stack_section.py --apply once all of them exist. It fills in every PR's Stack section, so you don't need to cross-link with placeholders.

Editing PRs

gh pr edit fails in this repo (it queries the deprecated projectCards GraphQL field). Patch through the API instead (see docs/agents/issue-tracker.md):

bash
gh api -X PATCH repos/r0adkll/Campfire/pulls/<n> -F body=@body.md   # description
gh api -X PATCH repos/r0adkll/Campfire/pulls/<n> -f base=<branch>   # retarget
gh pr ready <n> --undo                                              # back to draft

Keeping the stack current

A lower branch changed (review fixes, a changelog entry, a rebase on main): restack every descendant, top-down from the changed branch, in order.

  1. Before rewriting any branch, note each branch's old tip: git rev-parse <branch>.
  2. Rebase each child onto its parent's new tip: git rebase --onto <parent> <parent's old tip> <child>.
    • A plain git rebase <parent> also works when the parent only gained commits. Git skips patches that are already applied, and prints a "skipped cherry-picks" hint.
  3. Re-run each moved branch's checks.
  4. Push with git push --force-with-lease. Ask first if the PRs are already under review.

A PR merged. main is squash-only and head branches are deleted on merge, so:

  • GitHub retargets the merged PR's children to main by itself.
  • Their branches still carry the merged PR's original commits, which won't match the squash commit.

Restack each child with git fetch origin && git rebase --onto origin/main <merged branch's old tip> <child>, then its descendants as above. Then run stack_section.py --apply, which drops the merged PR from every list.

A PR is superseded. Close it with a comment naming its replacement and what carried over (gh pr close <n> --comment ...). If it's still useful as a reference until the replacement lands, move it to draft instead, with a comment saying so.

© r0adkll, GPL-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

SKILL.md and 1 other file (scripts) in .claude/skills/pr-stack of r0adkll/Campfire.

  • SKILL.md
  • scripts/stack_section.py

Open the folder on GitHubat commit e52e0de

Compare with similar skills

PR Stack 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.

PR Stack compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Stack this skillr0adkll/Campfire139—~1.7kAutomated safety check: PassGPL-3.0
Commit PRsamuelclay/NewsBlur7.6k—~4.1kAutomated safety check: PassMIT
Grix Code Reviewaskie/grix153—~799Automated safety check: PassCustom licence
Tlon Workflowtloncorp/tlon-apps107—~8.9kAutomated safety check: NotesMIT
Open PRossappscollective/oss-weather456—~918Automated safety check: PassMIT
PR Proofmrzmyr/pixy-mood-tracker-app153—~571Automated safety check: PassMIT

Similar skills

  • Commit PR

    samuelclay/NewsBlur

    A skill your agent uses when the user runs /commit-pr, says "commit and push", "open a PR", "ship this", asks to update an existing PR with new changes, or asks to resolve PR review comments in the…

    7.6k GitHub stars~4.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Audit Grix diffs and pull requests for correctness, regressions, security, lifecycle safety, and cross-component contract consistency.

    153 GitHub stars~799 tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Tlon Workflow

    tloncorp/tlon-apps

    A skill your agent uses when taking a Tlon Messenger task from a fresh worktree to a merged pull request: reproducing or fixing something in the iOS, Android or web app, validating it on a…

    107 GitHub stars~8.9k tokensUpdated today
    DevelopmentAuto-check: notes
  • Open PR

    ossappscollective/oss-weather

    MANDATORY skill for ALL pull requests. An agent skill from ossappscollective/oss-weather.

    456 GitHub stars~918 tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • PR Proof

    mrzmyr/pixy-mood-tracker-app

    Upload screenshots or videos to a PR body. An agent skill from mrzmyr/pixy-mood-tracker-app.

    153 GitHub stars~571 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Nitro Sound Workflows

    hyochan/react-native-nitro-sound

    A skill your agent uses for react-native-nitro-sound repository work that should follow the project workflows for PR review, code audit, knowledge compilation, full verification, iOS or Android…

    961 GitHub stars~1.2k tokensUpdated 8 days ago
    MobileAuto-check passed

More from r0adkll/Campfire

All 9 skills in this repo
  • Compose Modifier

    r0adkll/Campfire

    Enforce the Compose guideline that every @Composable function must declare modifier: Modifier = Modifier as its first optional parameter and apply it to the root layout.

    139 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Fdroid Reproducible Foss

    r0adkll/Campfire

    Rules and reliable local tests for keeping Campfire's foss flavor F-Droid-compatible — a clean source scan (using scandelete, never scanignore) and a byte-for-byte reproducible build.

    139 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed
  • I18n Compose

    r0adkll/Campfire

    Extract hardcoded user-facing string literals from a Jetpack Compose / Compose Multiplatform file into the owning module's composeResources/values/<modulestrings.xml, then replace each call site…

    139 GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed
  • Iconbutton A11y

    r0adkll/Campfire

    Enforce the Campfire IconButton accessibility convention — every IconButton (and its derivatives) must be wrapped with IconButtonTooltip and given a localized action label.

    139 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Socket Event Listener

    r0adkll/Campfire

    Enforce the Campfire pattern for feature modules to react to Audiobookshelf socket events.

    139 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Compose UI

    r0adkll/Campfire

    Campfire Compose UI conventions. An agent skill from r0adkll/Campfire.

    139 GitHub stars~886 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about PR Stack

What does PR Stack do?

Open, describe, and maintain pull requests in Campfire, especially stacks of dependent PRs (each branch built on the one before). PR Stack is an agent skill from r0adkll/Campfire. Open, describe, and maintain pull requests in Campfire, especially stacks of dependent PRs (each branch built on the one before).

When should I use PR Stack?

PR Stack fits situations like: splitting work into a series of PRs; restacking after a lower branch changes; updating PR descriptions; closing a superseded PR.

How do I install PR Stack in Claude Code?

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

How do I install PR Stack in Codex?

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

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

What does PR Stack need to run?

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

Does PR Stack 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 PR Stack 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does PR Stack use?

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

How many tokens does PR Stack use?

About 1.7k tokens (SKILL.md is roughly 6.9k 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 PR Stack?

Skills that share tags, products or a category with PR Stack: Commit PR (samuelclay/NewsBlur, 7.6k stars), Grix Code Review (askie/grix, 153 stars), Tlon Workflow (tloncorp/tlon-apps, 107 stars) and Open PR (ossappscollective/oss-weather, 456 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Stack?

r0adkll (a GitHub user) maintains it in r0adkll/Campfire, which has 139 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 6, 2026.

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