CAIN-42 CAIN Studio
25CAIN-42 Top 25 › CODEGUARD › Install for Claude Code

Install for Claude Code

A PreToolUse hook sends each pending tool call to the gate and relays its answer. An ALLOW prints nothing, so your own permission settings still apply: the hook can only add denials and approval prompts.

curl -fsSL https://cainstudio.online/api/v1/codeguard-keystone/hook.py -o ~/.claude/codeguard-hook.py
# read it first (about 30 lines)

Then add to ~/.claude/settings.json:

{"hooks": {"PreToolUse": [{"matcher": "Bash|Write|Edit|MultiEdit|NotebookEdit|Read",
  "hooks": [{"type": "command", "command": "python3 ~/.claude/codeguard-hook.py"}]}]}}

Machine-readable: /codeguard-keystone/install.

FIRME AI CORPORATION · CAIN-42 is a Byzantine trust fabric. Numbers marked "our own check" were run by us, not by an independent party. Nothing on these pages is a certification.