pr-slicer

Slice large working branches into smaller PRs with dependency graphs.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/sennett-lau/alice --skill pr-slicer-sennett-lau
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-slicer
Source: https://github.com/sennett-lau/alice/tree/main/framework/skills/pr-slicer
Command: npx skills add https://github.com/sennett-lau/alice --skill pr-slicer-sennett-lau

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Slices a large working branch into a chain of smaller, reviewable PRs. Detects adopter-defined migration-class files (forces a migration PR first), builds a dependency graph, writes an overview.md and per-PR spec folder under .tmp/pr-slicer, then dispatches pr-slicer-executor sub-agents (optionally in git worktrees) to build each PR. Main session keeps the remote side — push, gh pr create, rebase cascade. Use when asked to "slice this PR", "pr-slicer", "break this branch into PRs", "chop this up into smaller PRs".

Core Features & Use Cases

  • Slices large feature branches into a sequence of smaller PRs to simplify review and integration.
  • Detects migration-class files, builds dependency graphs, and generates a structured plan under .tmp/pr-slicer.
  • Dispatches executor sub-agents to assemble and validate each PR while managing base branches and remote operations.

Quick Start

Run the pr-slicer workflow on your current branch to generate a plan, slice the work into PRs, and dispatch executors for review.

Frequently Asked Questions about pr-slicer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I break a large feature branch into smaller pull requests?

To break a large feature branch into smaller pull requests, the workflow slices your commits into a chain of manageable PRs by building a dependency graph and dispatching sub-agents to assemble each one. You simply run the command on your working branch.

How does dependency graph building work for chained pull requests?

Dependency graph building for chained pull requests works by detecting migration-class files to force a migration PR first, then mapping remaining changes to establish the order. This structured plan under .tmp/pr-slicer dictates how executor sub-agents assemble each PR.

Can I use git worktree to parallelize pull request generation?

Yes, you can use git worktree to parallelize pull request generation. The workflow optionally dispatches pr-slicer-executor sub-agents within isolated git worktrees, allowing concurrent assembly and validation of PRs without interfering with your main working directory.

Do I need GitHub CLI to automate branch slicing and PR creation?

You need GitHub CLI to automate branch slicing and PR creation because the main session manages remote operations including pushing branches and running gh pr create. The workflow orchestrates the entire remote side, including rebase cascades across the PR chain.

What is the best way to handle migration files when splitting a branch?

The best way to handle migration files when splitting a branch is to let the workflow detect adopter-defined migration-class files automatically. This forces a migration PR to be generated first, ensuring dependency resolution before subsequent feature PRs are dispatched.

Why should I split a large pull request instead of merging it directly?

Splitting a large pull request simplifies code review and integration by breaking the work into a sequence of smaller, reviewable PRs. This approach generates a structured overview and per-PR specs, making the changes easier to validate before merging.