All shelves / Mods / Safety
collision-guard
By nateherkai
collision-guard is a Claude Code safety mod by nateherkai.
Holds an edit to a file another open chat changed in the last 30 minutes, and asks you to proceed, move this chat to a worktree, or cancel.
Holds a command
Install
The marketplace name is nateherk-mods.
claude plugin marketplace add nateherkai/claude-code-mods claude plugin install collision-guard@nateherk-mods
It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
- Version
- 1.0.0
- License
- MIT
- Repo stars
- 47
- Last change
- 2026-10-02
What it can reach
- Holds a command
- Reads this turn's file edits
Claude Code 2.1.287 or later, in the terminal or the desktop app's Code tab, with mods turned on for your account, which the README says Anthropic is doing gradually. Open a new chat after installing: the author says /reload-plugins does not reload it. Before Claude edits or writes a file, it checks whether another open chat changed that file in the last 30 minutes, and if one did, it asks. Proceed edits anyway. Move to a worktree has Claude move this chat's work into a git worktree, so the two chats stop touching the same files, and is offered when git tracks the file. Cancel leaves the file alone, and Claude asks you how to go on. /guard shows what it sees, /guard off turns it off, and /guard window 60 widens the window to 60 minutes. Each chat keeps a small list of the files it changed, under ~/.claude/mods-data/, and the author says nothing is added to Claude's prompt and the mods make no network calls of their own.
The marketplace name is nateherk-mods. The marketplace also holds cache-keeper, recording-mode, and goal-meter. This one installs on its own; to update, run claude plugin marketplace update nateherk-mods, then claude plugin update collision-guard@nateherk-mods, and open a new chat. Stopping two chats from changing the same file is why this page files it under safety. shared-file-guard-mutlumehmet refuses a shell write to a shared file this session never read, or that another session changed, and tells Claude to read it again. This one asks you before an edit or a write, and offers a worktree. Its plugin.json names Nate Herk as its author. In the source, the question is Claude Code's own question dialog, and it watches Edit, Write, and NotebookEdit.
Demo

What it hooks into
session.startWhen a session startssession.endWhen a session endsprompt.submitWhen you send a prompttool.callAround a tool call, where it can hold oneEditWriteNotebookEditcommand.runWhen you run its slash command/guard/collision-guard
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Slash commands 2
/guard/collision-guard
Files
The author's source, 6 files. They load when you open them.
Facts
- Author
- nateherkai
- Category
- Safety
- Marketplace
- nateherk-mods
- Folder
- collision-guard
- Version
- 1.0.0
- License
- MIT
- Repo stars
- 47
- Last change
- 2026-10-02
- Language
- JavaScript
- Files
- 7