AGENT SKILL

jj-stacked-pr

Manage pi-jj stacked PR workflows safely. Use when the user wants jj stack status, PR planning, or publishing/updating stacked PRs with GitHub.

License 许可
MIT
所属仓库
casualjim/pi-mimir
最近更新
2026-11-10
Stars
★ 16
Forks
9

01 前言 Front Matter

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.

03 SKILL.md 正文

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):

  1. action: "status" → /jj-stack-status
  2. action: "plan" (optional) → /jj-pr-plan ... when the user wants explicit base/head mapping review
  3. action: "publish", dryRun: true → /jj-pr-publish --dry-run ...
  4. Ask user to confirm real publish
  5. action: "publish", dryRun: false (optional draft) → /jj-pr-publish ...
  6. action: "sync" → /jj-pr-sync ... to refresh PR state/labels
  7. after all PRs are merged, optional closeout: action: "close" → /jj-stack-close --dry-run then /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]

04 同仓库更多 Skills