storage-guard

Reviewed at commit 0e4c0dd New version, not yet reviewed

After an edit that keeps browser data in localStorage or sessionStorage, names each line, so the model stores the data in a cookie instead.

Made by
Kerem Gok
What we checked

After Claude edits or writes a web source file, it checks the new lines for localStorage or sessionStorage and tells Claude, and you, to use a cookie instead. By default it only reports. In an optional deny mode it also blocks git commit, push and merge while such lines remain. It stores only its settings.

Review details

Static review of the source at the pinned commit; not run. Hooks: session.start (registers /storage-guard, reads settings, finds the git root), command.run for /storage-guard (status, on, off, mode note|deny), tool.call for Edit and Write (after the edit succeeded, scans the new text with regexes for localStorage or sessionStorage and adds a context note to the result; rereads the edited file with $.fs.read), tool.call for Bash (only in deny mode: a git commit, push or merge is denied while a reported file still uses the storage; a commit is narrowed to staged files via git diff --cached), turn.complete (rechecks open files), prompt.submit (adds a note to the next prompt while findings stand). Runtime calls: $.process.run with fixed argv (git rev-parse --show-toplevel, git diff --cached --name-only -z), $.fs.exists and $.fs.read on files the model edited, $.store get and set, $.sidebar.set and clear (optional sidebar mod), $.ui.log. Deny mode is off by default and says so in its status text; it has no bypass. No network or external hosts. Same code structure as sql-concat-watch from the same author.

What it uses
  • Reads your prompts: yes
  • Sees tool calls: yes
  • Blocks or changes tool calls: yes
  • Reads or writes files: yes
  • Runs programs on your machine: yes
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Made this mod? Add a badge to your README

modsforClaude badge for storage-guard

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/storage-guard.svg)](https://modsforclaude.com/mods/storage-guard/)

← All mods