creating-worktree

creating-worktree is a skill for Claude Code from joaquimscosta/arkhe-claude-plugins. It costs 78 tokens per session (1,773 once invoked), scanned A, original, MIT.

A Git command that lists merged and inactive branches that may be candidates for cleanup. It is read-only and does not delete branches.

In plain words
What is it for?
Use `/stale-branches` to inspect local branches, or add options to check remote branches, use another base branch, or change the inactivity threshold.
Why use it?
It gives you a quick way to review branch clutter before taking any destructive action.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: model in frontmatter; names the AskUserQuestion tool.

Good fit Use /stale-branches to inspect local branches, or add options to check remote branches, use another base branch, or change the inactivity threshold.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joaquimscosta/arkhe-claude-plugins/creating-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.

Any agent
npx skills add joaquimscosta/arkhe-claude-plugins --skill creating-worktree
Clone the repo
git clone --depth 1 https://github.com/joaquimscosta/arkhe-claude-plugins

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/joaquimscosta/arkhe-claude-plugins/creating-worktree/github.svg)](https://agentmods.dev/skills/joaquimscosta/arkhe-claude-plugins/creating-worktree)
Your own site
<a href="https://agentmods.dev/skills/joaquimscosta/arkhe-claude-plugins/creating-worktree"><img src="https://agentmods.dev/badge/skills/joaquimscosta/arkhe-claude-plugins/creating-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 creating-worktree

Your own site · 80×15
<a href="https://agentmods.dev/skills/joaquimscosta/arkhe-claude-plugins/creating-worktree"><img src="https://agentmods.dev/badge/skills/joaquimscosta/arkhe-claude-plugins/creating-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,773 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.00078 $0.01773
Opus 5.5 $0.00031 $0.00709
Sonnet 5.5 $0.00016 $0.00355
Haiku 4.5 $0.00008 $0.00177

Measured yesterday against content hash 1322d6531c69, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

creating-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 yesterday.

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.

plugins/git/skills/creating-worktree/SKILL.md · 203 lines

How it starts

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

Git Worktree Creation Workflow

Create isolated git worktrees in .claude/worktrees/ with intelligent branch naming. Combines worktree isolation with the same naming convention as the creating-branch skill.

Usage

This skill is invoked when:

  • User runs /worktree or /git:worktree command
  • User requests to create a worktree for isolated work

Two Operation Modes

Mode 1: With Description (Manual)

The command takes a description and automatically detects the commit type.

Format: /worktree <description>

Examples:

/worktree add user authentication
# Worktree: .claude/worktrees/user-authentication
# Branch:   feat/001-user-authentication

/worktree fix login bug
# Worktree: .claude/worktrees/login-bug
# Branch:   fix/002-login-bug

/worktree refactor auth service
# Worktree: .claude/worktrees/auth-service
# Branch:   refactor/003-auth-service

Mode 2: Auto-Generate from Changes (No Arguments)

When no arguments provided and no sdlc-develop specs exist, analyze uncommitted changes to generate names automatically.

Format: /worktree (no arguments)

Process:

  1. Check for sdlc-develop specs (see Mode 3)
  2. If no specs, check for uncommitted changes (both staged and unstaged)
  3. If no changes exist, display error and require description
  4. If changes exist, analyze to generate description
  5. Create worktree with auto-generated names

Mode 3: From SDLC-Develop Spec (Arkhe Integration)

When no arguments provided and sdlc-develop specs exist, create worktree linked to an existing feature spec.

Detection Flow:

  1. Check if .arkhe.yaml exists -> read develop.specs_dir (default: arkhe/specs)
  2. Scan {specs_dir}/ for existing spec directories
  3. If specs found -> present selection via AskUserQuestion
  4. Use spec directory name for worktree and branch names

Naming Convention

This skill produces dual names:

Component Format Example
Worktree directory .claude/worktrees/{keywords} .claude/worktrees/user-authentication
Git branch {type}/{number}-{keywords} feat/001-user-authentication

Read the full file on GitHub · 203 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 203 lines · 78 tokens per session scan A 1322d6531c69

Subscribe to this mod's changes

creating-worktree is a skill published in the GitHub repository joaquimscosta/arkhe-claude-plugins (21 stars, last pushed yesterday), licensed MIT. It adds 78 tokens to every session and 1,773 once invoked, about $0.0003 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-10-16.