close-worktree

by Santiago Hernández · ★ 0 · updated 11 days ago

ToastsGuardsvalidates

0

After a PR is opened from a git worktree, tells Claude if the worktree can be closed (clean and pushed) or what is still not saved.

install close-worktree

Install

git clone https://github.com/hernandezsanti/claude-code-mods
claude --plugin-dir ./claude-code-mods/close-worktree

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
tool.call
API calls
$.env.get$.process.run$.session.cwd$.ui.toast
Can see
Bash calls
Reach
level 2 of 3 runs processesreads env varsdraws

Origin

How it got here
Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
Repository
github.com/hernandezsanti/claude-code-mods
Path in repo
close-worktree
Source commit
450f7d3 the exact code the scan read
Author
Santiago Hernández @hernandezsanti
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 hernandezsanti/claude-code-mods

commit-ticket

hernandezsanti/claude-code-mods

Blocks commits without [TICKET] when the branch has a ticket, and commits that only fix linting or formatting; suggests the correct message.

★ 0GuardsAutomation

guard-actions

hernandezsanti/claude-code-mods

Saves GitHub Actions minutes: blocks gh run watch/rerun and gh pr checks --watch, and warns when a second PR is opened in the session.

★ 0ToastsGuards

live-resources

hernandezsanti/claude-code-mods

Warns (status line and toast) only when RAM or disk is low: free RAM, free disk and running test runners. When there is no problem, it draws nothing.

★ 0Status line