Skip to content

Open Orchestrator provides slash commands for Claude Code, allowing you to manage worktrees directly from your Claude Code sessions.

Available Commands

CommandDescription
/worktreeMain worktree management command
/wt-createQuick worktree creation
/wt-listList all worktrees
/wt-cleanupClean up stale worktrees

/worktree

The main worktree command with subcommands for full management.

Usage in Claude Code

/worktree new "Add user authentication"
/worktree list
/worktree switch feat/auth
/worktree delete feat/old

Subcommands

  • new "task" - Create a new worktree from a task description
  • list - List all worktrees
  • switch <name> - Switch to a worktree
  • delete <name> - Delete a worktree

/wt-create

Quick shortcut for creating worktrees.

Usage

/wt-create "Add login form"

This creates a worktree with default settings (auto-named branch, tmux, AI tool, dependencies).

With Template

/wt-create "Fix login timeout" -t bugfix
/wt-create "Build REST API" --ai-tool opencode

/wt-list

List all worktrees with their status.

Usage

/wt-list

Output:

Worktrees:
  main                          [main]              -
  feat/user-authentication      [feat/user-auth..]  working
  feat/build-rest-api           [feat/build-res..]  idle

/wt-cleanup

Clean up stale worktrees.

Preview Mode

/wt-cleanup --dry-run

Actually Clean

/wt-cleanup

Setup Requirements

1. Permissions

Add to your .claude/settings.json:

json
{
  "permissions": {
    "allow": [
      "Bash(owt:*)",
      "Bash(git worktree:*)",
      "Bash(tmux:*)"
    ]
  }
}

2. Commands Directory

Copy or symlink the commands:

bash
# From open-orchestrator repo
cp -r .claude/commands ~/.claude/commands/open-orchestrator

Or use the skill installer:

bash
owt skill install

Command Files

The slash commands are defined in markdown files under .claude/commands/:

.claude/commands/
├── worktree.md      # /worktree command
├── wt-create.md     # /wt-create shortcut
├── wt-list.md       # /wt-list shortcut
└── wt-cleanup.md    # /wt-cleanup shortcut

Example Command File

wt-create.md:

markdown
---
allowed-tools: Bash
description: Create a new git worktree with full environment setup
---

# Create Worktree

$ARGUMENTS - Task description (e.g., "Add user authentication")

## Context
- Current branch: !`git branch --show-current`
- Existing worktrees: !`git worktree list`

## Instructions
1. Run: `owt new $ARGUMENTS`
2. Report the created path and status

Best Practices

1. Use Shortcuts for Common Tasks

/wt-create "Quick fix for login"

Instead of:

/worktree new "Quick fix for login"

2. Check Status Before Creating

/wt-list
# See what exists
/wt-create "New feature"

3. Clean Up Regularly

/wt-cleanup --dry-run
# Review, then
/wt-cleanup

4. Combine with Send

After creating a worktree in Claude Code, use the terminal to send tasks:

bash
owt send feat/quick-fix-login "implement the fix"

Troubleshooting

Command Not Found

Ensure commands are installed:

bash
ls ~/.claude/commands/
# Or
owt skill status

Permission Denied

Check .claude/settings.json has the correct permissions.

Wrong Directory

Slash commands run in your current Claude Code session directory. Ensure you're in a git repository.

See Also