create-stacked-prs
БесплатноБез исполняемых скриптовНе проверенUse when staged changes contain a complete feature or bugfix that needs smaller, logical, dependent GitHub PRs for review.
от l-lin★ 17 звёзд на GitHubОб этом скилле
Create stacked PRs
Split staged changes into reviewable PRs. Request approval before creating commits, branches, pushes, or PRs.
Use gh for all GitHub operations. Create draft PRs only.
This skill creates new stacks. It does not update, rebase, or merge existing stacks.
1. Inspect the input
- Read repository instructions and PR conventions.
- Inspect
git status --short, the current branch, remotes, and the staged diff. - Read affected code, tests, and relevant callers to understand the complete change.
- Identify unstaged changes, untracked files, submodules, unresolved conflicts, and existing commits outside the proposed base.
- Stop if the index has conflicts or no staged changes.
- Extract the Jira ticket from the branch name, such as
FOOBAR-123. - Verify the Jira URL through repository configuration, existing PRs, or an available Jira tool.
- Ask for the ticket or URL if either is missing or ambiguous. Never invent a Jira hostname or ticket details.
- Identify the target repository and first PR base with
gh repo viewand repository conventions. - Check existing PRs and remote branch names for conflicts with the proposed stack.
Treat the staged diff as the complete feature input. Exclude unstaged changes and untracked files. Include staged additions, deletions, renames, file modes, and binary files. Stop if staged content depends on excluded files or changes. Ask the user to correct the input. Do not silently include existing branch commits in the first PR. Ask how to handle commits outside the target base.
2. Propose the split
- Map components, behavior, dependencies, and tests across the complete staged diff.
- Choose the fewest PRs that separate distinct review concerns.
- Order prerequisites before consumers. Keep each PR coherent, buildable, and testable.
- Keep behavior tests with their implementation. Separate tests only when they remain useful and pass independently.
- Split individual files into logical changes when file boundaries do not match review boundaries.
- Keep required schema compatibility and rollout order explicit.
- Avoid temporary stubs, broken intermediate states, and code added only to support the split.
- Use one PR if no safe, useful split exists. Explain the reason.
Present a plan with these fields for each PR:
- Position, title, branch, and base branch.
- Purpose, included changes, dependencies, and review boundary.
- Tests and checks to run.
Use branch names such as FOOBAR-123/01-progress-model, subject to repository conventions.
Use titles such as feat(FOOBAR-123): add the progress model.
The first PR targets the approved integration branch. Each later PR targets the preceding stack branch.
Use the source HEAD as the starting commit unless the user approves another starting commit.
Include the starting commit, a proposed whole-feature diagram, and any exclusions or risks.
Explain that the original branch, index, and working tree will remain unchanged.
Request approval for the split, commits, pushes, and draft PR creation. Wait for approval.
Request new approval if the split or scope must change.
3. Build the stack without changing the source
- Recheck the source HEAD, index, and working tree against the inspected input.
- Stop and inspect again if the input changed after approval.
- Record the source branch, HEAD, status, staged patch, and staged tree before building.
- Save the complete staged patch with
git diff --cached --binary --full-index HEADoutside the source working tree. - Record the staged tree with
git write-tree. Do not change the source index. - Create a separate temporary worktree at the approved starting commit.
- Build the first stack branch there. Create each subsequent branch from the preceding stack tip.
- Apply only the approved changes for each PR. Use explicit paths or selected hunks when staging.
- Inspect each staged diff before committing. Check for unrelated changes and secrets.
- Run the planned checks at each stack tip. Record the exact commands and results.
- Commit each logical change with the ticket and repository commit conventions.
Keep the original branch and staged changes as the recovery source.
Do not use git reset --hard, git clean, or a stash to prepare the source working tree.
Do not force-push, rewrite existing branches, bypass hooks, or overwrite remote branches.
Stop for unexpected failures. Do not repair unrelated code or add temporary implementation changes.
4. Verify the complete stack
- Compare the final stack tree with the recorded staged tree. Require an exact tree match.
- Check each adjacent branch diff against the approved PR boundary.
- Check that the first PR has no unapproved inherited commits.
- Run the complete feature checks at the final stack tip.
- Verify that the source HEAD, index, and working tree remain unchanged.
- Report failed or unavailable checks before publishing. Request approval to publish with those limits.
Use `gi
Установить create-stacked-prs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл create-stacked-prs?
Use when staged changes contain a complete feature or bugfix that needs smaller, logical, dependent GitHub PRs for review.
Как установить скилл create-stacked-prs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл create-stacked-prs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic