Esta página se muestra en inglés. Una traducción al español está en curso.
SkillsMay 14, 2026·2 min de lectura

Claude Code Safety Net — Block Destructive Commands

cc-safety-net adds a safety gate for Claude Code tool calls: explain/score risky commands (rm -rf, git resets) and validate custom rules (1,330★).

Listo para agents

Instalación con revisión previa

Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.

Needs Confirmation · 66/100Política: confirmar
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
Asset
Comando con revisión previa
npx -y tokrepo@latest install 9894f476-bf15-511f-bac9-37c1724d040d --target codex

Primero dry-run, confirma las escrituras y luego ejecuta este comando.

Introducción

cc-safety-net adds a safety gate for Claude Code tool calls: explain/score risky commands (rm -rf, git resets) and validate custom rules (1,330★).

Best for: Teams letting agents run shell commands but needing guardrails, auditability, and consistent “deny by default” rules

Works with: Claude Code native hooks/plugins, npx-based installs, and JSON outputs for automated gating

Setup time: 5-12 minutes

Main

  • Command risk UX: provides explainers for destructive commands before execution.
  • Custom rules: supports defining policy rules (block global npm installs, dangerous docker actions, etc.).
  • Validation gate: documents a --verify-config step so config changes are checked before you rely on them.
  • Agent-friendly outputs: includes JSON mode so an agent runner can decide allow/deny deterministically.

FAQ

  • Is this only for Claude Code?: It is designed around Claude Code hooks/commands, but the patterns are reusable for other agent runners.
  • How do I start safely?: Run doctor, then try explain on a few commands you commonly see in agent sessions.
  • Why validate configs?: A broken rule file can silently disable protections; validation keeps the gate trustworthy.
🙏

Fuente y agradecimientos

Source: https://github.com/kenryu42/claude-code-safety-net > License: MIT > GitHub stars: 1330 · forks: 62

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados