# CC Safety Net > CC Safety Net documentation. CC Safety Net is a pre-execution hook for AI coding agents that uses semantic analysis to block destructive Git and filesystem commands and secret-file access before they run. ## Get started - [Guardrails for coding agents](https://ccsafetynet.com/docs/index.md): CC Safety Net is a pre-execution hook for AI coding agents. It blocks destructive git and filesystem commands and secret file access before they run. Protect your work and your credentials across Amp Code, Antigravity CLI, Claude Code, Codex, Cursor, DeepSeek Harness, Devin CLI, Factory Droid, Gemin… - [What is CC Safety Net](https://ccsafetynet.com/docs/introduction.md): CC Safety Net is a free, local pre-execution hook that blocks the commands and file reads that destroy uncommitted work or expose secrets in your coding agent. Answers on cost, LLM use, data, performance, Windows, and sandboxing. - [Get started with CC Safety Net](https://ccsafetynet.com/docs/quickstart.md): Install CC Safety Net, check its status, run doctor, and watch it block a real command. The same first-run path works for every supported coding agent. ### Installation - [Install CC Safety Net](https://ccsafetynet.com/docs/installation.md): Install CC Safety Net for any of its sixteen supported coding agents with one npx command, check that protection is active, update it, and remove it. #### Supported agents - [Install CC Safety Net in Amp Code](https://ccsafetynet.com/docs/installation/amp-code.md): Install CC Safety Net in Amp Code as a personal plugin published through the amp CLI, including the policy snapshot, migration from local and legacy copies, uninstall, and the errors install can raise. - [Install CC Safety Net in Antigravity CLI](https://ccsafetynet.com/docs/installation/antigravity-cli.md): Install CC Safety Net in Antigravity CLI with a PreToolUse hook in ~/.gemini/config/hooks.json, see which run_command and manage_task calls it checks, remove it, and read how doctor reports it. - [Install CC Safety Net in Claude Code](https://ccsafetynet.com/docs/installation/claude-code.md): Install the CC Safety Net plugin in Claude Code from cc-marketplace, turn on auto-updates, see what the Coding CLI hook checks and when it asks, remove it, and find where CLAUDE_CONFIG_DIR moves its configuration. - [Install CC Safety Net in Codex](https://ccsafetynet.com/docs/installation/codex.md): Install the CC Safety Net plugin in Codex from cc-marketplace, trust its PreToolUse hook in /hooks, know the interactive-session coverage boundary, remove it, and read the doctor trust reminder. - [Install CC Safety Net in Cursor](https://ccsafetynet.com/docs/installation/cursor.md): Install CC Safety Net in Cursor IDE and Cursor CLI with one global preToolUse hook, check what it covers, remove it, and resolve double checks from the Claude Code plugin or a native Cursor plugin. - [Install CC Safety Net in DeepSeek Harness](https://ccsafetynet.com/docs/installation/deepseek-harness.md): Install CC Safety Net in DeepSeek Harness as a profile plugin bundle for the web and Desktop profiles, add it to other profiles, see what its tool guard checks and what it reports about an undeclared plugin shell tool, remove it, and resolve the Desktop and enable errors. - [Install CC Safety Net in Devin CLI](https://ccsafetynet.com/docs/installation/devin-cli.md): Install CC Safety Net in Devin CLI with one PreToolUse hook in config.json, see how the hook checks exec and write_to_process calls, remove it, and read the doctor messages for a broken config. - [Install CC Safety Net in Factory Droid](https://ccsafetynet.com/docs/installation/factory-droid.md): Install CC Safety Net in Factory Droid with one PreToolUse hook in ~/.factory/hooks.json, see how install carries over legacy and settings.json hooks, what the hook checks, and how uninstall restores the old hook set. - [Install CC Safety Net in Gemini CLI](https://ccsafetynet.com/docs/installation/gemini-cli.md): Install CC Safety Net in Gemini CLI through the gemini-safety-net extension, restart Gemini CLI to load it, see what the hook checks and what happens when it fails, and remove the extension. - [Install CC Safety Net in GitHub Copilot CLI](https://ccsafetynet.com/docs/installation/github-copilot-cli.md): Install the cc-safety-net@cc-marketplace plugin in GitHub Copilot CLI, restart Copilot CLI, see what the hook checks, remove the plugin, and fix hooks that doctor reports as off or invalid. - [Install CC Safety Net in Grok Build](https://ccsafetynet.com/docs/installation/grok-build.md): Install CC Safety Net in Grok Build with one PreToolUse hook file under ~/.grok/hooks, see which tools the hook checks and what happens when it fails, remove it, and fix a hook listed in disabled-hooks. - [Install CC Safety Net in Hermes Agent](https://ccsafetynet.com/docs/installation/hermes-agent.md): Install CC Safety Net in Hermes Agent as a managed Python plugin, see which tools the plugin checks, what happens when it fails, how it finds the active profile, and how to remove it. - [Install CC Safety Net in Kimi Code](https://ccsafetynet.com/docs/installation/kimi-code.md): Install CC Safety Net in Kimi Code as a global PreToolUse hook in config.toml or as a native Kimi Code plugin, see what each checks and what happens when it fails, fix invalid hooks entries, and remove it. - [Install CC Safety Net in OpenClaw](https://ccsafetynet.com/docs/installation/openclaw.md): Install CC Safety Net in OpenClaw 2026.8.1 or later as an in-process plugin, see how install verifies the plugin loaded, what the exec check covers and what happens when it fails, and how to remove it. - [Install CC Safety Net in OpenCode](https://ccsafetynet.com/docs/installation/opencode.md): Install CC Safety Net in OpenCode 1.18.29+ or 2.0.6+ through OpenCode's plugin commands, see what the plugin checks and what happens when it fails, fix install errors, and remove it. - [Install CC Safety Net in Pi](https://ccsafetynet.com/docs/installation/pi.md): Install CC Safety Net in the Pi coding agent from pi.dev as an in-process extension, see what the extension checks and what happens when it fails, remove it, and fix an extensions filter that disables it. ## Guides - [Team setup: ship a safety policy with your repository](https://ccsafetynet.com/docs/guides/team-setup.md): Set up CC Safety Net for a team: make sure every member has the hook installed, automate the install in your project's existing bootstrap step, and optionally commit a project policy and vendored rulebooks to standardize protection for the repository. - [Keep protection active in cloud agent environments](https://ccsafetynet.com/docs/guides/cloud-environments.md): How CC Safety Net reaches agent sessions you never log into: committed project policy and settings files for Claude Code cloud and self-hosted sessions, a personal plugin for Amp Orb threads, and a preinstall step for devcontainers and Docker images. - [The local dashboard](https://ccsafetynet.com/docs/guides/dashboard.md): Launch the local CC Safety Net dashboard with cc-safety-net gui. Use Overview, Activity, Protections, Custom rules, Agents, and Settings to inspect decisions, edit policy, and manage agent hooks, in English, Japanese, or Simplified Chinese. - [The /cc-safety-net skill](https://ccsafetynet.com/docs/guides/skill.md): Invoke the /cc-safety-net skill to explain a block, triage a false positive, author rulebook rules, propose a policy change, manage integrations, and diagnose protection. It runs only when you invoke it. ## Configuration - [Safety levels and worktree mode](https://ccsafetynet.com/docs/configuration/modes.md): What CC Safety Net's standard, strict, and paranoid safety levels block, plus worktree mode. Set a level in policy.json or with environment variables to tune behavior for your workflow. - [Policy file: the complete policy.json contract](https://ccsafetynet.com/docs/configuration/policy.md): Full reference for CC Safety Net's policy.json: user and project scopes and how they merge, schema, safety presets and capability overrides, worktree mode, which allow list to use, blocking any file or folder with deny paths, secret allow paths, and audit retention. - [Environment variables](https://ccsafetynet.com/docs/configuration/environment.md): Every CC Safety Net environment variable, where each configuration file and the audit log live, what CC_SAFETY_NET_HOME moves, and how environment variables combine with policy.json. - [Custom rules: extra command argument patterns](https://ccsafetynet.com/docs/configuration/custom-rules.md): Define project and user-level custom blocking rules in CC Safety Net using JSON rulebooks. Block every git push, turn off one rule, match a version 1 subcommand and argument pattern or a version 2 exact command path, and block with your own reason message. - [Block aws, terraform, gcloud, and az commands with official rulebooks](https://ccsafetynet.com/docs/configuration/rulebooks.md): Block destructive aws, terraform, gcloud, and az commands such as aws s3 rm, terraform destroy, gcloud projects delete, and az group delete by installing CC Safety Net's official rulebooks with one command. Explains why no rule can block every aws call. - [Configuration recovery: ready and degraded state](https://ccsafetynet.com/docs/configuration/recovery.md): What degraded and "Runtime is enforcing a fallback configuration" mean in CC Safety Net, what stays enforced when part of your configuration is rejected, and the commands that get you back to ready. ## Troubleshooting - [Troubleshooting installation and behavior](https://ccsafetynet.com/docs/guides/troubleshooting.md): Fix common CC Safety Net problems by symptom: commands not checked, slow hooks, a destructive command that ran, a command you need that is blocked, each denial message, custom rules not enforced, degraded configuration, the status line, and updates. - [Known limitations and pitfalls](https://ccsafetynet.com/docs/guides/known-limitations.md): What CC Safety Net cannot catch: which agents fail open and what each one leaves uncovered, opaque command proxies, eval, script files, parser gaps, the PowerShell and cmd readers, sensitive-path coverage, filesystem containment, network, symlink swaps, and rule files an agent can edit. ## CLI commands - [CLI commands](https://ccsafetynet.com/docs/reference/cli/overview.md): Overview of the cc-safety-net CLI: how to run it with npx or bunx, its twelve commands, the version and help global options, and unknown-command errors. - [status command](https://ccsafetynet.com/docs/reference/cli/status.md): Reference for cc-safety-net status: the ready and degraded verdicts, every row it prints, the Not active list, and why it always exits 0. - [doctor command](https://ccsafetynet.com/docs/reference/cli/doctor.md): Reference for cc-safety-net doctor: the report sections, the JSON and skip-update-check options, findings and the exit code, old rule files, managed hook drift warnings, and hook config parse errors. - [logs command](https://ccsafetynet.com/docs/reference/cli/logs.md): Reference for cc-safety-net logs: reading the audit log, the filter flags, finding likely false positives, JSON output, flag conflicts, and deleting legacy log files. - [explain command](https://ccsafetynet.com/docs/reference/cli/explain.md): Reference for cc-safety-net explain: tracing why a command is blocked or allowed, the JSON, working-directory and shell-dialect options, how a double dash ends flag parsing, exit codes, and refused commands. - [rule command](https://ccsafetynet.com/docs/reference/cli/rule.md): Reference for cc-safety-net rule and its subcommands: init, add, remove, update, sync, list, wrapper, tool, verify, migrate, and doc, with their options, scope rules, output, and errors. - [policy command](https://ccsafetynet.com/docs/reference/cli/policy.md): Reference for cc-safety-net policy check and policy apply: the project and user targets, the diff report, errors, the terminal confirmation prompt, and why agents cannot apply a policy. - [install command](https://ccsafetynet.com/docs/reference/cli/install.md): Reference for cc-safety-net install: the sixteen target flags, npx cache clearing, the interactive target selector and its keys, and install failures. - [update command](https://ccsafetynet.com/docs/reference/cli/update.md): Reference for cc-safety-net update: which installed integrations it refreshes, skipped agents, npx and bunx cache clearing, the update-available notice, and exit codes. - [uninstall command](https://ccsafetynet.com/docs/reference/cli/uninstall.md): Reference for cc-safety-net uninstall: its sixteen target flags, target selection, what it removes from config files, and Cursor's extra marketplace removal. - [hook command](https://ccsafetynet.com/docs/reference/cli/hook.md): Reference for cc-safety-net hook: the runtime hook entry point your agent calls, its integration flag for each agent, and which agents load CC Safety Net in process instead. - [gui command](https://ccsafetynet.com/docs/reference/cli/gui.md): Reference for cc-safety-net gui: starting the local policy editor, the no-open flag, argument errors, and what happens when the browser cannot open. - [statusline command](https://ccsafetynet.com/docs/reference/cli/statusline.md): Show CC Safety Net's safety level, worktree mode, project-policy weakenings, and degraded configuration in Claude Code's status line. Setup for bunx, npx, and claude x, and what every emoji indicator means. ## Rules and protection - [Blocked and allowed commands](https://ccsafetynet.com/docs/reference/blocked-commands.md): Which git, rm, find, rsync, disk, network, unshare, PowerShell, cmd, and shell commands CC Safety Net blocks or allows, the rule id behind each block, the safety level it needs, and how to allow a blocked command. - [Secret protection reference](https://ccsafetynet.com/docs/reference/secret-protection.md): Complete catalog of CC Safety Net's built-in secret-protection rules: sensitive basenames, protected home directories, key-file variants, credential extensions, the two coding CLI tiers, deny and allow paths, and every exemption. ## Logs and traces - [Audit log reference](https://ccsafetynet.com/docs/reference/audit-log.md): Reference for CC Safety Net's audit log: file layout, JSONL record schema, what is recorded, retention, and the bounded scope of secret redaction. - [Explain JSON trace reference](https://ccsafetynet.com/docs/reference/explain-trace.md): Schema for the JSON returned by cc-safety-net explain in JSON mode: ExplainResult fields, the TraceStep variants that describe each analysis step, and what a trace reveals before you share it. ## More reference - [Library API reference](https://ccsafetynet.com/docs/reference/library-api.md): Call checkCommand from cc-safety-net/api to check a shell command in your own Node.js agent or harness: when to use it instead of an installed hook, its types and errors, which policy a call reads, what stays stable across versions, and a plugin-host example. - [Glossary](https://ccsafetynet.com/docs/reference/glossary.md): Definitions for CC Safety Net terms: policy, preset, capability, degraded, decision, rulebook, transparent wrapper, integration model, fail-closed, and segments. ## Concepts - [How CC Safety Net intercepts and blocks destructive commands](https://ccsafetynet.com/docs/guides/how-it-works.md): How one tool call travels from your agent to an allow or block: the local rule-based parser, the four integration models, the order of checks, what the analyzer sees through, the block message, and where to look when a decision surprises you. - [Security model](https://ccsafetynet.com/docs/guides/security-model.md): Is CC Safety Net safe to rely on? What it protects, what it trusts, what happens when analysis fails, what redaction hides, and how an attacker could try to get past it. - [Where CC Safety Net fits among your protection layers](https://ccsafetynet.com/docs/guides/vs-sandboxing.md): Place CC Safety Net next to OS-level sandboxing, permission deny rules, permission prompts and approval classifiers, and containers, VMs, and checkpoints. Each layer misses cases the others catch. ## Project - [Contributing to CC Safety Net](https://ccsafetynet.com/docs/contributing.md): How to report a CC Safety Net bug or request a feature through GitHub Issues, what to include for a wrong decision, and why pull requests are limited to invited collaborators. - [Security policy](https://ccsafetynet.com/docs/security.md): How to report a security vulnerability in CC Safety Net, what counts as a security issue, supported versions, and response expectations. > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Simplified Chinese (56 pages)](https://ccsafetynet.com/docs/_llms/zh-hans.txt): 开始使用, 指南, 配置, 故障排除, CLI 命令, 规则与保护, 日志与追踪, 更多参考, 概念, 项目. - [Japanese (56 pages)](https://ccsafetynet.com/docs/_llms/ja.txt): はじめに, ガイド, 設定, トラブルシューティング, CLI コマンド, ルールと保護, ログとトレース, その他のリファレンス, 概念, プロジェクト. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.