Stack Branch

Create a new branch stacked on another PR. Use when you want to start work that depends on an existing PR that hasn't been merged yet.

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add flurdy/agent-skills --skill stack-branch
Manual install
git clone --depth 1 https://github.com/flurdy/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/stack-branch ~/.claude/skills/stack-branch

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Create Stacked Branch

Create a new branch based on an existing PR branch (not main) for dependent work.

## Usage

```
/stack-branch AB-456
/stack-branch AB-456 feature/parent-branch    # Explicit parent
```

## Instructions

### 1. Get the Jira Ticket

The first argument is the Jira ticket number for the new work.

Use [jira-ticket](../jira-ticket/SKILL.md) for the key, summary and issue type. It owns tool
availability, deferred discovery and unavailable-context handoffs. If skill invocation is absent,
read that installed skill and follow it; do not reconstruct the lookup. Stop branch creation if
required context remains unavailable rather than guessing the branch prefix.

### 2. Identify Parent Branch

If parent branch not specified:

```bash
# Check if currently on a feature branch
git branch --show-current
```

If attached to a non-default branch, offer to use it as the parent. If detached or on the repository
default branch, ask which PR branch to stack on.

### 3. Resolve the parent ref

Fetch the parent branch read-only and require its remote-tracking ref to exist. The parent is an
existing PR branch, so `origin/{parent-branch}` is the authoritative base. Do not check out or pull
the parent branch:

```bash
git fetch origin {parent-branch}
git rev-parse --verify origin/{parent-branch}
```

### 4. Create Branch Name

Map the Jira issue type to conventional commit prefix:

| Issue Type | Prefix |
|------------|--------|
| Story | `feat` |
| Task | `feat` |
Read the full skill on GitHub

Details

Skill name
stack-branch
Path
skills/stack-branch/SKILL.md
License
MIT
Repo updated
17 November 2026

FAQ

What does the Stack Branch skill do?

Create a new branch stacked on another PR. Use when you want to start work that depends on an existing PR that hasn't been merged yet.

How do I install the Stack Branch skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add flurdy/agent-skills --skill stack-branch. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Stack Branch popular?

It lives in flurdy/agent-skills, which has 9 GitHub stars and 0 forks.

Related skills

Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.