Borrowing it
Nothing to install: this file belongs to theshadow27/mcp-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/theshadow27/mcp-cli/main/.claude/commands/worktree.mdgit clone --depth 1 https://github.com/theshadow27/mcp-cliWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/theshadow27/mcp-cli/worktree)<a href="https://agentmods.dev/commands/theshadow27/mcp-cli/worktree"><img src="https://agentmods.dev/badge/commands/theshadow27/mcp-cli/worktree/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/theshadow27/mcp-cli/worktree"><img src="https://agentmods.dev/badge/commands/theshadow27/mcp-cli/worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01854 |
| Opus 5.5 | $0.00000 | $0.00742 |
| Sonnet 5.5 | $0.00000 | $0.00371 |
| Haiku 4.5 | $0.00000 | $0.00185 |
Grade A, and why
worktree scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Worktree: Parallel Issue Orchestrator
Orchestrate implementation of one or more GitHub issues in parallel using worktree-isolated agents. Each issue gets its own git worktree, its own agent, and is independently implemented, tested, and verified.
Input
One or more GitHub issue numbers or descriptions, space-separated. Parse from: $ARGUMENTS
Examples:
/worktree 14— single issue/worktree 14 15 16— parallel batch/worktree "add shell completions"— free-text task
Workflow
Step 1: Gather Issues
For each issue number provided:
gh issue view <number> --json number,title,body,labels
For free-text descriptions, treat each as a standalone task.
Present a summary table to the user:
| # | Title | Labels | Approach |
|---|---|---|---|
| 14 | Add shell completions | enhancement | feat |
| 15 | Daemon crashes on bad config | bug | fix |
Ask the user to confirm before proceeding. This is the last checkpoint — after confirmation, agents run autonomously.
Step 2: Check Preconditions
git rev-parse --is-inside-work-tree
git branch --show-current
git status --short
- Must be in a git repo
- Warn if not on main branch (agents branch from HEAD)
- Warn if there are uncommitted changes — agents will branch from current HEAD, so uncommitted work won't be in their worktrees
- Verify
bun installworks (agents will need deps)
Step 3: Implement in Parallel
For EACH issue, spawn an Agent with isolation: "worktree" running in the background. Each agent gets a detailed prompt that includes:
- The full issue context (number, title, body, labels)
- The complete
/implementworkflow instructions (inline — don't reference the command) - Project conventions from CLAUDE.md
Use the Agent tool like this for each issue (all launched in a single message for true parallelism):
Agent(
subagent_type: "general-purpose",
isolation: "worktree",
run_in_background: true,
description: "Implement issue #<N>",
prompt: "<detailed prompt with full issue context and implement workflow>"
)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 203 lines · 0 tokens per session scan A 14cb87599f1f
worktree is a command published in the GitHub repository theshadow27/mcp-cli (2 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,854 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
project
Manage projects: register repos, inspect, configure per-project settings, and remove.
land
Resolve and squash merge one named, currently authorized pull request.
standup
Review my git commits from the past workday and generate a standup summary.
repo-architect
Repository structure optimization and multi-repo management with ruv-swarm coordination for scalable project architecture and development workflows.
weekly-summary
Generate weekly work summary from git activity.
sync
Synchronizes your local swarm state with the latest GitHub repository state, updating task statuses and detecting changes.