使用 git worktree + 背景代理会话管理大型任务(默认启动 Claude Code;可用 --codex 快速切到 Codex CLI,或通过 --agent-cmd 指定任意命令)。适合用户希望在不阻塞当前会话的情况下执行大型或多步骤任务。
This skill manages large coding tasks by spawning autonomous agent instances (默认 Claude Code,可选 --codex/--agent-cmd) in separate git worktrees via tmux sessions.
Use these slash commands for precise control:
| Command | Description |
|---|---|
/worktree:launch |
Launch a new background task |
/worktree:status |
Check status of all or specific tasks |
/worktree:resume |
Resume an interrupted task |
/worktree:cleanup |
Clean up completed tasks |
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/launch.py <branch-name> "<task-description>"
Example:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/launch.py feature/my-task "Execute the task: implement new feature. Read the tasks.md and implement all phases."
The script will:
--codex for default Codex command or --agent-cmd to switch, e.g., codex --yolo -m gpt-5.1-codex-max -c model_reasoning_effort="high")python3 ${CLAUDE_PLUGIN_ROOT}/scripts/status.py [session-name]
Without arguments, lists all active sessions. With a session name, shows detailed status.
If a task is interrupted (rate limit, API error, timeout):
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/resume.py <session-name> [message]
Options:
--retry - Retry the last failed task--check - Only check status, don't send messagepython3 ${CLAUDE_PLUGIN_ROOT}/scripts/cleanup.py <session-name> [--remove-worktree]
This plugin automatically sends macOS notifications when:
Configure alerts in hooks/hooks.json.
The spawned agent receives these critical instructions:
Task tool to prevent context overflow../<project>-<branch-name>/ and . replaced with -tmux attach -t <session> to take over interactively--dangerously-skip-permissions)💡 More Claude Code plugins: github.com/ourines