eshin087/claude-code-mods/tree/main/collision-guard
collision-guard
같은 저장소의 다른 Claude 세션이 수정 중인 파일을 이미 편집했거나 같은 패키지 버전을 선점했을 때 경고합니다.
이 mod 소개
Collision Guard는 두 세션이 같은 저장소에서 작업하며 같은 파일을 건드리거나 같은 패키지 버전을 선점할 때 경고하는 Claude Code mod입니다. 각 세션은 저장소별로 자신의 편집(Edit/Write/NotebookEdit)을 기록하고, 편집 전에 다른 세션의 기록을 확인합니다(12시간보다 오래된 편집은 무시). 경고는 toast로 표시되고 Claude에도 전달되며, /collisions 명령으로 다른 활성 세션, 브랜치, worktree, 버전과 겹치는 파일을 나열할 수 있습니다. 모델 호출은 없고 데이터는 ~/.claude/mods-data/collision-guard/에 저장됩니다. 같은 mod를 실행하는 세션만 감지하며 차단하지 않고 경고만 합니다.
설치
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add eshin087/claude-code-mods claude plugin install collision-guard
원문 / 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.jsongets 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.
동명의 다른 작품
- collision-guardVedantAndhale · ★ 1
