create-worktree

A command for creating a Git worktree, which is a separate working folder connected to the same repository. Each worktree can hold its own branch and files.

In plain words
What is it for?
Creating an adjacent worktree folder, making a new branch with the requested name, and opening that new working copy.
Why use it?
It lets you work on another branch in a separate directory without switching the branch in your main project folder.

Command for Claude Code

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 commands/captainme-ai/lead-dev-os/create-worktree
Clone the repo
git clone --depth 1 https://github.com/CaptainMe-AI/lead-dev-os

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 129 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.00000 $0.00129
Opus 5 $0.00000 $0.00064
Sonnet 5 $0.00000 $0.00026
Haiku 4.5 $0.00000 $0.00013

Measured yesterday against content hash fceede2df375, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

.claude/commands/create-worktree.md · 13 lines

What it actually says

Follow these steps to create a git worktree.

  1. Get the current project's folder name.

  2. Create a folder adjacent to the current project's folder and name it {current project folder name}-worktrees. For example, if the current project folder is named myapp, create folder called myapp-worktrees. Both myapp and myapp-worktrees should have the same parent folder.

  3. Create a git worktree and branch named $ARGUMENTS from the main project folder and save it inside the {current project folder name-worktrees folder that was created.

  4. cd into the new $ARGUMENTS worktree folder

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 · 13 lines · 0 tokens per session scan A fceede2df375

Subscribe to this mod's changes

create-worktree is a command published in the GitHub repository CaptainMe-AI/lead-dev-os (2 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 129 tokens. 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-31.

Related

Other commands, from other repositories

hf.audit-code

Run a comprehensive code quality audit across the entire repo. Dynamically analyzes source code for dead code, complexity, duplication, error handling gaps, type safety issues, class cohesion, and method size. Creates GitHub issues for findings so HydraFlow can process them.

T-rav/hydraflow · 0 tokens

hf.audit-tests

Run a comprehensive test quality audit across the entire repo. Analyzes test naming, structure, hygiene, factory usage, fluent builder patterns, anti-patterns, coverage gaps, and flaky patterns. Creates GitHub issues for findings so HydraFlow can process them.

T-rav/hydraflow · 0 tokens

hf.audit-integration-tests

Run a comprehensive integration test audit across the entire repo. Dynamically discovers external dependencies in source code, inventories existing integration tests, identifies coverage gaps, flags ugly/outdated tests, and creates GitHub issues for findings.

T-rav/hydraflow · 0 tokens

hf.issue

Take a rough description from the user, research the relevant codebase, and create a well-structured GitHub issue with full context, file references, and acceptance criteria.

T-rav/hydraflow · 0 tokens

hf.audit-hooks

Audit all Claude Code hooks (.claude/settings.json and .claude/hooks/.sh) for correctness, efficiency, and gating opportunities. Launch a single agent that reads everything and reports findings.

T-rav/hydraflow · 0 tokens

hf.memory

Scan the current conversation for architectural decisions, bug root causes, configuration choices, codebase patterns, and workflow preferences. Write each as a memory item to the local JSONL store for ingestion by the memory sync worker.

T-rav/hydraflow · 0 tokens