pr

Creates GitHub pull requests targeting canary and splits cross-layer branches into ordered stacked PRs.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/SmallAi-API/smaihub --skill pr-smallai-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr
Source: https://github.com/SmallAi-API/smaihub/tree/main/.agents/skills/pr
Command: npx skills add https://github.com/SmallAi-API/smaihub --skill pr-smallai-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Opening a pull request involves repetitive manual steps: gathering branch context, pushing commits, linking issues, filling the PR template, and verifying acceptance. For cross-layer features, a single PR cannot merge safely because clients call server contracts that do not exist on the trunk yet, requiring a careful split into ordered stacked PRs. ## Core Features & Use Cases - Automated PR Creation: Gathers git context in parallel, pushes the branch, searches related GitHub and Linear issues, fills the PR template, and opens the PR against canary via gh pr create. - Acceptance Gate Enforcement: Requires a published acceptance round link in the PR body before opening, or an explicit skip reason for changes with no user-visible outcome. - Stacked PR Splitting: Splits one cross-layer branch (database, shared package, server TRPC, desktop/CLI/UI) into ordered PRs where the server contract merges before its callers, using backup branches, reset --hard, and --force-with-lease. - Use Case: A feature branch adds a new TRPC procedure plus desktop and CLI callers. The skill rewrites the branch into a server-only PR targeting canary and a client PR stacked on top, so each layer merges safely in order. ## Quick Start Ask the assistant to create a PR for the current branch, or to split this branch into stacked PRs so the backend merges first.

Frequently Asked Questions about pr

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

FAQPage Schema
How do I create a pull request with the GitHub CLI?

Use gh pr create with the --base flag to set the target branch, after pushing your branch with git push. This skill targets the canary branch by default, fills the repository PR template, links related issues with magic keywords like Fixes #123, and opens the result with gh pr view --web.

How to split a large branch into stacked pull requests?

Create a backup branch of the full commit, reset the lower-layer branch to the trunk, check out only the server-side files, and commit them. Then base the client branch on the rewritten server branch and open its PR with --base pointing at the server branch, not the trunk.

Why should the server PR merge before client PRs?

Clients call server contracts such as TRPC procedures that do not exist on the trunk until the server PR merges. Merging callers first breaks the build, so the contract and its in-repo consumers ship together before dependent desktop, CLI, or UI layers.

Can I push directly to the canary branch?

No, pushing to canary is forbidden. A split branch cut from origin/canary tracks it, so a bare git push would target canary. Always push with an explicit branch name like git push origin feat/x, and use --force-with-lease instead of --force when rewriting.

What happens if a PR already exists for my branch?

The skill checks for an existing PR with gh pr list --head during context gathering. If one exists for the current branch, it informs you instead of creating a duplicate pull request.