worktree-task
Skill39 starsChanged 12 months agoMITView on GitHub
使用 git worktree + 背景代理会话管理大型任务(默认启动 Claude Code;可用 --codex 快速切到 Codex CLI,或通过 --agent-cmd 指定任意命令)。适合用户希望在不阻塞当前会话的情况下执行大型或多步骤任务。
1 other project uses a version of this.
Adopted by
Most recently taken up by
- lestrrat/claude-codetheir own version, first seen May 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- lestrrat/claude-code★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Use these slash commands for precise control:
- Distinctive: line 42
Verify git status is clean (or prompt to commit/stash)
- Distinctive: line 43
Create a git worktree with the specified branch
- Distinctive: line 44
Create a tmux session
- Distinctive: line 58
If a task is interrupted (rate limit, API error, timeout):
- Distinctive: line 88
Silent mode: - No confirmations needed, user has pre-approved all operations
- Distinctive: line 89
Complete execution: - Do not stop until all tasks are done
- Distinctive: line 90
Track with TodoWrite: - Create and update todo list for visibility
- Very specific: line 97
Use tmux attach -t <session> to take over interactively
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Worktree Task Manager
This skill manages large coding tasks by spawning autonomous agent instances (默认 Claude Code,可选 --codex/--agent-cmd) in separate git worktrees via tmux sessions.
When to Use
- User wants to execute a large task (>20 subtasks) without blocking current session
- User mentions "background", "parallel", "worktree", or "autonomous" execution
- Task involves creating a new service, major refactoring, or implementing complex features
- User wants to continue other work while a large task runs
Available Commands
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 |
Core Workflow
1. Launch a Task
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:
- Verify git status is clean (or prompt to commit/stash)
- Create a git worktree with the specified branch
- Create a tmux session
- Launch Claude Code by default (use
--codexfor default Codex command or--agent-cmdto switch, e.g.,codex --yolo -m gpt-5.1-codex-max -c model_reasoning_effort="high") - Send the task with instructions to use Task tool for each phase
2. Monitor Progress
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/status.py [session-name]Without arguments, lists all active sessions. With a session name, shows detailed status.
3. Resume an Interrupted Task
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 message
4. Cleanup
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/cleanup.py <session-name> [--remove-worktree]Alerts
This plugin automatically sends macOS notifications when:
- A background task completes successfully
- A task encounters an error (rate limit, API error)
- A session ends
Configure alerts in hooks/hooks.json.
Critical Instructions for Spawned Claude
The spawned agent receives these critical instructions:
- MUST use Task tool - Each major phase must be executed via
Tasktool to prevent context overflow - Silent mode - No confirmations needed, user has pre-approved all operations
- Complete execution - Do not stop until all tasks are done
- Track with TodoWrite - Create and update todo list for visibility
- Commit often - Make atomic commits after each logical unit
Notes
- Worktrees are created in parent directory:
../<project>-<branch-name> - tmux session names have
/and.replaced with- - Use
tmux attach -t <session>to take over interactively - The spawned Claude runs with full permissions (
--dangerously-skip-permissions)
💡 More Claude Code plugins: github.com/ourines
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

