ClaudeMods
☰
EN
● — online · Views — times
SponsorsSubmit a project
GitHub repositories · by eshin087

collision-guard

Warns when another Claude session on the same repo already edited the file being changed, or claimed the same package version.

eshin087@eshin087

eshin087/claude-code-mods/tree/main/collision-guard

Translated

About this mod

Collision Guard is a Claude Code mod that warns when two sessions work on the same repository and touch the same file, or claim the same package version. Each session records its edits (Edit/Write/NotebookEdit) keyed by repo, and before an edit it checks other sessions' records (ignoring edits older than 12 hours). Warnings appear as toasts and are surfaced to Claude, and a /collisions command lists other active sessions, their branches, worktrees, versions, and overlapping files. It uses no model calls and stores data under ~/.claude/mods-data/collision-guard/. It only detects sessions that also run the mod, and it warns without blocking.

Installation

Check the author's README for the marketplace and plugin name first. Commands may change as the repository evolves.

claude plugin marketplace add eshin087/claude-code-mods
claude plugin install collision-guard
Original text / README

Collision Guard

What it does: warns when two Claude sessions work on the same repo and touch the same file, or both claim the same version number. Catching that early avoids the merge conflicts and renumbering it otherwise causes.

Where you see it:

  • Toast: ⚠ src/09-render.js was also edited 25m ago by another session (release/v0.10.1 · spacex · "Tesla Roadster…").
  • Claude gets the same note, so it keeps the change focused and mentions the overlap in its report.
  • Version clash: when package.json gets a version another session (on another branch) already uses.
  • /collisions: other sessions active on this repo in the last 24h, their branch, worktree, version, and the files you both edited.

How it works: each session records the files it edits (Edit/Write/NotebookEdit) in its own file, keyed by repo. Worktrees count as the same repo, and paths are compared repo-relative. Before an edit, it reads the other sessions' files. Edits older than 12 hours are ignored.

Cost: none. No model calls.

Data saved: ~/.claude/mods-data/collision-guard/<repo>/<session>.json.

Notes: it only knows about sessions that also run this mod. It warns, it never blocks.

Get a badge

Is this your project? Add this badge to your README or website. It links back to this page.

Featured on ClaudeMods
Size
Theme
Markdown
HTML

Other works with the same name

Similar projects