Skip to content
Back to skills

Stack

ASecurity

Use when work is split into stacked branches/PRs in flowctl - creating the next branch, updating a lower branch, retargeting and merging bottom-up, or recovering after a squash merge.

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 16, 2026
ai-agentsgit

Security analysis

A100/100

Scanned November 16, 2026

npx -y skills add connext-solutions/flowctl --skill stack --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Stack?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Stack
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/connext-solutions-stack/badge)](https://www.skillsdirectory.com/skills/connext-solutions-stack)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: stack
description: Use when work is split into stacked branches/PRs in flowctl - creating the next branch, updating a lower branch, retargeting and merging bottom-up, or recovering after a squash merge.
---

# Stacked branches and PRs

## Create

1. `git switch -c <next> <current-top>`; work; `git push -u origin <next>`.
2. PR base = the branch below; body says `Stack: n/N` with links; label `status:stacked` (`ship-pr` skill).

## Change a lower branch

Commit on the lower branch, push, then carry it up one level at a time:
`git switch <upper> && git merge <lower> && git push`. Merge, not rebase: these branches are shared.

## Merge (bottom-up)

1. Merge the bottom PR with **"Create a merge commit"**. Squash or rebase rewrites the commits the upper branches contain and turns every upper PR into a conflict.
2. Retarget the next PR: `gh pr edit <n> --base main`. Its diff now shows only its own commits.
3. Repeat. Merging is the user's action unless they allow `gh pr merge`.
4. Afterwards: `git switch main && git pull`, delete merged branches locally and on origin.

## Recover from a squash merge of a lower PR

`git rebase --onto main <old-lower-tip> <upper>` then `git push --force-with-lease`. Tell the user first; it rewrites a pushed branch.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.