Skip to main content
subagent CX Codex

create-worktree-subagent — Claude Code subagent: setup

The create-worktree-subagent subagent creates isolated git worktrees for parallel development. Use it when the request explicitly delegates worktree creation to a subagent.

no license ★ 1,573 updated 2026-02-08

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/create_worktree_subagent.md
Open on GitHub

What create-worktree-subagent does

The subagent reads the requested branch and an optional port offset, then runs /create_worktree. That slash command performs the worktree setup, installs dependencies, and starts services. A missing port offset is calculated by the command.

Its configuration grants SlashCommand, Bash, Read, Write, Edit, Glob, and Grep, with sonnet as the model. The agent is limited to this workflow: it should invoke the slash command instead of running git commands or building a worktree by hand.

The trigger is deliberately narrow. The user must explicitly ask for a subagent or delegate worktree creation to one; a general request to create a worktree does not activate this agent.

What it helps with

  • create a worktree for the feature-auth branch
  • pass a port offset into worktree setup
  • prepare an isolated environment for parallel development
  • delegate worktree creation to a subagent

Example prompts for the agent

  • Use a subagent to create a worktree for the feature-auth branch.
  • Delegate worktree creation for fix-bug and pass port offset 3.
  • Set up a parallel environment for the yellow-bg branch through a subagent.

How to install create-worktree-subagent

Manually: put the files in place

.claude/agents/create_worktree_subagent.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about create-worktree-subagent

How do I install create-worktree-subagent in Claude Code?

Place the agent file at .claude/agents/create_worktree_subagent.md. Claude Code can then use it when the request explicitly delegates worktree creation.

What does create-worktree-subagent do?

It extracts a branch name and optional port offset, then invokes /create_worktree. The slash command handles setup, dependency installation, and service startup.

What happens when no port offset is provided?

The /create_worktree command calculates the offset automatically.

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set20

The whole set →
fetch-docs-haiku45 fetch-docs-haiku45 retrieves online documentation using the Haiku model and saves it as markdown without cuts. CX Codex ★ 1,573repo stars fetch-docs-sonnet45 The fetch-docs-sonnet45 subagent retrieves documentation from a URL and writes it to a chosen file. Use it for documentation retrieval benchmarks. CX Codex ★ 1,573repo stars load_ai_docs load_ai_docs — a command that downloads documentation from AI platforms and saves it as markdown files for agents to reference locally. Use it when you want your sub-agents to have current docs without needing web access. CX Codex +1 ★ 1,573repo stars find_and_summarize find_and_summarize locates source files across target directories and creates concise two-sentence summaries in a YAML file. Useful for documenting modules without subagents. CX Codex +1 ★ 1,573repo stars docs-scraper docs-scraper — a subagent that fetches a documentation page by URL and saves it as a markdown file in ai_docs/. Handy when your agent needs a local copy of the docs. CX Codex ★ 1,573repo stars quick-plan quick-plan turns requirements into structured implementation blueprints stored in the specs/ folder. Useful before starting complex refactoring or new feature work. CX Codex +1 ★ 1,573repo stars plan_new_feature plan_new_feature is a Claude Code command that turns a feature request into a development plan saved under specs/. It maps the work before coding starts. CX Codex +1 ★ 1,573repo stars load_ai_docs load_ai_docs — a command that downloads documentation from specified URLs and saves it as markdown files via model-specific subagents. Designed for documentation benchmarking and testing AI model capabilities. CX Codex +1 ★ 1,573repo stars

Project sponsors

Companies that keep this analytics open