Skip to content

Add a PR stack skill - #1202

Merged
r0adkll merged 1 commit into
mainfrom
chore/pr-stack-skill
Oct 5, 2026
Merged

r0adkll merged 1 commit into
mainfrom
chore/pr-stack-skill

Conversation

@r0adkll

@r0adkll r0adkll commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Adds a pr-stack agent skill for opening and maintaining pull requests, especially stacks of dependent PRs, and a script that gives every PR in a stack a Stack section.

What changed

  • .claude/skills/pr-stack/SKILL.md collects what worked while building the Break-up the CampfireSettings monolith into appScope/userScope layers #607 stack:
    • Before pushing: ask first; check each branch on its own (ktlint, app compiles, jvmTest test); run the device tester against the testbed for behavior changes, including the upgrade path for storage changes.
    • Changelog: one entry per feature across the stack; fixes found along the way get their own entry in the PR that fixes them.
    • Commit signing: when 1Password fails, wait for the user to retry. Never skip signing, and no co-author trailers.
    • Descriptions: a lead paragraph, then What changed / Verification / Follow-ups. Closes #N goes only in the top PR, because GitHub closes issues only on merge into main.
    • Opening a stack bottom-up, then editing PRs through gh api, because gh pr edit fails here.
    • Restacking with rebase --onto from each branch's old tip. main is squash-only and deletes branches on merge, so after a parent merges, GitHub retargets its children to main but their branches still carry the parent's original commits.
    • Closing or drafting superseded PRs.
  • scripts/stack_section.py writes the Stack section.
    • It builds the stack tree from the open PRs' base and head branches, starting from any PR in it.

    • It renders the same nested list on every PR, indented by position, with [This PR] marking the one being viewed:

      ## Stack
      
      - #1189
        - #1195
          - [This PR] #1196
            - #1197
              - #1198
              - #1199
    • The section sits at the top of the description between hidden <!-- pr-stack:start --> / <!-- pr-stack:end --> markers, so reruns replace it in place.

    • Merged and closed PRs drop out of the list, and the section is removed once a PR is alone.

    • It prints what it would change unless given --apply.

There's no app change, so no changelog entry.

Verification

🤖 Generated with Claude Code

A pr-stack skill for opening and maintaining pull requests, especially
stacks of dependent PRs: per-branch checks before anything is pushed,
changelog placement across a stack, description conventions, opening a
stack bottom-up, editing PRs through the API (gh pr edit fails here), and
restacking after a lower branch changes or merges into squash-only main.

Every PR in a stack gets a Stack section: the whole stack as a nested
list, each PR indented under its parent and "[This PR]" marking the one
being viewed. scripts/stack_section.py builds the tree from the open PRs'
base and head branches and keeps the section between hidden markers, so
it can be rerun whenever the stack changes.
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Messages
📖 This PR has been checked by Danger

Generated by 🚫 Danger Kotlin against 3d90b49

@r0adkll
r0adkll enabled auto-merge (squash) October 5, 2026 02:28
@Rotom-Bot

Copy link
Copy Markdown
Collaborator

Code Coverage

Total Project Coverage 23.49% ❌

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Android APK @ 771a27e

@r0adkll
r0adkll merged commit 0bc76f8 into main Oct 5, 2026
7 checks passed
@r0adkll
r0adkll deleted the chore/pr-stack-skill branch October 5, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants