Skip to content
Development
Command

/create_worktree

--- description: Create worktree and launch implementation session for a plan ---

From plugin
humanlayer
11k27 skills6 agents27 commands

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/create_worktree

Context preview

What this command does when you run it.

--- description: Create worktree and launch implementation session for a plan ---

Command definition

create_worktree.md

--- description: Create worktree and launch implementation session for a plan ---

2. set up worktree for implementation: 2a. read `hack/create_worktree.sh` and create a new worktree with the Linear branch name: `./hack/create_worktree.sh ENG-XXXX BRANCH_NAME`

3. determine required data:

branch name path to plan file (use relative path only) launch prompt command to run

**IMPORTANT PATH USAGE:**

  • The thoughts/ directory is synced between the main repo and worktrees
  • Always use ONLY the relative path starting with `thoughts/shared/...` without any directory prefix
  • Example: `thoughts/shared/plans/fix-mcp-keepalive-proper.md` (not the full absolute path)
  • This works because thoughts are synced and accessible from the worktree

3a. confirm with the user by sending a message to the Human

based on the input, I plan to create a worktree with the following details:

worktree path: ~/wt/humanlayer/ENG-XXXX
branch name: BRANCH_NAME
path to plan file: $FILEPATH
launch prompt:

    /implement_plan at $FILEPATH and when you are done implementing and all tests pass, read ./claude/commands/commit.md and create a commit, then read ./claude/commands/describe_pr.md and create a PR, then add a comment to the Linear ticket with the PR link

command to run:

    humanlayer launch --model opus -w ~/wt/humanlayer/ENG-XXXX "/implement_plan at $FILEPATH and when you are done implementing and all tests pass, read ./claude/commands/commit.md and create a commit, then read ./claude/commands/describe_pr.md and create a PR, then add a comment to the Linear ticket with the PR link"

incorporate any user feedback then:

4. launch implementation session: `humanlayer launch --model opus -w ~/wt/humanlayer/ENG-XXXX "/implement_plan at $FILEPATH and when you are done implementing and all tests pass, read ./claude/commands/commit.md and create a commit, then read ./claude/commands/describe_pr.md and create a PR, then add a comment to the Linear ticket with the PR link"`

Read more
Ships withhumanlayer

The best way to get AI coding agents to solve hard problems in complex codebases.

Get the whole plugin