git-worktree-manager

git-worktree-manager is a skill for Claude Code, Codex from Morningstar202604/awesome-skillkit. It costs 104 tokens per session (1,803 once invoked), scanned A, original, Apache-2.0.

A Git workflow aid for keeping multiple branches in separate working directories. A Git worktree lets each branch have its own checkout while sharing the same repository history.

In plain words
What is it for?
Use it to create and clean up worktrees, assign separate ports, copy local environment files, install dependencies, and detect stale worktrees or uncommitted changes before removal.
Why use it?
It prevents parallel feature work, development servers, environment files, and multiple coding agents from interfering with one another.

Skill for Claude CodeCodex

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

Good fit Use it to create and clean up worktrees, assign separate ports, copy local environment files, install dependencies, and detect stale worktrees or uncommitted changes before removal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/morningstar202604/awesome-skillkit/git-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 Morningstar202604/awesome-skillkit --skill git-worktree-manager
Clone the repo
git clone --depth 1 https://github.com/Morningstar202604/awesome-skillkit

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/git-worktree-manager"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/git-worktree-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,803 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.00104 $0.01803
Opus 5.5 $0.00042 $0.00721
Sonnet 5.5 $0.00021 $0.00361
Haiku 4.5 $0.00010 $0.00180

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

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/worktree_cleanup.py, scripts/worktree_manager.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

site/skills/programming/github/git-worktree-manager/SKILL.md · 133 lines

How it starts

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

Git Worktree Manager

Develop in parallel safely with Git worktrees: one isolated work tree per branch, automated port allocation, environment sync, and cleanup. Built for multi-agent workflows where each agent/terminal session owns exactly one worktree.

Input Checklist

Input Required Description
--repo Required Main repo path (default .)
--branch Required (on create) New or existing branch name, e.g. feature/new-auth
--name Required (on create) Worktree directory name; suggest wt-<topic>
--base-branch Optional The base for a new branch, e.g. main/develop
--stale-days Optional Days alive before cleanup judges it stale (default 14)
--install-deps Optional Detect and install dependencies per the lockfile
--format Optional text (human review, default) or json (pipelines)

When inputs are missing, ask for all at once: "Please provide: (1) main repo path (default current directory), (2) branch name, (3) worktree name (suggested wt-<topic>), (4) base branch (default main). Everything else defaults: don't install deps, output text."

Pre-flight Checks

git rev-parse --is-inside-work-tree   # expected true; on failure: not a git repo → STOP
# Self-check: python3 scripts/worktree_manager.py --help and worktree_cleanup.py --help should both exit 0
git rev-parse --verify main >/dev/null 2>&1   # expected: the base branch exists; on failure: confirm --base-branch

Workflow

Step 1: Create a fully provisioned worktree

# Single-line usage is shown in Step 2's --input example (runnable as-is); the wrapped layout below is readability only; merge into one line when copying:
# python3 scripts/worktree_manager.py \
#   --repo . \
#   --branch feature/new-auth \
#   --name wt-auth \
#   --base-branch main \
#   --install-deps \
#   --format text

Expected: create the worktree directory and switch to the target branch (create it from the base if it doesn't exist), generate a .worktree-ports.json port map, copy .env*, and the script exits 0. If a worktree already exists at the same path, reuse it directly (idempotent, exit 0). On failure: the target path already exists → check the path, don't overwrite; dependency install fails → keep the worktree, mark its status, and hand off for manual recovery; .env copy fails → warn and list the missing files, then continue.

Read the full file on GitHub · 133 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 Changed · -4 tokens per session 0e66f8ec8bec
  2. 1mo ago Changed 8c847050a9a5
  3. 1mo ago Changed · -66 lines · +29 tokens per session scan C → A c82e769c0429
  4. 1mo ago First seen · 199 lines · 79 tokens per session scan C 504f1792d45b

Subscribe to this mod's changes

git-worktree-manager is a skill published in the GitHub repository Morningstar202604/awesome-skillkit (0 stars, last pushed 25d ago), licensed Apache-2.0. It adds 104 tokens to every session and 1,803 once invoked, about $0.0004 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-08-31.