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 Skobynv0.2.1MITIn 1 marketplace
Deterministic runtime guardrails via PreToolUse hooks: hard-block edits to sensitive paths, deny destructive bash, scan tool inputs for secrets, and compile a declarative YAML policy into enforced matcher config.
You run one by typing its /name in Claude Code.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
guardrails, hooks, policy-as-code, secret-scanning, enforcement, apex
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Deterministic runtime guardrails via PreToolUse hooks: hard-block edits to sensitive paths, deny destructive bash, scan tool inputs for secrets, and compile a declarative YAML policy into enforced matcher config.
Block the bad action before it happens — don't scan for it afterward. Deterministic PreToolUse hooks that hard-deny edits to secrets, destructive shell commands, and credential leaks, driven by a declarative Policy-as-Code ruleset.
Most "security" tooling for AI coding agents is after-the-fact: it reads the repo
or the transcript and tells you about the .env that already got overwritten, the
rm -rf / that already ran, the API key that already landed in a commit. That is
detection. apex-guardrails is enforcement. It plugs into Claude Code's
PreToolUse hook protocol so a dangerous tool call is denied before it executes —
the edit isn't written, the command isn't run, the secret isn't sent.
apex-guardrails bundles three guardrails that share one enforcement model — a hook
returns permissionDecision: deny and the tool call never happens:
| Sub-feature | Hook | Enforces |
|---|---|---|
| B1 GuardRail (paths) | hooks/block-sensitive-paths.sh | Hard-blocks Write/Edit/MultiEdit/NotebookEdit to .env, **/secrets/**, **/*credential*, private keys/keystores, and infra/prod config. |
| B1 GuardRail (bash) | hooks/block-destructive-bash.sh | Always denies permission-bypass flags (--dangerously-skip-permissions, --dangerously-bypass-approvals-and-sandbox, any --dangerously-*, --yolo, --always-approve, --full-auto) passed to any program, whatever the policy says; then denies rm -rf /, rm -rf ~/$HOME, force-push to main/master, git reset --hard onto a protected branch, and curl/wget piped into a shell. Reads tool_input.command only. |
| B3 SecretGuard | hooks/secret-scan.sh | Scans Write/Edit content and Bash commands for AWS keys, PEM private keys, GitHub/Slack tokens, and inline password=/secret=/api_key= values — denying before the bytes hit disk or the wire. |
…plus B2 PolicyAsCode: a declarative resources/policy.example.yaml ruleset and
scripts/compile-policy.sh that compiles it into the hooks matcher config, so org
rules are enforced, not just written down. The /apex-guardrails:guardrails-policy
command exposes view / validate / compile.
# From the Apex marketplace
/plugin marketplace add Skobyn/Apex-Dev-Skills
/plugin install apex-guardrails@apex-dev-skills
# …or test locally against this repo
claude --plugin-dir ./plugins/apex-guardrails
Then /reload-plugins (or restart Claude Code) to load the hooks.
# See what the policy enforces and which hooks are wired
/apex-guardrails:guardrails-policy view
# Edit resources/policy.example.yaml, then recompile into enforced config
/apex-guardrails:guardrails-policy compile
# Confirm a block fires (by hand)
echo '{"tool_name":"Bash","tool_input":{"command":"rm -rf /"}}' \
| bash hooks/block-destructive-bash.sh
# → {"hookSpecificOutput":{...,"permissionDecision":"deny",...}}
Each hook reads the PreToolUse event JSON on stdin and emits one decision object:
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"apex-guardrails: …"}}
hooks/hooks.json maps tool matchers (Write|Edit|MultiEdit|NotebookEdit, Bash)
to these scripts via a quoted "${CLAUDE_PLUGIN_ROOT}" (install paths with spaces
resolve). The policy YAML is the source of truth; hooks.json is a compile artifact.
Edit the policy, recompile, reload. block-destructive-bash.sh is wired on Bash
even when the policy declares no destructive_bash family (then with
--bypass-only), because the bypass-flag denial is always on.
npx claudepluginhub skobyn/apex-dev-skills --plugin apex-guardrailsBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground