guardian
Reviewed
at commit b468b10
GUARDIAN: executable policy that protects lab/demos/protected/** from Write/Edit/Bash, whatever CLAUDE.md says
0 upvotes
Log in to upvote or save- Made by
- ucsandman
- Pinned commit
-
b468b10503c9104109141c45f93f4a373160d9d1 - What we checked
-
Blocks Write, Edit, NotebookEdit and Bash calls that touch a path containing lab/demos/protected/ and tells Claude not to retry with another tool. A toast and a log line appear each time it blocks something. It reads no files, runs no programs, makes no network calls and stores nothing.
Review details
Static review of the source at the pinned commit; not run. Registers session.start (logs that it is armed), tool.call for Write/Edit/NotebookEdit/Bash and tool.check for the same tools. A regex on the file path (or, for Bash, on the command plus a write-like verb such as >, rm, mv, cp, sed, tee, echo) decides; a match returns deny from tool.call and decision deny from tool.check, other calls pass through unchanged. Uses $.ui.log and $.ui.toast only; keeps an in-memory block counter. The protected path is hard-coded to lab/demos/protected/, so it only protects that folder unless the source is edited. The Bash check is a heuristic and can be bypassed.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: yes
- Blocks or changes tool calls: yes
- Reads or writes files: no
- Runs programs on your machine: no
- Calls the model (uses tokens): no
- Sends data over the network: no
- Stores data: no
- Shows something on screen: yes
- Hooked events
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/guardian/)