agentleFS
LuisUrrutiaLuisUrrutia/skills/stacked-pr/SKILL.md

stacked-pr

Skill2 starsChanged 58 days agoMITView on GitHub

Manage GitHub stacked pull requests and dependent PR chains. Use for designing or operating a stack, splitting work into reviewable layers, recovering divergent stacks, or changing CI workflows, bots, or webhook integrations whose behavior depends on stack state.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep one mutation owner throughout an operation.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Stacked pull requests

A stack is a linear chain of pull requests in one repository. The bottom targets the trunk; every layer above targets the branch below it, so each PR shows only its own concern.

main <- data-model <- api-routes <- ui
          bottom                  top

Dependencies point toward the trunk, changes to a lower layer cascade upward, and merges proceed bottom-up.

Scope and safety

Bound the work to the requested operation. Explanations, reviews, and status checks are read-only. Creation and maintenance may change only the local branches and linked PRs needed for that operation. A later lifecycle stage must be explicitly included in the request.

Merging requires the user's explicit approval for the exact PR set and merge method immediately before the merge command. Preserve unrelated dirty-tree work. Before rewriting ancestry, record the current branch and relevant tips so every original commit remains reachable until verification.

Route the request

Choose one primary route. Load its file, select the requested operation there, and stop when that operation's completion criterion is satisfied. For a request that explicitly includes several operations, complete them in dependency order and satisfy each criterion before loading the next:

  • CLI — local development, navigation, submit, sync, or cascading rebases owned by github/gh-stack. Load references/cli-workflow.md.
  • API — perform a concrete native-stack operation through REST, whether interactive or automated. Load references/api-workflow.md.
  • Manual — GitHub reports native stacks unavailable, or the user wants ordinary dependent PRs. Load references/manual-chain.md.
  • Stack-aware CI and integrations — load references/automation.md when the fix changes a workflow, bot, GraphQL client, or webhook because of stack state. Product-code and test failures use CLI, API, or manual.

Keep one mutation owner throughout an operation. Read-only inspection through another interface is safe; switching writers during a mutation can desynchronize local tracking and GitHub state.

Routing is complete when the requested operation and primary route are identified. For repository-bound work, also identify the repository, trunk, push remote, and authenticated principal; for a mutation, record the current branch, dirty paths, relevant branch tips, and intended remote objects before changing state.

Conditional references

The primary route points to these only when their branch is reached:

  • references/stack-design.md — plan layers before creating branches or splitting existing work.
  • references/troubleshooting.md — recover from a failure, divergence, adoption, restructuring, worktrees, or another branch manager.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.