# kenryu42/cc-safety-net

An AI coding agent guardrail — a CLI hook that blocks destructive git and filesystem commands and secret file access before they execute. Supports Amp Code, Antigravity CLI, Claude Code, Codex, Copilot CLI, Cursor, Gemini CLI, Grok Build, Hermes Agent, Kimi Code, OpenClaw, OpenCode, and Pi.

Repository: https://github.com/kenryu42/cc-safety-net
Canonical: https://ross.abutalabs.com/products/cc-safety-net
Homepage: https://ccsafetynet.com
Language: TypeScript
License: MIT
License Family: permissive
Topics: claude, claude-code, claude-code-plugin, security, codex, pi-extension, ai-agents, ai-safety, cli, codex-cli, coding-agent, cursor, developer-tools, gemini-cli, guardrails, hooks, opencode, antigravity, hermes-agent, openclaw
Last push: 2026-08-25T15:33:16+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 99, longevity 17
- inputs: {"age_days": 251, "days_push": 8, "days_rel": 8, "gap_med": 1, "n_releases_24m": 40}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1507, forks 74 (observed 2026-08-28T04:04:54.948725+00:00)

## What it is
CC Safety Net is a pre-execution hook for AI coding agent CLIs (Claude Code, Codex, Cursor, Gemini CLI, and many others) that blocks destructive git and filesystem commands and access to secret files before they run. It parses command semantics so bypass tricks like flag reordering, shell wrappers, and interpreter one-liners cannot evade the guard.

## Use cases
- stop an AI agent from running rm -rf on my home directory
- prevent claude code from running git reset --hard and losing my work
- block coding agents from reading .env files and SSH keys
- add a safety guardrail to multiple AI coding CLIs
- enforce technical limits on what commands an AI agent can execute
- protect git history from force pushes by AI agents
- keep AI agents from copying AWS credentials

## When to choose
- you use AI coding agents that execute shell commands and want hard enforcement, not just prompt instructions
- you want one consistent safety layer across many coding CLIs like Claude Code, Codex, Cursor, and Gemini CLI
- you need to protect secrets such as .env files, SSH keys, and cloud credentials from agent reads and writes
- you want configurable safety levels (Standard, Strict, Paranoid) and custom blocking rules

## When to avoid
- you need a true sandbox or OS-level isolation rather than a pre-execution command check
- you use a coding agent CLI not on the supported list
- you want the agent to freely run destructive operations without any blocking
- you need protection against malicious code the agent writes and executes, which command analysis cannot fully catch

## Facets
- artifact type: cli-tool
- maturity: active
- function: security, cli, developer-tools, middleware
- domain: developer-tools, security
- platform: cli, cross-platform, windows
- tags: ai-coding-agents, guardrails, claude-code, pretooluse-hook, secret-protection, destructive-command-blocking, agent-safety, codex, cursor, gemini-cli, ai-agents, command-line, nodejs, macos, linux

## Member repositories
- kenryu42/cc-safety-net (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:54.948725+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:32:36.876746+00:00, confidence not recorded.
  - readme: https://github.com/kenryu42/cc-safety-net (fetched 2026-08-28T04:04:54.948725+00:00, sha 0da609731c5e)
  - homepage: https://ccsafetynet.com (fetched 2026-08-29T11:37:12.016009+00:00, sha a4f465451329)
  - site_page: https://ccsafetynet.com/docs (fetched 2026-08-29T11:37:12.025760+00:00, sha f0b74125634d)
  - site_page: https://ccsafetynet.com/docs/reference/blocked-commands (fetched 2026-08-29T11:37:12.027826+00:00, sha dad418ba0e44)
  - site_page: https://ccsafetynet.com/docs/reference/secret-protection (fetched 2026-08-29T11:37:12.030255+00:00, sha 40af698eefbd)
  - registry_npm: https://registry.npmjs.org/cc-safety-net (fetched 2026-08-29T11:37:12.032252+00:00, sha 671a06a7d451)
- Data as of 2026-08-30T08:39:29.467469+00:00.
