Claude Code mod
worktree-guard
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
/plugin marketplace add thieung/claude-mods
/plugin install worktree-guard@thieung-modsMods install like plugins. Run /reload-plugins or start a new session to load it.
What it can access
- Reach
- L2Writes or runs: runs processes, reads mod state, draws
- Sees
- every tool call, Bash calls
- Draws in
PaneAbovePrompt- Hooks
session.starttool.callsession.endcommand.runui.render
From a static scan of the mod's code by awesome-claude-code-mods. It shows what the code asks for, not a security review.
How Claude Code mods work
- A mod is a plugin with a JavaScript or TypeScript module that runs inside Claude Code (version 2.1.287 or later). It can draw panes beside the transcript, a band above the prompt, buttons and toasts, restyle the spinner and tool rows, and watch or rewrite tool calls and prompts.
- It installs like any plugin: add its marketplace with /plugin marketplace add owner/repo, then /plugin install name@marketplace.
- Check what a mod can reach before installing: it runs with your permissions. Reach goes from drawing only, to reading files, to writing files or running processes, to the network. Run claude plugin validate on a clone to list its hooks and calls without running it.
- Turn one off from the Installed tab in /plugin, or start Claude Code with --safe-mode to skip every customization for a session.
Details
- Repository
- thieung/claude-mods
- Folder
worktree-guard- Marketplace
thieung-mods- Author
- Thieu Nguyen
- License
- MIT
- Last updated
- 5 October 2026
- Listed in
- awesome-claude-code-mods
FAQ
What is worktree-guard?
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. It is a mod for Claude Code, from thieung/claude-mods on GitHub.
What can the worktree-guard mod access?
Its widest reach is "writes or runs" (runs processes, reads mod state, draws). It sees every tool call, Bash calls. It draws in Pane, AbovePrompt. Like any mod, it runs with your permissions.
How do I install worktree-guard?
Inside Claude Code (v2.1.287 or later), run /plugin marketplace add thieung/claude-mods and then /plugin install worktree-guard@thieung-mods.
More git & github mods
worktrace
harshshah-2023/Claude-Mods
A persistent file tree and timeline of the files Claude reads, searches and changes, with summaries and exact diffs.
worktree-merge-status
cmorss/claude-mods
/merge-status: a pane with what merged into local main and which git worktrees conflict with it, and a link to each worktree's session (Claude desktop app)
worklog
santtisosa/worklog
Time you actively work with Claude, per repo and branch (or ticket), with a weekly view and a CSV timesheet.
worktree-radar
floheissler/cc-worktree-radar
A live radar of your parallel branches and worktrees above the prompt: which merge cleanly, which conflict, which are stacked, which a Claude session is still working on, and the order to land them. Read-only: it never merges, rebases or moves a ref.
workbench
eascendco/workbench
Your current task above the prompt and a Workbench side pane: the task and its work items, what Claude is reading and editing, git status, file search and a file tree. Tasks are plain markdown files in plans/.
worktrees-manager-mod
netgfx/claude-worktrees-mod
A /worktrees side panel: colored, named worktrees with one-line tasks, fast session switching, and per-worktree dev-server ports Claude respects
Browse the most popular Claude Code mods, all git & github mods, or the skills and MCP server directories.