← Browse
main-checkout-guard
DylanMerigaud ★ 1
This PreToolUse hook prevents destructive git operations (checkout, reset, force-push, etc.) on the main checkout of repositories opted into worktree isolation via a `.claude/auto-worktree` marker. It parses the complete bash command including aliases, subshells, and pipes to block dangerous operations at the repository root while allowing safe workflows in linked worktrees.
Install
> /plugin marketplace add DylanMerigaud/trimwrit/tree/HEAD/plugins/main-checkout-guard
> /plugin install main-checkout-guard
Source: https://github.com/DylanMerigaud/trimwrit/tree/HEAD/plugins/main-checkout-guard
What it's made of
1 hook
- Commands
- 0
- Agents
- 0
- Skills
- 0
- MCP servers
- 0
- Hooks
- 1 · PreToolUse
What it needs & plugs into
- API keys
- none
- Paid services
- none detected
- External tools
python3- Talks to
- nothing external detected
Analyzed . Facts extracted from the plugin's files. Prose generated by claude-haiku-4-5-20251001.
Is this your plugin?
Claim it to keep the card accurate and enter the weekly contest. Requires signing in as the GitHub owner (DylanMerigaud).