Install for Claude Code
Run these three commands inside Claude Code:
Using a different agent? See the Installation page for Codex, Gemini CLI, GitHub Copilot CLI, Kimi CLI, OpenCode, and Pi instructions.
Verify the installation
Run the doctor command to confirm CC Safety Net is properly hooked in and blocking commands:The doctor command checks:
- Hook Integration — the plugin is wired up for your agent
- Self-Test — sample commands block and allow correctly
- Configuration — any custom rules are valid
- Environment — mode flags (
CC_SAFETY_NET_STRICT,CC_SAFETY_NET_PARANOID, etc.) are reported - Recent Activity — a summary of blocked commands from the last 7 days
- System Info — versions of Node.js and other relevant tools
- Update Check — whether a newer version of CC Safety Net is available
Test command blocking
Ask your agent to run these two commands and observe the difference:When CC Safety Net blocks the first command, your agent receives a structured block message (see below) and is instructed to ask you for explicit permission before trying anything similar again.
(Optional) Add a status line
CC Safety Net can display its current protection status directly in your agent’s status line, showing which mode is active at a glance. See the status line configuration page for setup instructions.
What a Block Looks Like
When CC Safety Net intercepts a destructive command, it returns a message like this to your agent:Next Steps
Explore Modes
Learn about Default, Strict, Paranoid, and Worktree modes and when to use each one.
Custom Rules
Define your own blocking rules at the project or user level to enforce team conventions.
Blocked Commands
Browse the full list of commands CC Safety Net blocks by default and the reasoning behind each.
How It Works
Go deeper on semantic command analysis, shell wrapper detection, and the hook lifecycle.
