# Wt Create

> Create a git worktree at ~/_wt/<repo>/<branch-slug> and open it on the current multiplexer. A single-pane herdr workspace nested under the workspace you ran it from when inside herdr, a tmux window when inside tmux. Carries uncommitted changes, symlinks .env files, installs deps, copies the path. Use whenever the user wants to spin work out into a worktree, branch, herdr workspace, or tmux tab: "…

- **Type:** Skill
- **Install:** `agentstack add skill-ondrejdrapalik-worktree-management-skills-worktree-management-skills`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [OndrejDrapalik](https://agentstack.voostack.com/s/ondrejdrapalik)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [OndrejDrapalik](https://github.com/OndrejDrapalik)
- **Source:** https://github.com/OndrejDrapalik/worktree-management-skills

## Install

```sh
agentstack add skill-ondrejdrapalik-worktree-management-skills-worktree-management-skills
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# New Worktree

## Resolve the branch name first

- If `$ARGUMENTS` contains a branch name, use it exactly.
- If it does not, infer one from the current task or the user's most recent
  request, and keep any flags from `$ARGUMENTS`.

Infer it yourself. No subagent, no extra model call. You already have the
context that makes the name good. Use 2-5 lowercase kebab-case words with a
prefix that matches intent:

- `fix/` bug fixes
- `feat/` new behaviour
- `chore/` maintenance
- `refactor/` restructuring without behaviour change

A bare name with no `/` gets `feat/` prepended by the script, so don't
hand-prepend it twice.

## Run it

```bash
wt new  [-c|--clean] [-b|--branch ]
```

Display the output. Done. The script owns everything else:

- checkout at `~/_wt//`, or reattach if it already exists
- surface: a single-pane herdr workspace inside herdr, a tmux window inside
  tmux, neither outside both. Detected, not chosen by you. Split the pane
  afterwards if the work wants a shell or a server; there is no template.
- the new workspace nests under the herdr workspace you ran from, not under
  whichever workspace happens to hold the repo
- uncommitted work carried over by default; `-c` for a clean checkout
- `.env*` symlinked from the repo root and from the subdirectory you invoked
  from, `.env.example` skipped, symlink typechanges hidden with `skip-worktree`
- the checkout's `mise.toml` trusted before installing
- deps installed from the nearest lockfile (pnpm/bun/yarn/npm)
- the working path copied to the clipboard (macOS `pbcopy`)

Invoking from a subdirectory is meaningful: a package-level lockfile there wins
over the repo root, and the tmux window opens at the matching subdirectory.
herdr always opens its pane at the checkout root, so `cd` in from there.

## When something is wrong

`wt: command not found` means `scripts/` is not on `PATH`. Run `./install.sh`
from this repo rather than reimplementing the flow inline. If the worktree is
created but the surface is not, check `HERDR_ENV` / `$TMUX`; the checkout is
still valid and `wt open ` will render it.

`mise ERROR ... are not trusted` inside a worktree means the trust step did
not run. `mise trust` in the checkout clears it.

## Other commands

`wt` is the CLI. Prefer `wt new` from this skill. Focused skills for the other
verbs live in `skills/` (`wt`, `wt-remove`, `wt-clear`, `wt-cleanup-loop`). If
those are loaded, use them. If not, run the CLI from here:

```text
wt open 
wt remove [branch|slug|path] [--force]
wt clear [--merged-only]
wt cleanup-loop [tick] [duration]
wt list
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [OndrejDrapalik](https://github.com/OndrejDrapalik)
- **Source:** [OndrejDrapalik/worktree-management-skills](https://github.com/OndrejDrapalik/worktree-management-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ondrejdrapalik-worktree-management-skills-worktree-management-skills
- Seller: https://agentstack.voostack.com/s/ondrejdrapalik
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
