Home / Claude Code mods / Security / write-guard

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.

Updated 2026-11-30

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.

TypeClaude code mod
Authorpomesaka
Repositorypomesaka/dotclaude
Popularityno public popularity data yet
CategorySecurity
SecurityLow risk (84/100)
Rank#7,886 of 9,397 Claude Code mods; #811 in Security
Last commit2026-11-30
Hooks1 events
SeesWrite calls
Draws onnothing

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.

CheckResult
No network accessPass
Starts no processesPass
Writes no files or configPass
Reads environment variablesReview
Only sees the events it hooksPass
Doesn't drive ClaudePass
Passes claude plugin validatePass
No license detectedNote

API calls in its code

CallWhat it means
$.env.getreads env vars
$.fs.existsreads files
$.session.cwd

How do I install write-guard?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. 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
  3. 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)