git-worktrees

A workflow for creating separate working directories linked to different Git branches. These directories, called worktrees, let multiple changes be developed in parallel from one repository.

In plain words
What is it for?
Use it to create, list, or remove worktrees when developing several features or fixes at the same time.
Why use it?
It avoids repeatedly switching branches in the same folder and keeps parallel feature work separate. It also defines naming and cleanup conventions.

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/saski/arnesto/git-worktrees
Any agent
npx skills add saski/arnesto --skill git-worktrees
Clone the repo
git clone --depth 1 https://github.com/saski/arnesto

Made for: Claude Code, Codex.

Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 336 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00033 $0.00336
Opus 5 $0.00016 $0.00168
Sonnet 5 $0.00007 $0.00067
Haiku 4.5 $0.00003 $0.00034

Measured 2d ago against content hash 5a9679236bca, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

Origin

This is a copy

100% identical to git-worktrees — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/git-worktrees/SKILL.md · 55 lines

What it actually says

Git Worktrees

Directory Convention

Worktrees live in a sibling directory named <project>_worktrees:

parent/
├── myproject/              # main repo
└── myproject_worktrees/    # worktrees directory
    ├── feature_1/
    └── feature_2/

Branch Naming

Use <feature>_<N> pattern when creating multiple worktrees:

  • auth-refactor_1, auth-refactor_2
  • api-migration_1, api-migration_2

Workflow

  1. Get project name from current directory
  2. Create worktrees directory if needed: ../<project>_worktrees/
  3. Create worktree with new branch: git worktree add <path> -b <branch>

Creating Multiple Worktrees

When asked for N worktrees for a feature:

PROJECT=$(basename "$PWD")
WORKTREES_DIR="../${PROJECT}_worktrees"
mkdir -p "$WORKTREES_DIR"

for i in $(seq 1 N); do
    git worktree add "${WORKTREES_DIR}/<feature>_${i}" -b "<feature>_${i}"
done

Cleanup

Remove worktree and branch:

git worktree remove <path>
git branch -d <branch>

List all worktrees: git worktree list

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. 2d ago First seen · 55 lines · 33 tokens per session scan A 5a9679236bca

Subscribe to this mod's changes

git-worktrees is a skill published in the GitHub repository saski/arnesto (5 stars, last pushed 7d ago), licensed Unlicense. It adds 33 tokens to every session and 336 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to git-worktrees, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

pixir-delegate

Use Pixir as a headless subagent runtime from Claude Code or any harness with skill ! preprocessing (Codex roots and other no-hydration hosts use pixir-delegate-codex instead) — one-shot workers (pixir --json), parallel fan-out to N children (pixir delegate --spec), resumable steering (pixir resume), evidence…

Ranvier-Technologies/pixir · 126 tokens

pixir-delegate-codex

Use when a Codex CLI/Desktop root should fan out subagents, delegate to Pixir workers, run parallel workers, or manage a resident delegation daemon via Pixir Delegate; covers Codex preflight, AGENTS.md, approvals/sandbox, dry-run, daemon start/status/attach/cancel, closure evidence, and audited single-run execution…

Ranvier-Technologies/pixir · 89 tokens

pixir-diagnostics

Diagnose Pixir and T3 Code Pixir incidents from local canonical evidence. Use when a Pixir run, ACP/T3 thread, subagent/workflow, provider replay, or daily-driver dogfood session appears stuck, inconsistent, missing tool output, or hard to classify.

Ranvier-Technologies/pixir · 61 tokens

readonly-review

Run a no-network read-only review practice with two explorer steps and one synthesis step.

Ranvier-Technologies/pixir · 20 tokens

pixir-delegate-native

Delegate work to subagents from INSIDE a Pixir session using the native Subagent tools (spawnagent, waitagent, closeagent, listagents, sendinput) instead of shelling out to the pixir CLI. Use when you are a Pixir session that needs to fan out parallel workers, steer a child, or run skill-backed workflow templates …

Ranvier-Technologies/pixir · 89 tokens

repo-contracts-and-boundaries

Use when turning architecture, layering, ownership, dependency direction, schemas, structural metrics, quality thresholds, baselines, allowlists, or generated quality snapshots into repository checks.

yfge/agent-harness-skills · 41 tokens