blitz-merge
БесплатноБез исполняемых скриптовНе проверенBatch-fix all open bugs in parallel, iterate on PR reviews until clean, then squash-merge each PR sequentially. Extends bug-blitz with automated review cycles…
от ArjenSchwarz★ 20 звёзд на GitHubОб этом скилле
Blitz Merge
Resolve all open bugs in parallel, get PRs review-clean, then squash-merge them one by one.
Workflow
Phase 1: Fix Bugs (same as bug-blitz)
1.1 Fetch Bugs
First, determine the current project by calling mcp__transit__get_projects() and matching the current repository name against the project list. If no matching Transit project is found, inform the user and stop.
Then query Transit for all bug-type tasks in "idea" status, filtered by the matched project:
mcp__transit__query_tasks(type="bug", status=["idea"], project="{project_name}")
If no bugs are found, inform the user and stop.
Present the list of bugs to the user with their T-{displayId} references and names. Ask for confirmation before proceeding. The user may choose to exclude specific bugs.
1.2 Create Worktrees
For each confirmed bug:
- Derive a bug name in kebab-case from the task name
- Create a worktree based off
mainwith branchT-{displayId}/bugfix-{bug-name}:git worktree add ../{repo-name}-worktrees/T-{displayId} -b T-{displayId}/bugfix-{bug-name} main
All worktrees go in a sibling directory ../{repo-name}-worktrees/ to keep the main repo clean. Use the repo's directory name as {repo-name}.
If a worktree or branch already exists for a bug, skip creation and reuse it.
1.3 Spawn Fix Subagents
Spawn one Agent subagent per bug using subagent_type="general-purpose". Run all subagents in parallel (single message, multiple Agent tool calls).
Each subagent receives this prompt (fill in the values):
You are working in a git worktree at {worktree_path}.
Fix the bug described by Transit ticket T-{displayId}:
- Name: {task_name}
- Description: {task_description}
Run the /fix-bug skill with the ticket reference T-{displayId}.
The worktree already has the correct branch checked out — do NOT create a new branch or switch branches.
Work entirely within {worktree_path} as your working directory.
1.4 Collect Fix Results
After all fix subagents complete, collect results into a tracking table:
| Bug | Branch | Fix Status | PR |
|---|---|---|---|
| T-{id}: {name} | T-{id}/bugfix-{name} | success/failed | #{pr} or — |
If a bug failed to produce a PR, exclude it from the review and merge phases. Keep its worktree for manual investigation.
Phase 2: Review Loop
For each PR that was successfully created, run the review-fix cycle. Process PRs in parallel where possible.
A merge must never land code that no review ever looked at. Define a helper that counts the review comments already on a PR — a comment qualifies if its author is a Claude/GitHub bot or its body carries the local-review sentinel:
count_reviews() {
gh api graphql -f query='
query($owner:String!,$repo:String!,$pr:Int!){repository(owner:$owner,name:$repo){pullRequest(number:$pr){
reviews(first:50){nodes{body author{login}}}
comments(first:100){nodes{body author{login}}}}}}' \
-f owner=OWNER -f repo=REPO -F pr="$1" \
--jq '[.data.repository.pullRequest.reviews.nodes[], .data.repository.pullRequest.comments.nodes[]]
| map(select((.author.login | test("claude|github-actions";"i")) or (.body | test("claude-local-review"))))
| length'
}
2.1 Wait for CI and Reviews — and guarantee one exists
Record the review count before waiting, so you can tell whether a review actually lands:
PRE_REVIEWS=$(count_reviews "$pr_number")
Wait for CI and reviewers to arrive. Prefer polling gh pr checks $pr_number until the checks leave pending, capped at ~10 minutes after the PR was created (or after the last push). Run the poll in the background so a single failure can't cancel sibling work.
Fallback — never proceed with no review. Once the checks conclude, confirm this round actually produced a review:
POST_REVIEWS=$(count_reviews "$pr_number")
if [ "${POST_REVIEWS:-0}" -le "${PRE_REVIEWS:-0}" ]; then
echo "No new Claude/bot review landed for PR $pr_number — falling back to local-review"
# invoke the local-review agent on $pr_number, then give it ~1-2 min to post before continuing.
fi
The delta (POST <= PRE) catches every empty case — a GH Action that finished success without commenting, a review that errored, or a token-less Action — without re-running local-review when a review did land. Run the fallback at most once per round. A silent, errored, or skipped GH Action therefore never leaves the loop with nothing to act on.
2.2 Run PR Review Fixer
For each PR, spawn a subagent in its worktree:
You are working in a git worktree at {worktree_path}.
The branch {branch_name} is checked out and has PR #{pr_number} open.
Run the /pr-review-fixer skill to fetch unresolved PR comments and CI failures, validate them, and fix any issues found.
After the skill completes, output a summary line in exactly this format:
REVIEW_RESULT: {CLEAN|HAS_ISSUES}
- CLEAN means no blockers, criti
Установить blitz-merge в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл blitz-merge?
Batch-fix all open bugs in parallel, iterate on PR reviews until clean, then squash-merge each PR sequentially. Extends bug-blitz with automated review cycles and merge. Fetches bug-type tasks from Transit, creates worktrees, spawns parallel fix agents, runs /pr-review-fixer in a loop until no blockers/critical/major issues remain, then merges PRs one by one with squash-and-merge.
Как установить скилл blitz-merge?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл blitz-merge запускает скрипты?
Нет, скилл состоит только из инструкций (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