git-worktrees

git-worktrees is a skill for Claude Code, Codex from saski/arnesto. It costs 33 tokens per session (336 once invoked), scanned A, a copy of git-worktrees, Unlicense.

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

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to create, list, or remove worktrees when developing several features or fixes at the same time.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/saski/arnesto/git-worktrees
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 saski/arnesto --skill git-worktrees
Clone the repo
git clone --depth 1 https://github.com/saski/arnesto

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/saski/arnesto/git-worktrees"><img src="https://agentmods.dev/badge/skills/saski/arnesto/git-worktrees.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00033 $0.00336
Opus 5.5 $0.00013 $0.00134
Sonnet 5.5 $0.00007 $0.00067
Haiku 4.5 $0.00003 $0.00034

Measured 1mo ago against content hash 5a9679236bca, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

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. 1mo 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 (6 stars, last pushed 5d ago), licensed Unlicense. It adds 33 tokens to every session and 336 once invoked, about $0.0001 per session on Opus 5.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.