What is write-guard?
write-guard is a Claude Code mod by pomesaka that when the agent's Write lands outside the working directory and creates a new folder to do so, tells the agent in the tool result to check the path for a copying mistake. It is listed under Security and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | pomesaka |
| Repository | pomesaka/dotclaude |
| Popularity | no public popularity data yet |
| Category | Security |
| Security | Low risk (84/100) |
| Rank | #7,886 of 9,397 Claude Code mods; #811 in Security |
| Last commit | 2026-11-30 |
| Hooks | 1 events |
| Sees | Write calls |
| Draws on | nothing |
Is write-guard safe to install?
write-guard scores 84/100 on the MCPMods security check: Low risk. Things to review: reads environment variables. It passed 6 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| No network access | Pass |
| Starts no processes | Pass |
| Writes no files or config | Pass |
| Reads environment variables | Review |
| Only sees the events it hooks | Pass |
| Doesn't drive Claude | Pass |
| Passes claude plugin validate | Pass |
| No license detected | Note |
API calls in its code
| Call | What it means |
|---|---|
$.env.get | reads env vars |
$.fs.exists | reads files |
$.session.cwd |
How do I install write-guard?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/pomesaka/dotclaude claude plugin validate ./dotclaude/mods/write-guard
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add pomesaka/dotclaude && claude plugin install write-guard@dotclaude
Or ask Claude to set it up
Paste this into Claude Code and it installs write-guard for you:
Install the "write-guard" Claude Code mod from https://github.com/pomesaka/dotclaude/tree/main/mods/write-guard. Run claude plugin validate on it first and show me what it can access before you enable it.
More from pomesaka/dotclaude
This repository has at least 9 Claude Code mods on MCPMods.
- budget: One usage budget on a subscription rate-limit window (set_budget, clear_budget, read_budget): when any session sees the (Low risk)
- check-streak: Counts how many times in a row the same check (tests, type check, lint) fails for the agent; on the third failure withou (Low risk)
- danger-guard: Before the agent runs a Bash command, blocks the ones that can wreck the machine or the user's data beyond the working r (Review before installing)
- devrep: update_devrep tool: while turned on for a session, the agent keeps a short report of where the work stands (doing now, n (Low risk)
- dotclaude-ledger: Records every Edit and Write that lands in the dotclaude working copy (file, an excerpt, and the request it answered) ou (Review before installing)
- human-edit: human_edit tool: the agent asks the user to edit a file in a tmux split pane and waits until the editor exits (High risk)
- jj: Adds the jj counts (changed files, unpushed commits) and commit and log buttons to the line under the prompt, with a pan (Low risk)
- next-step: After a turn, shows up to four prompts the user is likely to type next as cards above the prompt: Claude Code's own prom (Low risk)