Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By kedrzuv0.3.1In 1 marketplace
Mechanical safety guards for agents: hooks that refuse a dangerous command and tell the agent what to do instead. Guards: no inline node/bun eval (-e, -p), which turns any library that forks with execArgv into a fork bomb; no package install inside a git submodule whose packages are workspaces of the superproject, which shadows its dependencies; no command that prints a secret value into the transcript (an env dump under secrets run, a keychain read, the store token, bws secret get)
Run automatically on Claude Code events. Claude doesn't decide.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
hooks, guardrails, safety, node, bun, fork-bomb, git-submodule, workspaces ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Mechanical safety guards for agents. An instruction in a prompt is a request the agent may
forget; a guard here is a PreToolUse hook that refuses the action outright and returns an
error the agent can act on (exit code 2, the reason on stderr, which Claude Code feeds back
to the model). Each guard says what was blocked, why, and what to do instead.
The plugin ships hooks only. Installing it enables every guard; there is nothing to configure.
claude plugin install guardrails@kedrzu-skills
hooks/block_inline_eval.pyBlocks node, nodejs and bun given an inline-eval flag before any script file:
-e, --eval, -p, --print, --eval=…, --print=…, and short-flag clusters holding
e or p (-pe). Also bun run -e. The call is found wherever a shell would run it:
| Shape | Example |
|---|---|
| chains, pipes, subshells | cd x && timeout 90 bun -e "…", a; node -e 1, ( node -e 1 ), x | node -e 1 |
| substitutions | $(node -p 1), `node -p 1`, <(node -e 1), also inside double quotes and heredocs with an unquoted delimiter (<<EOF) |
| env-var prefixes | FOO=1 node -e 1 |
| wrappers | env, timeout/gtimeout, nice, time, command, exec, nohup, caffeinate, stdbuf, xargs, sudo, doas |
| paths | /Users/x/.bun/bin/bun -e, ~/.nvm/…/bin/node -e |
| package runners | npx node -e, npx -c '…', bunx node -e, bun x node -e, npm/pnpm/yarn exec node -e, also pnpm --filter web exec |
| nested shells | bash -c '…', sh -c, zsh -lc, bash -euo pipefail -c, eval '…', bash <<EOF, sh <<< '…', and a shell fed by a pipe from echo, printf or cat <<EOF (echo '…' | bash) |
Allows: -e that belongs to another program (grep -e, sed -e, perl -e,
python -c, bun build -e), flags after the script (node script.js -e, which are the
script's own), bun run/test/install/x, plain node file.mjs / bun file.ts, and
text that merely mentions node -e: echo, grep, commit messages, comments, and heredoc
bodies written to a file (cat > f <<EOF) — save a $(…) or backticks under an unquoted
delimiter, which bash runs.
Why. Under an eval flag process.execArgv is ["-e", "<the whole script>"]. A library
that forks workers with the parent's execArgv — jest-worker, used by
rollup-plugin-terser, is one — makes every child re-run the whole script, which forks
again: (cpus−1)ⁿ processes. On 2026-10-22 one bun -e call to a Rollup-based compiler left
924 bun processes alive after 12 seconds and froze the Mac by exhausting RAM, five times
that day. Node behaves the same. A timeout or memory watchdog does not help, because the
children escape mid-fork. Run from a file, execArgv is empty and nothing re-runs.
The fix the agent is told: write the code to a file under the project's scratch dir
(somewhere gitignored) or $TMPDIR and run the file — node "$TMPDIR/snippet.mjs",
bun "$TMPDIR/snippet.ts". A heredoc to a file is fine even for a one-liner.
Limits. It parses the command, it does not sandbox it. A command it cannot parse (an
unterminated quote, say — which the shell would reject too) is allowed with a warning shown to
the user, never blocked. Code started some other way (python -c "subprocess.run('node -e …')",
a script file that calls node -e, a package.json script) is out of its reach, and so is what
a file, a download or a variable pipes into a shell (cat x.sh | bash, curl … | sh,
echo "$CODE" | bash): only echo, printf and cat with a heredoc are read.
hooks/block_submodule_install.pyBlocks a package install run inside a git submodule whose packages are workspaces of the
superproject: bun install|i|ci|add|a|remove|rm|update, npm install|i|in|ci|add|uninstall|un|remove|rm|r|update|up|link,
pnpm install|i|add|remove|rm|uninstall|un|update|up, and yarn bare or with install|add|remove|up|upgrade.
Not bun upgrade, bun run, bun x, bunx. The directory it runs in starts at the hook input's
cwd and follows cd / pushd earlier in the command line, ~, relative paths, env -C, and the
manager's own option (bun --cwd, npm --prefix / -C, pnpm -C / --dir, yarn --cwd). The call
is found everywhere the guard above finds its call: both walk the command line with shellparse.walk().
It asks git (rev-parse --show-superproject-working-tree) whether that directory is in a submodule,
then reads the superproject's package.json workspaces (array or { "packages": [...] }) and blocks
only if a pattern points at or into the submodule. No configuration and no hard-coded names.
Allows installs from the superproject root, in a plain repo, in a submodule whose packages the superproject does not list as workspaces (it keeps its own installs), and any command that is not an install.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub kedrzu/skills --plugin guardrailsPlugins from other owners that cover similar ground