Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/theshadow27/mcp-cli/worktreegit clone --depth 1 https://github.com/theshadow27/mcp-cliWhat 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 | $0.00000 | $0.01854 |
| Opus 5 | $0.00000 | $0.00927 |
| Sonnet 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 yesterday.
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.
- yesterday 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 2d 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
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.