All shelves / Mods / Usage
write-guard
By VedantAndhale
write-guard is a Claude Code usage mod by VedantAndhale.
Lets the first full rewrite of an existing file through, holds the next one so Claude uses Edit, and counts the rewrites it held.
DrawsHolds a command
Install
The marketplace name is claude-pro-kit.
/plugin marketplace add VedantAndhale/claude-pro-kit /plugin install write-guard@claude-pro-kit
It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
- Version
- 0.1.0
- License
- MIT
- Repo stars
- 10
- Last change
- 2026-10-08
What it can reach
- Draws in the session
- Holds a command
- Sees tool calls
Write sends the whole file as output tokens, and Edit sends only the lines that change. The first rewrite of an existing file in a conversation goes through, with one line after the result telling Claude to use Edit for later changes. A later rewrite is held back once. Claude is told the file exists and to change it with Edit, or to retry the same Write when a full rewrite is intended. New files, and files under 2,048 bytes, are never touched. A subagent has its own first rewrite. A compaction or /clear starts over. The status line counts the ones held back. The author, in 272 of their own session transcripts, counted 141 writes that rewrote a file Claude had already read or written. That one line after the first rewrite is what this adds for Claude to read.
One plugin from VedantAndhale/claude-pro-kit. The root README says prompt-polish is the only mod in that kit that makes a model call, and write-guard makes none. The plugin folder has no README. These lines are the repository README. file-guard holds writes outside the project and writes into .git, and asks before lockfiles and CI files. Nothing else on the shelf holds a full rewrite of an existing file so Claude uses Edit.
Demo

What it hooks into
tool.callAround a tool call, where it can hold oneWritesession.compactWhen the context is compactedsession.endWhen a session ends
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Files
The author's source, 3 files. They load when you open them.
Facts
- Author
- VedantAndhale
- Category
- Usage
- Marketplace
- claude-pro-kit
- Folder
- plugins/write-guard
- Version
- 0.1.0
- License
- MIT
- Repo stars
- 10
- Last change
- 2026-10-08
- Language
- TypeScript
- Files
- 5