Claude Code Guardrails settings.json works if: You're fine editing JSON and killing Claude Code sessions every time policy changes Your security team is comfortable making PRs You don't need to know what got blocked, when, or for whom Basic pattern matching like Bash(rm:*) covers your use cases Use this if: Policy changes need to apply instantly across your teamβno git pull, no restart Security/compliance needs a clear audit trail of every blocked command You need conditional logic: "allow rm -rf on node_modules , deny everywhere else" on , deny everywhere else" Non-engineers need to edit rules without touching config files Rulebricks gives you instant governance from one hook. Claude Code β PreToolUse hook β Rulebricks API β allow / deny / ask Setup (5 minutes) 1. Create your rules Go to rulebricks.com and create an account Fork one of these templates from the "AI Agents" category: Claude β Bash Guardrails β control shell commands β control shell commands Claude β File Access Policy β control file read/write/edit β control file read/write/edit MCP Tool Governance β control MCP server operations Customize the rules for your team Publish the rule Copy your API key from the API tab 2. Install Automatically finds your rules git clone https://github.com/rulebricks/claude-code-guardrails cd claude-code-guardrails ./install.sh Claude will detect your published rules and wire up the appropriate hooks. 3. Restart Claude Code You're done. What gets checked Template Matcher What it controls Bash Command Guardrails Bash Shell commands File Access Policy Read|Write|Edit File operations MCP Tool Governance mcp__* MCP server calls Configuration Environment variables in ~/.claude/settings.json : { "env" : { "RULEBRICKS_API_KEY" : " your-api-key " , "RULEBRICKS_VERBOSE" : " 1 " } } Variable Description RULEBRICKS_API_KEY Your Rulebricks API key (required) RULEBRICKS_VERBOSE Set to 1 to log decisions to stderr Updating rules Edit your decision table and publish a new version. Change...
First seen: 2026-01-15 23:18
Last seen: 2026-01-16 01:19