一键导入
merge-pr
Merges a PR with automatic cleanup of worktree and branch. Handles all edge cases. Use when merging approved PRs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Merges a PR with automatic cleanup of worktree and branch. Handles all edge cases. Use when merging approved PRs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Manage academic references in CSL-JSON format. Add papers by DOI/PMID/ISBN/arXiv, search and list references, generate citations, manage full-text PDFs, and check for retractions.
Analyzes ROADMAP and implements tasks in parallel with automatic orchestration. Use when starting implementation work.
Reviews a GitHub PR by checking CI status, running tests, and posting review. Always reports findings to user. Use when reviewing PRs or when the user says "review PR".
Cleans up completed phases in ROADMAP, moving relevant info to CHANGELOG or specs.
Implements a task locally (without worktree) following TDD with IPC status reporting. Use when working on a task in an existing branch.
Implements a task from spec/tasks in a git worktree following TDD. Use when working on a specific task by keyword.
| name | merge-pr |
| description | Merges a PR with automatic cleanup of worktree and branch. Handles all edge cases. Use when merging approved PRs. |
PR #$ARGUMENTS のマージ処理を行います。
!gh pr view $ARGUMENTS --json headRefName,state,mergeable,reviewDecision --jq '"Branch: \(.headRefName)\nState: \(.state)\nMergeable: \(.mergeable)\nReview: \(.reviewDecision)"' 2>/dev/null
!gh pr checks $ARGUMENTS 2>/dev/null
!git worktree list
Recommended: Use the merge script that handles all edge cases:
./scripts/merge-pr.sh $ARGUMENTS
This script automatically:
# Squash merge (default)
./scripts/merge-pr.sh $ARGUMENTS --squash
# Regular merge commit
./scripts/merge-pr.sh $ARGUMENTS --merge
# Rebase merge
./scripts/merge-pr.sh $ARGUMENTS --rebase
# Skip task file management
./scripts/merge-pr.sh $ARGUMENTS --no-task
# Preview what would happen
./scripts/merge-pr.sh $ARGUMENTS --dry-run
For multiple PRs, run sequentially:
./scripts/merge-pr.sh 123
./scripts/merge-pr.sh 124
./scripts/merge-pr.sh 125
Or parallel (if no conflicts expected):
./scripts/merge-pr.sh 123 &
./scripts/merge-pr.sh 124 &
./scripts/merge-pr.sh 125 &
wait
After merge, update ROADMAP if needed:
spec/tasks/ROADMAP.mdgit add spec/tasks/ROADMAP.md && git commit -m "chore(tasks): complete task X"git pushThe script handles this with --force, but if it still fails:
PARENT_DIR="$(cd "$(git rev-parse --show-toplevel)/.." && pwd)"
rm -rf "${PARENT_DIR}/reference-manager--worktrees/<branch-dir>"
git worktree prune
Use -D (force delete):
git branch -D <branch-name>
You're still in the worktree. Switch first:
cd "$(git rev-parse --show-toplevel)"
git checkout main
Kill it first:
./scripts/kill-agent.sh <pane-id>