使用 git worktree + 背景代理会话管理大型任务(默认启动 Claude Code;可用 --codex 快速切到 Codex CLI,或通过 --agent-cmd 指定任意命令)。适合用户希望在不阻塞当前会话的情况下执行大型或多步骤任务。
/plugin marketplace add ourines/worktree-task-plugin/plugin install worktree-task@worktree-task-pluginThis skill inherits all available tools. When active, it can use any tool Claude has access to.
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
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.