speckit.worktrees.create

speckit.worktrees.create is a command for Claude Code from arrrrny/zuraffa. It costs 17 tokens per session (1,191 once invoked), scanned A, original, MIT.

A command that creates a separate Git worktree for a feature branch. A Git worktree is another working folder connected to the same repository, so multiple branches can be used at once.

In plain words
What is it for?
Use it to create an isolated folder for a branch, including when several agents need to work concurrently.
Why use it?
It lets developers or agents work on parallel features without repeatedly switching branches in one folder.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: positional $N argument.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/me/code/MyProject--005-user-auth.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code.

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 speckit.worktrees.create

README.md
[![agentmods](https://agentmods.dev/badge/commands/arrrrny/zuraffa/speckit.worktrees.create.svg)](https://agentmods.dev/commands/arrrrny/zuraffa/speckit.worktrees.create)
Your own site
<a href="https://agentmods.dev/commands/arrrrny/zuraffa/speckit.worktrees.create"><img src="https://agentmods.dev/badge/commands/arrrrny/zuraffa/speckit.worktrees.create.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,191 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.1 $0.00017 $0.01191
Opus 5 $0.00009 $0.00596
Sonnet 5 $0.00003 $0.00238
Haiku 4.5 $0.00002 $0.00119

Measured 2d ago against content hash bf64954df59d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

speckit.worktrees.create 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.

.specify/extensions/worktrees/commands/speckit.worktrees.create.md · 100 lines

How it starts

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

Create Worktree

Spawn an isolated git worktree for a feature branch so you can work on multiple features — or run multiple agents — in parallel without switching branches.

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty). The user may specify:

  • A branch name (e.g., 005-user-auth)
  • current to create a worktree for the current branch
  • --in-place or --no-worktree to skip worktree creation entirely

Prerequisites

  1. Verify the project is a git repository (git rev-parse --show-toplevel)
  2. Verify git worktree is available (git worktree list succeeds)

Git extension (optional): The Spec Kit Git extension’s before_specify → speckit.git.feature checks out the feature branch on the current tree. For parallel agents on one primary clone, maintainers recommend disabling that hook in .specify/extensions.yml and relying on git worktree add -b (this script) so the primary HEAD stays put. See the extension README Parallel agents and the Git extension.

Configuration

Read configuration from .specify/extensions/worktrees/worktree-config.yml if it exists. Defaults apply when the file is absent.

Key Default Description
layout nested nested — worktree at .worktrees/<branch>/ inside repo (self-contained); sibling — at ../<repo>--<branch> (IDE-friendly)
auto_create true When true, the after_specify hook creates a worktree without prompting
sibling_pattern {{repo}}--{{branch}} Name pattern for sibling directories
dotworktrees_dir .worktrees Subdirectory name for nested layout

Environment variable SPECIFY_WORKTREE_PATH overrides the computed path entirely.

Outline

  1. Determine target branch:
    • If user specifies a branch name, use that
    • If user says current, use the output of git branch --show-current
    • If no input and this is an after_specify hook call, use the branch that /speckit.specify just created (read from SPECIFY_FEATURE env var or the most recent feature branch)
    • Validate the branch exists in git (local or remote)

Read the full file on GitHub · 100 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. 2d ago First seen · 100 lines · 17 tokens per session scan A bf64954df59d

Subscribe to this mod's changes

speckit.worktrees.create is a command published in the GitHub repository arrrrny/zuraffa (5 stars, last pushed yesterday), licensed MIT. It adds 17 tokens to every session and 1,191 once invoked, about $0.0001 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-09-03.