agentsclimarketplace

Gh wt

Skill HikaruEgashira/gh-wt/skills/gh-wt

Reimagined Git worktree management :octocat:

Install
npx -y skills add HikaruEgashira/gh-wt --skill gh-wt

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use this skill whenever the user wants to operate on git worktrees — create, enter, list, remove, or garbage-collect — including parallel agent sessions, side-by-side PR reviews, benchmarking multiple branches, or isolating a dirty tree from a fresh checkout. Trigger even when "worktree" is not said — phrasings like "spin up a fresh copy of branch X", "run claude in a clean checkout", "try this patch without touching my changes", or "open PR-123 side-by-side with main" all qualify. Do NOT trigger for conceptual or educational questions about git worktree (e.g. "what's the difference between git worktree and git clone?") — those are answered from general git knowledge, not this skill.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

3.0 KB, as published. Nobody here has run it

gh-wt

gh wt creates CoW-backed git worktrees. Prefer it over git worktree add when the user wants multiple concurrent worktrees.

If gh wt is unavailable, run gh extension install HikaruEgashira/gh-wt and retry.

Commands

gh wt add <branch> [path]   Create a worktree (creates or tracks <branch>)
gh wt list                  List worktrees
gh wt remove [target]       Remove a worktree; target = path or branch name
gh wt gc                    Delete unreferenced cache entries
gh wt -- <cmd> [args...]    cd into selected worktree, then exec <cmd>
gh wt <cmd> [args...]       Run <cmd> with selected worktree path appended

When a subcommand needs a worktree and none is given, fzf opens for selection. Esc cancels cleanly (exit 0).

-- vs no --

  • gh wt -- <cmd> — cwd becomes the worktree, then <cmd> runs. Use for shells, agents, and test runners: gh wt -- claude, gh wt -- bash, gh wt -- npm test.
  • gh wt <cmd> — worktree path is appended as an argument. Use for editors and openers that take a path: gh wt code, gh wt cursor.

Mnemonic: -- means "into"; no -- means "with path".

Typical requests → commands

User saysCommand
"new worktree for <branch>"gh wt add <branch>
"run claude / my agent in a worktree"gh wt -- claude
"open <worktree> in VS Code / Cursor"gh wt code / gh wt cursor
"run tests in a separate worktree"gh wt -- npm test
"remove the <branch> worktree"gh wt remove <branch>
"show me all worktrees"gh wt list
"clean up unused worktree cache"gh wt gc

Gotchas

  • macOS cross-volume: the target path and the cache dir must be on the same APFS volume, or clonefile(2) fails with apfs clone failed. Fix by setting GH_WT_CACHE_DIR=/path/on/same/volume before gh wt add.
  • gh wt remove refuses the main worktree.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.