using-git-worktrees

using-git-worktrees is a skill for Claude Code, Codex from DollarDill/beads-superpowers. It costs 35 tokens per session (2,644 once invoked), scanned A, original, MIT.

A workflow for creating isolated Git worktrees, which are separate working directories connected to the same repository. It includes checks for choosing a safe directory and keeping work isolated from the current workspace.

In plain words
What is it for?
Use it before starting feature work or an implementation plan that should happen in its own workspace, and to list or remove those worktrees.
Why use it?
It prevents feature work from interfering with existing changes or branches. Developers can work on several branches at the same time without repeatedly switching the main directory.

Skill for Claude CodeCodex

Part of the beads-superpowers plugin — 22 skills, 1 agent, 1 hook shipped together

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

Made for: Claude Code, Codex.

Or install beads-superpowers, the plugin that ships this one along with the rest of its 22 skills, 1 agent, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/dollardill/beads-superpowers/using-git-worktrees.svg)](https://agentmods.dev/skills/dollardill/beads-superpowers/using-git-worktrees)
Your own site
<a href="https://agentmods.dev/skills/dollardill/beads-superpowers/using-git-worktrees"><img src="https://agentmods.dev/badge/skills/dollardill/beads-superpowers/using-git-worktrees.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,644 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.00035 $0.02644
Opus 5 $0.00017 $0.01322
Sonnet 5 $0.00007 $0.00529
Haiku 4.5 $0.00003 $0.00264

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

Security

Grade A, and why

using-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 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/using-git-worktrees/SKILL.md · 262 lines

How it starts

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

Using Git Worktrees

Overview

Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.

Core principle: Systematic directory selection + safety verification = reliable isolation.

Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace."

Iron Law: Use bd worktree, NOT git worktree

ALWAYS use bd worktree commands. NEVER use raw git worktree commands.

Why: bd worktree create does everything git worktree add does PLUS:

  • Worktree automatically shares the main repo's beads database via git common directory discovery
  • Adds the worktree path to .gitignore automatically
  • Ensures consistent issue state across all worktrees

Raw git worktree add misses .gitignore setup and safety checks — while beads database sharing works via git common directory, you lose the automation bd worktree create provides.

Action Use This NOT This
Create worktree bd worktree create .worktrees/<name> git worktree add
List worktrees bd worktree list git worktree list
Remove worktree bd worktree remove .worktrees/<name> (if the safety check flags the local-only branch as unpushed, verify the merge landed, then add --force) git worktree remove
Worktree info bd worktree info (no equivalent)

Note: Claude Code provides a native EnterWorktree tool for worktree management. For non-beads projects, this is a viable alternative. For beads-integrated projects, bd worktree create remains mandatory — it handles database sharing and .gitignore management that EnterWorktree does not provide.

Deliberate divergence from upstream: superpowers v6.0.3 rewrote this skill to prefer the harness-native worktree tool first (EnterWorktree → existing .worktrees/ → raw git worktree). We do not adopt that native-tool-first selection order — it bypasses bd worktree's beads-database sharing across worktrees. The Iron Law above (always bd worktree) is intentional and takes precedence.

Read the full file on GitHub · 262 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. 4d ago First seen · 262 lines · 35 tokens per session scan A d97acdd4f837

Subscribe to this mod's changes

using-git-worktrees is a skill published in the GitHub repository DollarDill/beads-superpowers (26 stars, last pushed 12d ago), licensed MIT. It adds 35 tokens to every session and 2,644 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

beads-onboard

This skill should be used when the user asks to "onboard beads", "set up beads conventions", "configure beads for this project", "set up project labels", "improve my beads quality", "run beads onboard", "upgrade beads conventions", "re-run beads onboard", or when a project has .beads/ but no .beads/conventions/…

seanmartinsmith/sms-public-mkt · 96 tokens

compound-v

Use when superpowers:brainstorming is about to begin (pre-brainstorm recon), OR has produced a spec, OR when superpowers:writing-plans has produced a plan, OR when about to invoke superpowers:subagent-driven-development or superpowers:executing-plans. Sidekick that intercepts these four Superpowers transitions — runs…

procoders/superpowers-v · 103 tokens

backend-launcher

Use when Compound V's dispatcher needs to run one file-scoped job on a chosen backend (Claude subagent, headless Codex worker, headless Antigravity worker, headless Cursor worker, headless Devin worker, or headless opencode worker) and get back a canonical jobresult. The single jobspec → jobresult contract every…

procoders/superpowers-v · 91 tokens

pr-review

Use when the user wants to deeply review a pull/merge request or a local diff — "review this PR", "grill the MR", "stress-test this diff", "deep-dive code review", "code review before merge", or when they name a PR/MR URL, number, or feature branch. Works on GitHub (gh), GitLab (glab), or a plain local branch with no…

procoders/superpowers-v · 96 tokens

dolt-mcp-vcs

Universal Dolt version-control workflow. Step 0 auto-detects what kind of Dolt stack is present — every make and model (classic Dolt repo, live dolt sql-server on its ACTUAL bound port, bd embedded store, Doltgres, DoltLite single-file DB, DumboDB) — and emits a ready-to-use connection descriptor, then routes to work…

jeremylongshore/dolt-mcp-vcs-plugin · 252 tokens

linear-workspace

Linear issue management — routes work to specialized agents and slash commands. Use when: creating, updating, searching, bulk-editing, cleaning up, syncing Linear. TRIGGERS: "linear", "ticket", "issue", "create issue", "update issue", "search issues", "my issues", "bulk", "cleanup", "sync", "log bug", "file issue"…

Elnora-AI/elnora-linear · 126 tokens