worktree-guard

by Thieu Nguyen · ★ 0 · updated 3 days ago

PanesBandsGuardsCommandsvalidates

0

Guards a shared worktree: stops git add -A from staging files this session did not touch, previews destructive git commands, and points at the process holding a busy port.

install worktree-guard

Install

/plugin marketplace add thieung/claude-mods
/plugin install worktree-guard@thieung-mods

Then run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.

View source on GitHub

What it hooks into

From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.

Events
session.starttool.callsession.endcommand.runui.render
API calls
$.command.register$.process.run$.session.cwd$.session.id$.state.get$.state.set$.ui.ask$.ui.close$.ui.log$.ui.open$.ui.panes$.ui.resolve$.ui.toast
Draws
PaneAbovePrompt
Can see
every tool callBash calls
Reach
level 2 of 3 other: $.state.getother: $.state.setruns processesdraws

Origin

How it got here
Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
Repository
github.com/thieung/claude-mods
Path in repo
worktree-guard
Author
Thieu Nguyen @thieung
License
MIT
First published
Last pushed
First listed here

Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.

More from thieung/claude-mods

ak-cockpit

thieung/claude-mods

AgentKit cockpit above the prompt: context fill with a handoff nudge, and the active plan's phase and checklist.

★ 0PanesBands

ghost-proc-guard

thieung/claude-mods

Stops Claude from starting a second copy of your dev servers on the next free port (monorepos and worktrees included), tracks the servers it starts, and stops leftovers from a /procs pane.

★ 0PanesStatus lineGuards