Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

utilizing-worktrees

verified

Git worktree management via wt CLI (claude-worktree). Use when user mentions worktree, ワークツリー, 並行開発, parallel branch, or wants to create/switch/list/remove worktrees.

View on GitHub

Marketplace

thkt-development-workflows

thkt/claude-config

Plugin

security-tools

Security

Repository

thkt/claude-config
3stars

skills/utilizing-worktrees/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/thkt/claude-config/blob/main/skills/utilizing-worktrees/SKILL.md -a claude-code --skill utilizing-worktrees

Installation paths:

Claude
.claude/skills/utilizing-worktrees/
Powered by add-skill CLI

Instructions

# Git Worktree Management (wt)

Manage git worktrees via the `wt` CLI for parallel development.

## Constraint

`wt cd` and `wt new` perform `cd` in a subshell, so the parent shell's directory does not change when called from Claude Code's Bash tool. Use `wt-core` directly to get the path, then use it in subsequent commands.

## Commands

### Create a worktree

```bash
# New branch from default base (main/develop/master)
wt-core new feature-auth

# New branch from specific base
wt-core new feature-auth develop

# Checkout existing branch
wt-core new existing-branch
```

Returns: worktree directory path (stdout). Auto-runs dependency install based on lockfiles.

### List worktrees

```bash
wt-core ls
```

Output: branch name, change count, ahead/behind, last commit message. `★` marks current directory.

### Get worktree path

```bash
wt-core cd feature-auth
```

Returns: worktree directory path (stdout).

### Remove a worktree

```bash
wt-core rm feature-auth
```

Refuses if uncommitted changes exist.

## Usage Patterns

| Intent                      | Command                                              |
| --------------------------- | ---------------------------------------------------- |
| Create and work in worktree | `path=$(wt-core new feat-x) && cd "$path" && pwd`    |
| Run command in worktree     | `path=$(wt-core cd feat-x) && git -C "$path" status` |
| List all worktrees          | `wt-core ls`                                         |
| Remove finished worktree    | `wt-core rm feat-x`                                  |

`cd` only persists within the same `&&` chain. Use `git -C "$path"` for cross-invocation commands.

## Directory Layout

```text
parent/
├── my-repo/                    # Main repository
└── worktrees/
    └── my-repo/
        ├── feature-auth/       # Worktree
        └── bugfix-123/         # Worktree
```

## Auto-detected Setup (on new)

| File                            | Command        |
| ------------------------------- | ---------

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2067 chars