---
title: "collision-guard"
url: "https://claudemods.dev/ja/builds/collision-guard-617ac2"
source: "https://github.com/eshin087/claude-code-mods/tree/main/collision-guard"
source_type: "github"
repo: "https://github.com/eshin087/claude-code-mods/tree/main/collision-guard"
author: "eshin087"
author_handle: "eshin087"
stars: 0
category: "ワークフロー・CI"
categories: ["workflow"]
tags: ["claude-code", "collision-detection", "git", "hooks", "multi-session", "plugin", "workflow"]
permission_level: 2
scan_complete: true
install: "claude plugin marketplace add eshin087/claude-code-mods\nclaude plugin install collision-guard"
added: "2026-10-05T01:53:16.633Z"
updated: "2026-11-14T04:38:40Z"
locale: "ja"
content_locale: "ja"
---

# collision-guard

同じリポジトリ上の別の Claude セッションが編集中のファイルをすでに編集した場合、または同じパッケージバージョンを取得した場合に警告します。

## Description

Collision Guard は、2 つのセッションが同じリポジトリで作業して同じファイルに触れた場合、または同じパッケージバージョンを取得した場合に警告する Claude Code mod です。各セッションはリポジトリごとに自分の編集（Edit/Write/NotebookEdit）を記録し、編集前に他セッションの記録を確認します（12 時間より古い編集は無視）。警告は toast として表示されて Claude にも伝わり、/collisions コマンドでは他のアクティブセッション、ブランチ、ワークツリー、バージョン、重複ファイルを一覧できます。モデル呼び出しはなく、データは ~/.claude/mods-data/collision-guard/ に保存されます。同じ mod を実行しているセッションだけを検知し、ブロックせず警告します。

## Install

```
claude plugin marketplace add eshin087/claude-code-mods
claude plugin install collision-guard
```

## Original 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.
