一键导入
worktree-task
Execute instructions in an isolated worktree, commit, fast-forward merge to parent, cleanup. Args: <parent-branch> <instructions...>
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute instructions in an isolated worktree, commit, fast-forward merge to parent, cleanup. Args: <parent-branch> <instructions...>
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | worktree-task |
| description | Execute instructions in an isolated worktree, commit, fast-forward merge to parent, cleanup. Args: <parent-branch> <instructions...> |
Execute a set of instructions in an isolated worktree branched from a parent branch. Commit results, fast-forward merge back to parent, delete worktree/branch, report.
/worktree-task <parent-branch> <instructions...>
$PARENT — branch to fork from and merge back to (required).$INSTRUCTIONS — what to do in the worktree (required). Free-form text.If either is missing, ask the user.
$PARENT exists: git rev-parse --verify $PARENT.task-<short-description>-<date>-<short-id> derived from instructions.
<short-description> — 2-3 word slug from instructions.<short-id> — 4 random hex chars; avoids collisions on same-day reruns. e.g. task-add-logging-20260322-3f2a.$PROJECT/.worktrees/<branch>.git worktree add $PROJECT/.worktrees/<branch> -b <branch> $PARENT
cd to worktree. All work happens there..tmp/ if missing.$INSTRUCTIONS in the worktree..tmp/ content.~/.claude/docs/git-operations.md rules.Rebase onto $PARENT so merge is fast-forward:
git fetch . $PARENT
git rebase $PARENT
Then fast-forward $PARENT. Locate where $PARENT is checked out:
$PARENT has a worktree → cd there, run git merge --ff-only <branch>.$PARENT is in root checkout → cd $PROJECT, run git merge --ff-only <branch>.$PARENT is not checked out anywhere → cd $PROJECT, run:
git fetch . <branch>:$PARENT
If --ff-only fails → rebase again, retry once. If still fails → report error, do NOT force.
After successful merge:
git worktree remove $PROJECT/.worktrees/<branch>git branch -d <branch>If merge failed → do NOT delete. Report the worktree path so the user can inspect.
Always end with:
<hash> (short hash on $PARENT after merge)--ff-only — NEVER create merge commits..tmp/ or unrelated files.--force.Self-looping adversarial-review-to-merge pipeline. Codex runs an adversarial review (a given area/topic, else the whole repo), findings are neutrally verified, each survivor becomes its own PR, and a per-PR review gauntlet (two fresh, context-isolated SATISFIED verdicts on the same PR content, reviewed one at a time over the whole diff) plus event-driven CI monitoring gate an auto-merge. Multiple isolated runs (each keyed by a run-id, with a lease so only one agent drives each) can run concurrently in one repo. Drives its own loop via ScheduleWakeup — invoke once, no /loop wrapper. Args: [--run id] [area or topic]
Evaluate and address GitHub Copilot PR review items for a GitHub pull request. Use when user provides a GitHub PR link and wants Copilot review comments checked, verified, fixed, committed, and summarized. Fetch review items with `gh`, verify each claim against source/tests before changing code, ask user before making subjective or constraint-driven changes, then work items one by one.
Continuously find and fix failing Go tests in a worktree, syncing with a parent branch between iterations. Use when user wants to fix all (or many) test failures in a branch via an automated loop. Args: <parent-branch> [test-args...]
Delegate a task to Codex CLI via `codex exec`. Use for lightweight tasks (exploration, simple searches, file reads) that don't require heavy reasoning. Only available from Claude Code sessions.
Multi-agent design collaboration — Claude Code (reviewer) and Codex (designer) iterate on a design doc via file-based chat. Gathers requirements from user, then runs a review loop until design is satisfactory. Args: <topic>
Reorganize Go package file layout by actual responsibility. Inspects file contents, fixes naming mismatches, merges tiny files, splits oversized ones, consolidates tests, and regenerates generated files — all without changing behavior or public API. Args: <package-dir>