一键导入
kit-task-pr-merge
Squash-merge the open PR for the current branch, switch to the base branch, and pull. Auto-rebases onto the base if conflicts are detected.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Squash-merge the open PR for the current branch, switch to the base branch, and pull. Auto-rebases onto the base if conflicts are detected.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Autonomous execution under hard caps — run ONE long objective hands-off, OR drive the planned effort/flow set in parallel. On an APPROVED plan the captain DECIDES, MERGES each wave, and CONTINUES; it pings the human ONLY on a genuine blocker. THIN wrapper over the built-in /loop + the kit's orchestrate scripts; never a new engine.
Close an effort in ONE op — snapshot each sub-issue's diff BEFORE squash (work record), capture/judge/sync effort metrics, squash-merge the effort PR, close the parent + ALL native sub-issues, set the board Status=Done for each, garbage-collect the worktree/branch, run the optional knowledge-ingest hook, and finish with the kit-sync drift check.
Start an effort — thin caller of `cckit effort start <N>`. Creates the `effort/<N>-<slug>` integration branch + isolated bootstrapped worktree from the base branch, then marks the parent issue In Progress on the board. Sub-issues later branch from this effort branch or commit directly on it.
Start work on a GitHub issue — thin caller of `cckit start <N>`. Creates an isolated, bootstrapped worktree + `<kind>/<N>-<slug>` branch from the base branch and marks the issue In Progress on the board (if enabled). Worktree-first — there is no in-place mode.
Create an effort — a parent GitHub issue using the effort-model template (Goal / Scope / For agents / Verification) plus N native GitHub sub-issues linked via the sub-issues REST API, all added to the project board. The parent issue IS the plan.
Open the ONE pull request for an effort — `effort/<N>` → base branch — with a rich human-facing review body plus a `## For agents` section listing the file paths/entry points. Title `[Role] [#N] <title>`. Inherits labels + milestone from the parent issue and moves it to In Review on the board.
| name | kit-task-pr-merge |
| description | Squash-merge the open PR for the current branch, switch to the base branch, and pull. Auto-rebases onto the base if conflicts are detected. |
| when_to_use | When work on an issue branch is ready to land. Always run after `/kit-task-pr`. |
Plugin-direct skill — thin caller over the ONE canonical home
${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-task-ops.sh (kto_task_pr_merge). The verb logic lives
there, never inline here (kit-engine-boundary #1/#2). The op respects KIT_BASE_BRANCH (default
develop) and closes the PR's linked issues (native auto-close only fires on the default branch).
| Field | Required | Notes |
|---|---|---|
| PR number | optional | Defaults to the open PR for the current branch |
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-config.sh" && load_kit_config
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/role-identity.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/gh-project.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-task-ops.sh"
kto_task_pr_merge # open PR for the current branch
# kto_task_pr_merge 845 # an explicit PR number
After it returns on the base branch, run the kit-sync drift check (advisory; never blocks):
MAIN_WT=$(git worktree list --porcelain | awk '/^worktree /{print $2; exit}')
KIT_TOUCHED=$(git -C "$MAIN_WT" show --name-only --pretty=format: HEAD 2>/dev/null \
| grep -E '^(scripts/(lib/|kit$|kit-)|\.claude/(skills|rules|hooks|lib|agents)/)' | sort -u || true)
if [[ -n "$KIT_TOUCHED" ]]; then
echo ""
echo "⚠ kit-sync: this change touched kit-managed files — review for upstream (/kit-contribute):"
printf ' %s\n' $KIT_TOUCHED
echo " kit ⇄ project must stay in sync; an un-upstreamed change can be clobbered by /kit-update."
fi