name: jj-stacked-pr description: Manage pi-jj stacked PR workflows safely. Use when the user wants jj stack status, PR planning, or publishing/updating stacked PRs with GitHub.
JJ Stacked PR Flow
Use this skill for stack-aware PR workflows in repos using the pi-jj extension.
Goals
- Inspect stack state before publishing.
- Prefer safe dry-run behavior first.
- Publish/update stacked PRs only after explicit user confirmation.
Preferred execution path
Use the jj_stack_pr_flow tool first (it executes the matching command directly by default):
action: "status"→/jj-stack-statusaction: "plan"(optional) →/jj-pr-plan ...when the user wants explicit base/head mapping reviewaction: "publish", dryRun: true→/jj-pr-publish --dry-run ...- Ask user to confirm real publish
action: "publish", dryRun: false(optionaldraft) →/jj-pr-publish ...action: "sync"→/jj-pr-sync ...to refresh PR state/labels- after all PRs are merged, optional closeout:
action: "close"→/jj-stack-close --dry-runthen/jj-stack-close
Safety rules
- Do not publish non-dry-run unless user explicitly asks.
- If repo is not initialized for jj, run
action: "init"(or ask user first if uncertain). - If publish fails due to auth, instruct user to run
gh auth login. - After publish, summarize PR numbers/URLs and next actions.
Fallback (if tool unavailable)
Run slash commands directly in this order:
/jj-stack-status
# optional when user wants explicit plan output
/jj-pr-plan [--remote origin]
/jj-pr-publish --dry-run [--remote origin]
# after explicit approval
/jj-pr-publish [--draft] [--remote origin]
/jj-pr-sync [--remote origin]
# after all PRs are merged (optional cleanup)
/jj-stack-close --dry-run [--remote origin]
/jj-stack-close [--remote origin]