worktree-manager

worktree-manager is a skill for Claude Code, Codex from kopp0510/claude-dd. It costs 51 tokens per session (596 once invoked), scanned A, original, MIT.

A workflow for creating and removing Git worktrees, which are separate working directories connected to one Git repository. They let development on one branch stay isolated from another.

In plain words
What is it for?
Use it to create an isolated branch environment, install dependencies, copy environment settings, run baseline tests, and clean up the worktree after development.
Why use it?
It checks the repository before setup, records a test baseline, and keeps branch-specific changes separate from the main working directory.

Skill for Claude CodeCodex

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 skills/kopp0510/claude-dd/worktree-manager
Any agent
npx skills add kopp0510/claude-dd --skill worktree-manager
Clone the repo
git clone --depth 1 https://github.com/kopp0510/claude-dd

Made for: Claude Code, Codex.

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/kopp0510/claude-dd/worktree-manager.svg)](https://agentmods.dev/skills/kopp0510/claude-dd/worktree-manager)
Your own site
<a href="https://agentmods.dev/skills/kopp0510/claude-dd/worktree-manager"><img src="https://agentmods.dev/badge/skills/kopp0510/claude-dd/worktree-manager.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 596 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00051 $0.00596
Opus 5 $0.00026 $0.00298
Sonnet 5 $0.00010 $0.00119
Haiku 4.5 $0.00005 $0.00060

Measured 4d ago against content hash 29fc69d73608, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

skills/worktree-manager/SKILL.md · 35 lines

What it actually says

Worktree Manager

原生優先(Claude Code ≥ 2.1.198):原生 EnterWorktree 工具、CLI --worktree 與 subagent isolation: worktree 已涵蓋建立、會話遷移與自動清理 — 先用原生。 本 skill 只處理原生不覆蓋的場景:自訂位置慣例、依賴安裝與基線測試、舊版 Claude Code。

建立流程

  1. 前置檢查:確認在 git repo 內、git status --porcelain 乾淨(有未提交變更先提示處理)、 git worktree list 無同名衝突
  2. 確認設定(AskUserQuestion 一次問完):分支名(建議 feature/<name> 前綴)、 位置(慣例:主 repo 平行目錄 ../<project>-worktree-<branch>)、是否裝依賴
  3. 建立git worktree add -b <branch> <path> <base-branch>
  4. 環境設定:裝依賴(npm/pip 等,依專案)、複製 .env.example.env(如存在)
  5. 基線測試:跑既有測試記錄基線 — 失敗時警告但不阻止建立(帶著已知紅燈開發, 之後才分得清是誰弄壞的)
  6. 記錄:在 worktree 根寫 WORKTREE_INFO.md(分支、base、路徑、基線結果)

收尾

開發完成後:確認 worktree 內變更已全部 commit → 回主 repo git worktree remove <path>git worktree prune。merge 與分支刪除由使用者決定,本 skill 不代決。

限制備忘

  • 一個分支只能有一個 worktree;已被 worktree 佔用的分支不能再 checkout
  • 子模組專案需特殊處理,先確認再建
  • worktree 共用主 repo 的 .gitignore;額外忽略規則用 .git/info/exclude
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. 4d ago First seen · 35 lines · 51 tokens per session scan A 29fc69d73608

Subscribe to this mod's changes

worktree-manager is a skill published in the GitHub repository kopp0510/claude-dd (6 stars, last pushed 4d ago), licensed MIT. It adds 51 tokens to every session and 596 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens