mutlumehmet/claude-plugins/tree/main/plugins/shared-file-guard

このセッションが読み込んでいない、または他のセッションが読み込み後に変更した共有ファイル(STATUS.md、CLAUDE.md、MEMORY.md、または指定したファイル)へのシェル書き込みを拒否します。
mutlumehmet/claude-plugins/tree/main/plugins/shared-file-guard

同じプロジェクトで複数のセッションを実行するための Claude Code mod です。このセッションが共有ファイル(STATUS.md、CLAUDE.md、MEMORY.md、または指定したファイル)を一度も読み込んでいない場合、または他のセッションが読み込み後に変更した場合、そのファイルへのシェルコマンドによる書き込みを拒否します。claude-plugins の一部です。
python3 スクリプト、sed -i、tee、mv、cp といったシェルでのギャップを埋めます。cat または grep は読み込みとしてカウントされます。セッション自身の書き込みは次の書き込みをブロックしません。まだ存在しないファイルを作成することは許可されます。/shared-file-guard はこのセッションが参照したファイルをリストします。/shared-file-guard off|on。| 設定 | デフォルト | 機能 |
|---|---|---|
| watched_files | STATUS.md,CLAUDE.md,MEMORY.md | コンマ区切りのファイル名。* は、*register*.md のように、名前の任意の文字列に一致します。|
tool.call は、読み込まれた内容のみを記録します。Bash の tool.call はそのコマンドを拒否する可能性がありますが、変更することはありません。command.run は自身の /shared-file-guard コマンドにのみ応答し、他には応答しません。Claude Code 2.1.287 以降(mod 対応)が必要です。2.1.289 でテスト済み。
/plugin marketplace add mutlumehmet/claude-plugins
/plugin install shared-file-guard@mehmetmutlu
mod は Claude Code 内であなたの権限で実行されます。mod をインストールする前にコードを読んでください。
設定はインストール時、または後で /plugin configure shared-file-guard@mehmetmutlu を使用して求められます。
cd の後の相対パスは認識されません。Mehmet Mutlu によって作成され、claude-plugins の一部です。彼の他の作品は mehmetmutlu.dev でご覧いただけます。
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add mutlumehmet/claude-plugins claude plugin install shared-file-guard
A Claude Code mod for running several sessions on the same project. It refuses a shell command that would write a shared file (STATUS.md, CLAUDE.md, MEMORY.md, or the files you name) when this session never read it, or another session changed it since. Part of claude-plugins.
python3 scripts, sed -i, tee, mv and cp.cat or grep counts as a read; a session's own writes do not block its next one; creating a
file that does not exist yet is allowed./shared-file-guard lists the files this session has seen; /shared-file-guard off|on.| Setting | Default | What it does |
|---|---|---|
| watched_files | STATUS.md,CLAUDE.md,MEMORY.md | Comma separated file names; * matches any run of name characters, such as *register*.md |
tool.call on Read, Edit and Write only records what was read. tool.call on Bash may refuse that one command; it never changes it. command.run answers its own /shared-file-guard command and no other.Needs Claude Code 2.1.287 or later (mods). Tested on 2.1.289.
/plugin marketplace add mutlumehmet/claude-plugins
/plugin install shared-file-guard@mehmetmutlu
A mod runs inside Claude Code with your permissions. Read the code before you install any mod.
Settings are asked for at install, or later with /plugin configure shared-file-guard@mehmetmutlu.
cd in the same command, are not seen.Made by Mehmet Mutlu, part of claude-plugins. More of his work at mehmetmutlu.dev.