create-worktree

create-worktree is a command for Claude Code, Cursor from jabrena/plinth. It costs 14 tokens per session (674 once invoked), scanned A, original, Apache-2.0.

A command that creates a separate Git worktree, which is another working folder connected to the same repository, on a new branch.

In plain words
What is it for?
Use it to start feature, bug-fix, documentation, refactoring, or maintenance work in a new branch and folder, optionally from a chosen base revision.
Why use it?
It keeps parallel work isolated so changes in one task do not disturb the current checkout.

Command for Claude CodeCursor

Written for Claude Code and Cursor: argument-hint in frontmatter, but also installed under .cursor/. Also seen: model in frontmatter.

Good fit Use it to start feature, bug-fix, documentation, refactoring, or maintenance work in a new branch and folder, optionally from a chosen base revision.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jabrena/plinth/create-worktree
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.

Clone the repo
git clone --depth 1 https://github.com/jabrena/plinth

Made for: Claude Code, Cursor.

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 create-worktree

README.md
[![agentmods](https://agentmods.dev/badge/commands/jabrena/plinth/create-worktree/github.svg)](https://agentmods.dev/commands/jabrena/plinth/create-worktree)
Your own site
<a href="https://agentmods.dev/commands/jabrena/plinth/create-worktree"><img src="https://agentmods.dev/badge/commands/jabrena/plinth/create-worktree/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 create-worktree

Your own site · 80×15
<a href="https://agentmods.dev/commands/jabrena/plinth/create-worktree"><img src="https://agentmods.dev/badge/commands/jabrena/plinth/create-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 674 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.00014 $0.00674
Opus 5.5 $0.00006 $0.00270
Sonnet 5.5 $0.00003 $0.00135
Haiku 4.5 $0.00001 $0.00067

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

Security

Grade A, and why

create-worktree 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 2mo 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.

.cursor/commands/create-worktree.md · 68 lines

How it starts

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

create-worktree

Always create a new branch and linked Git worktree for isolated or parallel work without changing the current checkout.

Usage

/create-worktree <issue-or-change|type description> [<target-path>] [<base-reference>]

Accepted Inputs

  • An issue/change identifier, or an explicit branch type and description
  • Optional preferred target path
  • Optional base reference
  • Supported branch types: feat, fix, docs, refactor, and chore
  • Preferred branch format: <type>/<issue-or-change>-<kebab-case-description> when an issue or OpenSpec change is available, otherwise <type>/<kebab-case-description>
  • Fresh-name rule: if the preferred branch name or target path already exists, derive the next unused suffix such as -2, -3, and continue with the fresh branch/worktree

Owning Agent

@plinth-tech-lead

Associated Capabilities

  • Git branch naming and validation
  • Git linked worktrees
  • Parallel OpenSpec child-change coordination

Workflow

  1. Resolve the preferred branch name from the issue/change identifier or explicit branch details.
  2. Resolve an absolute preferred target path and the base reference.
  3. Resolve the repository default branch and the current branch.
  4. Verify the current checkout is main or the repository default branch before creating the worktree branch.
  5. If the current branch is not main or the default branch, stop and ask whether to switch to the default branch, choose a different base, or continue explicitly from the current branch.
  6. Verify the repository and selected base reference are valid before creating anything.
  7. Derive a fresh branch name and fresh target path when the preferred branch exists, is checked out in another worktree, or the preferred target path exists.
  8. Verify the final branch name does not exist, is not checked out in another worktree, and the final target path does not exist.
  9. Run the equivalent of git worktree add -b <branch> <target-path> <base-reference>.
  10. Report the created branch, absolute worktree path, base reference, and cleanup command.

Read the full file on GitHub · 68 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. 2mo ago First seen · 68 lines · 14 tokens per session scan A 10f8f9db8b77

Subscribe to this mod's changes

create-worktree is a command published in the GitHub repository jabrena/plinth (456 stars, last pushed yesterday), licensed Apache-2.0. It adds 14 tokens to every session and 674 once invoked, about $0.0001 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-30.