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 TracineHQv1.5.0Apache-2.0In 1 marketplace
A deterministic deny floor for Claude Code tool calls (rm -rf, force-pushes, protected files, AI-attribution trailers) with a JSONL decision log that convo indexes.
You run one by typing its /name in Claude Code.
1 critical · 3 cautions to review before installing
A hook runs before every tool call and can block or approve it
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
A command runs shell commands (! syntax) when you invoke it
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Stdlib-only safety hooks for Claude Code.
Every decision is logged to JSONL. Query and trace it in place with guard status|noisy|silent|trace.
$ rm -rf /
guard: deny - rm -rf against /, /*, ~, $HOME, ., or ./ is catastrophic.
Guardrails not walls: guard catches the obvious foot-guns at the Claude Code hook layer so a stray tool call doesn't turn into a bad day. It is defense-in-depth, not a security boundary.
| Hook | What it catches |
|---|---|
| bash_command_validator | dangerous shell commands (rm -rf of a root, force push, eval, payloads hidden in bash -c, substitutions and function bodies) + admin-CLI default-deny for aws/gcloud/az/kubectl/launchctl (only read-only verbs pass) |
| git_c_validator | git -c overrides of core.hooksPath / core.attributesFile, and git -C read verbs that run a program or write a file (log --output=, fetch --upload-pack) |
| credential_check | Off by default in 2.0.0 while it is rebuilt. Guard makes no credential-protection claim until then. |
| commit_message_validator | AI-attribution trailers (Co-Authored-By: Claude…) and missing/file-backed commit messages |
| agent_output_guard | reads of subagent transcript files (/tmp/claude-<uid>/.../tasks/*.output); background command output stays readable |
| protected_files | edits to the guard install that's running, its allowlist, and subagent scope, plus your own patterns |
| subagent_scope | file edits outside the declared .claude/subagent-scope.json allowlist |
| permission_request_logger | observation-only: logs every Claude Code permission prompt as a permission_request JSONL row (no enforcement) |
Inside Claude Code:
/plugin marketplace add TracineHQ/plugins
/plugin install guard@tracine
This installs guard from the unified TracineHQ plugin catalog. The same marketplace also hosts convo; once the marketplace is registered you can install either with one command.
Standalone alternative (skip the catalog and install guard directly from this repo):
/plugin marketplace add TracineHQ/guard
/plugin install guard@tracinehq
TracineHQ/guard is the GitHub owner/repo shorthand for the marketplace source. guard@tracinehq is the <plugin>@<marketplace> reference Claude Code uses to install. To pin a specific tag:
/plugin marketplace add TracineHQ/guard#v1.3.0
python3 PATH (no third-party dependencies)rm -rf, cat ~/.aws/credentials, process substitution) and offer no meaningful protection against PowerShell or cmd.exe equivalents. CI runs on ubuntu-latest and macos-latest.The marketplace install above wires up the safety hooks. To query the decision log without tail | jq, install the read-side CLI from PyPI:
pipx install tracine-guard
Then guard status shows the log location and last record, guard noisy --since 24h ranks rules by hit count, guard trace <session_id> dumps a chronological view, and guard silent lists rules that fired historically but not recently. Query subcommands are read-only against ~/.claude/guard-decisions.jsonl; guard allowlist disable-rule / enable-rule and guard mode <mode> write ~/.claude/guard/allowlist.json. The two install paths complement each other; they aren't alternatives.
Guard reads a small set of environment variables. See SKILL.md for the canonical descriptions and defaults.
Guard never asks and never approves. Every block is a deny whose reason tells the agent what to do instead: usually stop and tell you, with the command or allowlist override you can run. Everything else gets no decision from guard and goes on to Claude Code's own permission step, auto mode's classifier included.
Healthcheck: guard healthcheck exits 0 on healthy, non-zero on
failure. Suitable for CI gates and cron-based monitors.
Mode (enforce / shadow / off): a top-level "mode" field in
~/.claude/guard/allowlist.json, set with guard mode <mode>. Default is
"enforce". One file, one place to look: there are no per-repo overrides,
so a repo you clone can't switch guard off.
Every hook honors the mode:
Plugins from other owners that cover similar ground
npx claudepluginhub tracinehq/guard --plugin guardBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.