smithery.ai

add-stacked-pr-breadcrumbs

Generate a stacked PR breadcrumbs block to add at the beginning of a PR body

First seen Mar 20, 2026

Installation

$ npx skills add https://smithery.ai

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,197 B
  • docs SUMMARY.md 110 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Add Stacked PR Breadcrumbs

Generate a stacked PR breadcrumbs block to add at the beginning of a PR body.

Instructions

Use gh stack view --json to get the stack. The .branches array is ordered from bottom (closest to trunk) to top; each entry has a pr.number (omitted if the branch has no PR). Generate the breadcrumbs in this exact format:

> [!IMPORTANT]
> This is a stacked PR:
> - #<base_pr>
> - #<current_pr> :point_left:
> - #<child_pr>

The list lines can be generated with:

gh stack view --json | jq -r --argjson current <pr_number> '.branches[] | select(.pr != null) | "> - #\(.pr.number)\(if .pr.number == $current then " :point_left:" else "" end)"'

<prnumber> is the number of the PR being edited — --argjson current passes it to jq as $current, and the filter appends :pointleft: to the line whose .pr.number matches it. Get it with gh pr view --json number -q .number when on the PR's branch.

Use gh to add the generated breadcrumbs block to the PR. If the PR already has a breadcrumbs block, replace it with the new one. Use a temp file for the PR body to ensure correct format.

Rules

  1. List PRs as a flat list in stack order (bottom to top, as given by .branches) — there is only one chain, so no nesting
  2. The current PR (the one being created/edited) should have :point_left: at the end
  3. Always start with the > [!IMPORTANT] callout
  4. Always include the header line > This is a stacked PR:
  5. Each PR number should be prefixed with #
  6. All lines must start with > to maintain the blockquote format

Example with 3 PRs in stack

If gh stack view --json returns branches with PRs #948, #950, and current PR #951

Output:

> [!IMPORTANT]
> This is a stacked PR:
> - #948
> - #950
> - #951 :point_left:

Example with 2 PRs in stack

If gh stack view --json returns branches with PRs #948, and current PR #950

Output:

> [!IMPORTANT]
> This is a stacked PR:
> - #948
> - #950 :point_left: