z-worktrunk

Installation
SKILL.md

Worktrunk (wt)

Before copying commands, check the installed version (wt --version) and the subcommand's wt <command> --help — flags and output shapes change between releases. Use what is installed; do not upgrade wt to match an example.

Core commands

  • wt switch <branch> — switch to a worktree; create one if the branch exists but has none.
  • wt switch --create <branch> [--base ] — new branch + worktree; base defaults to the default branch and accepts the same shortcuts (^, @, -, pr:N, mr:N).
  • wt switch - — previous worktree (like cd -); wt switch ^ — default-branch worktree.
  • wt switch pr:N / mr:N / a PR/MR URL — switch to a PR/MR branch (fetches fork refs). Not combinable with --create.
  • wt switch (no args) — interactive picker; --branches/--remotes/--prs widen candidates.
  • wt switch -x <program> -- <args...> — run one program in the switched-to worktree; args after -- bypass worktrunk parsing. Shell syntax needs an explicit shell: wt switch feature -x sh -- -c 'npm install && npm test'.
  • wt list [--full] [--branches] [--format=json] — worktrees, status, divergence, uncommitted changes; --full adds CI status and LLM summaries (network + LLM).
  • wt merge — squash-merge current branch into the target (default branch), running hooks.
  • wt remove [<branch>] — remove worktree; delete branch only when merged (--force for a dirty worktree, -D for an unmerged branch).
  • wt step — individual operations (wt step commit, wt step squash, wt step copy-ignored, wt step tether, wt step relocate).
  • wt hook <type> [name...] — run configured hooks manually; user:/project: prefixes filter by source.
  • wt config — shell integration (wt config shell install), config creation (wt config create [--project]), plugins, state, approvals, aliases.
Installs
2
First Seen
6 days ago