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/gopherguides/gopher-ai/create-worktreegit clone --depth 1 https://github.com/gopherguides/gopher-aiWhat 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.00014 | $0.00900 |
| Opus 5 | $0.00007 | $0.00450 |
| Sonnet 5 | $0.00003 | $0.00180 |
| Haiku 4.5 | $0.00001 | $0.00090 |
Grade A, and why
create-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 2d 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 — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Create Worktree for Issue or PR
If $ARGUMENTS is empty or not provided:
This command creates or reuses an isolated git worktree for working on a GitHub issue or PR.
Usage: /create-worktree <issue-or-pr-number>
Examples:
/create-worktree 789— create worktree for issue #789/create-worktree 42— if #42 is a PR, resolve its linked issue and create or reuse the issue worktree
What it does: detects PR vs issue → reuses an existing standard issue
worktree if found → otherwise creates ../reponame-issue-<num>-<title>/ from
the default branch → creates the issue branch → optionally copies env files →
registers worktree state.
Prerequisites: gh authenticated; run from inside a git repository.
Ask the user: "What issue or PR number would you like to work on?"
If $ARGUMENTS is provided:
Clear Worktree State
Clear stale worktree state so the pre-tool-use hook does not block setup commands:
"${CLAUDE_PLUGIN_ROOT}/scripts/worktree-state.sh" clear 2>/dev/null || true
Environment Files
Check whether the source repo has environment files before creating or reusing the worktree:
SOURCE_DIR="$(pwd)"
"${CLAUDE_PLUGIN_ROOT}/scripts/worktree-create.sh" env-files --source-dir "$SOURCE_DIR"
If the output starts with ENV_FILES_FOUND=true, use AskUserQuestion: "Found
environment files (may contain secrets). Copy them to the worktree?" with
Yes, copy them / No, skip.
Create or Reuse Worktree
If the user chose to copy env files:
SOURCE_DIR="$(pwd)"
"${CLAUDE_PLUGIN_ROOT}/scripts/worktree-create.sh" create "$ARGUMENTS" --source-dir "$SOURCE_DIR" --copy-env
Otherwise:
SOURCE_DIR="$(pwd)"
"${CLAUDE_PLUGIN_ROOT}/scripts/worktree-create.sh" create "$ARGUMENTS" --source-dir "$SOURCE_DIR" --no-copy-env
The script validates input and prerequisites, detects PR vs issue, derives the standard branch and path, fetches the default branch, creates or reuses the worktree, optionally copies env files, registers state, and prints:
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.
- 2d ago First seen · 109 lines · 14 tokens per session scan A 87dbe748cb9f
create-worktree is a command published in the GitHub repository gopherguides/gopher-ai (21 stars, last pushed 2d ago), licensed MIT. It adds 14 tokens to every session and 900 once invoked, about $0.0001 per session on Opus 5. 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-30.
Other commands, from other repositories
merge
Finalize work on a branch: verify docs + tree are clean, merge to main, clean up. Supports both standard git checkout -b branches and git worktree flows — auto-detected at pre-flight.
expect
Diff-aware AI browser testing — reads the git diff, maps changes to affected pages via the route map, generates a targeted test plan, and executes it via agent-browser (Rust daemon + CDP, ARIA-tree-first) with pass/fail reporting. Use when testing UI changes, verifying PRs before merge, or running regression checks on…
speckit.tasks
Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.
dev
Runs Vendure in development mode. By default it starts three processes: the GraphQL server (ts-node ./src/index.ts), the worker (ts-node ./src/index-worker.ts), and the dashboard (a Vite dev server).
start
Runs a project that has already been compiled with vendure build.
pipeline-undo
Undo a pipeline run's result. With worktree isolation (the current engine), this is clean and low-risk: a run never touches your checkout — its result lives only on a pipeline/ branch (and, for a --push run, on the remote). "Undo" therefore means deleting that branch and its worktree, not reverting your working tree.