write-guard
by pomesaka · ★ 0 · updated 2 days ago
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
Install
/plugin marketplace add pomesaka/dotclaude/plugin install write-guard@dotclaudeThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
tool.call- API calls
$.env.get$.fs.exists$.session.cwd- Can see
Write calls- Reach
- level 1 of 3 reads filesreads env vars
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/pomesaka/dotclaude
- Path in repo
mods/write-guard- Source commit
002c578the exact code the scan read- Author
- @pomesaka
- License
- No license declared — ask the author before reusing code.
- First published
- Last pushed
- First listed here
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.
More from pomesaka/dotclaude
check-streak
pomesaka/dotclaude
Counts how many times in a row the same check (tests, type check, lint) fails for the agent; on the third failure without a pass, tells the agent in the tool result to stop fixing and call the user with its diagnosis
danger-guard
pomesaka/dotclaude
Before the agent runs a Bash command, blocks the ones that can wreck the machine or the user's data beyond the working repository: sudo, deletes of broad places and precious files, disk erasure, shutdown, and process kills that would also stop the user's applications
devrep
pomesaka/dotclaude
update_devrep tool: while turned on for a session, the agent keeps a short report of where the work stands (doing now, next, and free sections) in a pane, so the user can pick the session back up without reading the transcript
dotclaude-ledger
pomesaka/dotclaude
Records every Edit and Write that lands in the dotclaude working copy (file, an excerpt, and the request it answered) outside the repository, so one dotclaude session can split and commit changes many sessions wrote; adds a dotclaude N count to the line under the prompt
human-edit
pomesaka/dotclaude
human_edit tool: the agent asks the user to edit a file in a tmux split pane and waits until the editor exits
jj
pomesaka/dotclaude
Adds the jj counts (changed files, unpushed commits) and commit and log buttons to the line under the prompt, with a pane for the jj log
next-step
pomesaka/dotclaude
After a turn, shows up to four prompts the user is likely to type next as cards above the prompt: Claude Code's own prompt suggestion first, then more from a fork of the conversation; clicking a card sends it
pr
pomesaka/dotclaude
A list of the pull requests this session created or edited, with CI and review state, shown in a pane; watches CI after a push, tells the agent about merges and CI failures, and adds the PR numbers and a pr button to the line under the prompt
publish-guard
pomesaka/dotclaude
Before the agent pushes from a repository that has scripts/check-public.sh, runs that check and blocks the push when it finds names or keys that must not be published
questions
pomesaka/dotclaude
A list of the decisions the agent made provisionally so work could continue, kept with add_question and shown in a pane for the user to settle by clicking; a question can be talked over with a read-only fork of the conversation first. Adds a pending button to the line under the prompt
quiet-prompts
pomesaka/dotclaude
Draws a prompt that another plugin submitted on its own (a reminder, a notice) as one line in the transcript, without the engine's framing; ctrl+o still shows it in full
refs
pomesaka/dotclaude
A list of the documents and URLs this session relied on, kept by the agent with add_reference and shown in a pane; adds a refs button to the line under the prompt