All shelves / Mods / Safety
subagent-fence
By erikdarlingdata
subagent-fence is a Claude Code safety mod by erikdarlingdata.
Refuses a force-push, a push to a protected branch, a git command that skips hooks, and killing a process by name.
Holds a command
Install
The marketplace name is erikdarling.
/plugin marketplace add erikdarlingdata/claude-plugins /plugin install subagent-fence@erikdarling
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
- 1.0.0
- License
- MIT
- Repo stars
- 25
- Last change
- 2026-10-14
What it can reach
- Holds a command
- Sees tool calls
Needs a Claude Code version that loads plugin hook modules. It covers the main session and every subagent. A kill by name is refused because a name match can kill another session's processes. Protected branches default to main, master, and dev. Three more guards are off until you set them: one bans folders so nothing reads, writes, or enters them, one keeps a subagent out of a plain git checkout so it works in its own worktree, and one stops a subagent from reading a big text file whole.
The install name is subagent-fence. This page adds the author's name. The marketplace name is erikdarling. The marketplace also holds open-asks, subagent-wall, and other mods. This one installs on its own. The marketplace source is ./plugins/subagent-fence. The refused commands are why this page files it under safety. guardrails-lite holds a read of a secret .env file, a git force-push, and a recursive rm on /, ~, or $HOME. bash-guard holds every Bash call, blocks rm -rf on a home or system directory, and asks before a force-push, a hard reset, or a pipe into sh. This one refuses a force-push, a protected-branch push, a git command that skips hooks, and a kill by process name, for the main session and every subagent. The source lets the call through if the check itself fails.
Demo

What it hooks into
tool.callAround a tool call, where it can hold one
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
- erikdarlingdata
- Category
- Safety
- Marketplace
- erikdarling
- Folder
- plugins/subagent-fence
- Version
- 1.0.0
- License
- MIT
- Repo stars
- 25
- Last change
- 2026-10-14
- Language
- TypeScript
- Files
- 4