worktree-manager

worktree-manager is a skill for Claude Code, Codex from smicolon/ai-kit. It costs 77 tokens per session (1,064 once invoked), scanned A, original, MIT.

A Git worktree workflow for creating separate folders for different branches of one repository, with isolated environment, Docker, and database settings.

In plain words
What is it for?
It is for creating, viewing, opening, and removing branch workspaces during parallel development.
Why use it?
It reduces conflicts when several branches are developed at the same time.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for creating, viewing, opening, and removing branch workspaces during parallel development.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/smicolon/ai-kit/worktree-manager
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.

Any agent
npx skills add smicolon/ai-kit --skill worktree-manager
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin worktree — /plugin install worktree after adding the marketplace above.

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 worktree-manager

README.md
[![agentmods](https://agentmods.dev/badge/skills/smicolon/ai-kit/worktree-manager/github.svg)](https://agentmods.dev/skills/smicolon/ai-kit/worktree-manager)
Your own site
<a href="https://agentmods.dev/skills/smicolon/ai-kit/worktree-manager"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/worktree-manager/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.

agentmods 80×15 button for worktree-manager

Your own site · 80×15
<a href="https://agentmods.dev/skills/smicolon/ai-kit/worktree-manager"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/worktree-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,064 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original 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.1 $0.00077 $0.01064
Opus 5.5 $0.00031 $0.00426
Sonnet 5.5 $0.00015 $0.00213
Haiku 4.5 $0.00008 $0.00106

Measured 1mo ago against content hash 84f8b65871a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

worktree-manager 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 1mo 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.

packs/worktree/skills/worktree-manager/SKILL.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Worktree Manager Skill

Manages git worktrees for parallel development with automatic environment isolation.

Activation Triggers

This skill activates when the user:

  • Asks about "worktree" or "git worktree"
  • Mentions "wt" in context of git/branches
  • Wants to "work on multiple branches simultaneously"
  • Needs a "separate workspace for a feature"
  • Asks about "parallel development" setup
  • Wants to "set up a new branch workspace"
  • Has "docker port conflicts" between branches
  • Needs "database isolation" for parallel work
  • Asks about ".worktreeinclude" or "env isolation"

Commands Reference

Command Alias Description
/wt create <branch> /wt c Create worktree with full isolation
/wt list /wt ls Show all worktrees
/wt remove <branch> /wt rm Remove worktree (stops Docker first)
/wt open <branch> [--editor] /wt o Open (--cursor|-c, --agy|-a, --code|-v)

Naming Convention

Worktrees are created as siblings with -- separator:

~/[PARENT_DIRECTORY]/[REPO_NAME]/              # main repo
~/[PARENT_DIRECTORY]/[REPO_NAME]--[BRANCH_NAME]/   # worktree for [BRANCH_NAME]

Three-Layer Isolation

Layer 1: .worktreeinclude — File Selection

Gitignore-style file at repo root controlling which untracked files to copy. Auto-generated with sensible defaults on first wt create.

.env*
# apps/*/.env*

[rewrite]
auto

[docker]
auto

Layer 2: [rewrite] — Env Var Isolation

  • auto: Suffixes DB_NAME, POSTGRES_DB, DATABASE_URL, COMPOSE_PROJECT_NAME with branch slug
  • {{BRANCH}}: Template placeholder for custom vars

Layer 3: [docker] — Docker Compose Env Var Isolation

  • Patches compose file with ${WT_PORT_*:-default} and ${WT_CONTAINER_PREFIX:-default} syntax
  • Writes port/container env vars + COMPOSE_PROJECT_NAME to .env
  • Auto-creates databases in running Postgres

Auto-Setup Features

When creating a worktree, the following happens automatically:

Read the full file on GitHub · 114 lines

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. 1mo ago First seen · 114 lines · 77 tokens per session scan A 84f8b65871a6

Subscribe to this mod's changes

worktree-manager is a skill published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 1mo ago), licensed MIT. It adds 77 tokens to every session and 1,064 once invoked, about $0.0003 per session on Opus 5.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.