AgentStack
SKILL verified CC0-1.0 Self-run

Worktree Clean

skill-jhostalek-dotclaude-worktree-clean · by JHostalek

Use when removing a git worktree and cleaning up its associated local branch from the main repository.

No reviews yet
0 installs
14 views
0.0% view→install

Install

$ agentstack add skill-jhostalek-dotclaude-worktree-clean

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No 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.

Are you the author of Worktree Clean? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

worktree_path = $ARGUMENTS

Remove a local worktree and delete its associated local branch. No argument → list worktrees and ask which to remove.

Local Only

Remote branches carry invisible state — open MRs, CI pipelines, review comments, deployment triggers — deleting one can auto-close an MR silently. User owns remote-branch deletions.

When Removal Resists

git worktree remove fails on unclean state; git branch -d fails on unmerged branches. Trivial leftovers (build artifacts, debug logs, already-pushed-or-merged work) → force autonomously. Substantive uncommitted or unmerged work → describe findings, let user decide.

Run git worktree prune after removal — git's internal worktree registry retains stale entries that can cause false conflicts on future git worktree add calls.

Source & license

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

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

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.