Install
$ agentstack add skill-ondrejdrapalik-worktree-management-skills-wt-remove ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Remove Worktree
wt remove $ARGUMENTS
Display the output. Done.
What the script guarantees
Removal is destructive, so the ordering and the refusals matter more than the command itself:
- Target resolution accepts a branch (
feat/foo), a directory slug
(feat-foo), an absolute path, or nothing at all when the shell is already inside the worktree. Pass through whatever the user gave you.
- Refuses to remove a worktree from inside it and tells the user where to
cd. Don't work around this by cd-ing elsewhere yourself unless the user asked for the removal to happen regardless.
--forcegates losing work, not the removal: uncommitted changes or
commits not yet on the default branch stop the run and print what would be lost. Relay that to the user and let them decide. Do not add --force yourself to get past a warning they haven't seen.
- Closes the surface before removing the checkout. Git refuses to remove a
worktree that a live shell still has as its cwd, and closing the herdr workspace or tmux window kills those shells. This is why removal works on both surfaces with one code path.
- Then
git worktree remove,worktree prune,branch -D, and the now-empty
~/_wt// bucket is cleaned up.
- Drops the worktree's mise trust entry.
wt newtrusts the checkout's
mise.toml, and the trust store keys on the absolute path, so a leftover entry would silently pre-trust a future worktree that reuses the slug.
Remove vs clear
wt remove deletes a checkout and its branch. wt clear (see wt-clear) only closes windows for finished PRs and leaves everything on disk. When the user says "clean up", check which one they mean. The wrong guess is unrecoverable in one direction and harmless in the other.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: OndrejDrapalik
- Source: OndrejDrapalik/worktree-management-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.