wt

wt is a command for coding agents from smicolon/ai-kit. It costs 30 tokens per session (606 once invoked), scanned A, original, MIT.

Git worktree manager - create, list, remove, and open worktrees with env isolation, Docker port offsets, and database auto-creation.

Command

Installs and runs on its own, but its text points at files inside the plugin that ships it — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed.

Install

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.

agentmods
npx agentmods add commands/smicolon/ai-kit/wt
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Wrote 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.

agentmods badge for wt

README.md
[![agentmods](https://agentmods.dev/badge/commands/smicolon/ai-kit/wt.svg)](https://agentmods.dev/commands/smicolon/ai-kit/wt)
Your own site
<a href="https://agentmods.dev/commands/smicolon/ai-kit/wt"><img src="https://agentmods.dev/badge/commands/smicolon/ai-kit/wt.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 606 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00030 $0.00606
Opus 5 $0.00015 $0.00303
Sonnet 5 $0.00006 $0.00121
Haiku 4.5 $0.00003 $0.00061

Measured today against content hash 906e32f98bf6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

wt 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 today.

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.

packs/worktree/commands/wt.md · 94 lines

What it actually says

Git Worktree Manager

Manage git worktrees with automatic isolation for parallel development.

Usage

/wt <command> [args]

Commands

Command Alias Description
create <branch> c Create worktree with isolation (env, docker, db)
list ls List all worktrees for current repo
remove <branch> rm Remove worktree (stops Docker, add -d to delete branch)
open <branch> [--editor] o Open worktree (--cursor|-c, --agy|-a, --code|-v)

Instructions

Run the worktree manager script:

"${CLAUDE_PLUGIN_ROOT}/scripts/wt.sh" $ARGUMENTS

Examples

# Create worktree for new feature (with full isolation)
/wt create feature/authentication

# Short form
/wt c feat-payments

# List all worktrees
/wt ls

# Remove worktree (stops Docker containers first)
/wt rm feature/authentication

# Remove worktree AND delete branch
/wt rm feat-payments -d

# Open in editor (auto-detect)
/wt o feat-payments

# Open in specific editor
/wt o feat-payments --agy
/wt o feat-payments -c

Naming Convention

~/code/retail-plus/              → main repo
~/code/retail-plus--feat-auth/   → worktree (sibling with --)

Auto-Setup on Create

  1. Loads .worktreeinclude (generates default if missing)
  2. Copies files matching glob patterns
  3. Rewrites env vars (DB_NAME, DATABASE_URL, etc.) with branch suffix
  4. Patches compose file with env var isolation (ports + container names)
  5. Auto-creates database in running Postgres
  6. Detects package manager (bun → pnpm → yarn → npm)
  7. Runs install at root (monorepo-aware)

.worktreeinclude Format

# File patterns to copy
.env*
apps/*/.env*

[rewrite]
auto                    # suffix DB_NAME, DATABASE_URL, etc.
# MY_DB=app_{{BRANCH}} # template mode

[docker]
auto                    # auto-detect compose file
# file=apps/backend/docker-compose.local.yml
# port_offset=10
Changes

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.

  1. today First seen · 94 lines · 30 tokens per session scan A 906e32f98bf6

Subscribe to this mod's changes

wt is a command published in the GitHub repository smicolon/ai-kit (6 stars, last pushed today), licensed MIT. It adds 30 tokens to every session and 606 once invoked, about $0.0002 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-09-03.

Related

Other commands, from other repositories