rm -rf ~/, git reset --hard, or git checkout -- . wiping out work you can’t get back. Soft rules written in CLAUDE.md or AGENTS.md help set expectations, but they rely on the model following instructions — and models don’t always follow instructions. CC Safety Net is a hard technical constraint: a PreToolUse hook that intercepts every shell command your AI agent attempts to run and blocks destructive operations before they execute, using semantic command analysis rather than fragile pattern matching. It works across Claude Code, OpenCode, Gemini CLI, Copilot CLI, and Codex, so your code, history, and filesystem stay intact no matter which agent you’re working with.
Introduction
Learn what CC Safety Net protects against
Installation
Install for Claude Code, OpenCode, Gemini CLI, and more
Configuration
Customize protection with modes and custom rules
CLI Reference
Diagnose issues and trace command analysis
Get Started in Three Steps
Install for your agent
Add CC Safety Net to your agent via the plugin marketplace. For Claude Code, run the following commands inside a Claude Code session:Installation instructions for OpenCode, Gemini CLI, Copilot CLI, and Codex are covered in the Installation guide.
(Optional) Add a status line to your settings
To surface real-time protection status in your Claude Code UI, add the following to This step is optional — CC Safety Net protects you whether or not the status line is enabled. See the status line guide for additional setup options including Bun and piping with an existing status line.
~/.claude/settings.json:CC Safety Net works out of the box with no configuration required. Advanced modes and custom rules are available when you need them.
