cc-safe-setup

Install pre-built hooks that block dangerous file, git, and credential actions in Claude Code.

4|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/yurukusa/cc-safe-setup --skill cc-safe-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cc-safe-setup
Source: https://github.com/yurukusa/cc-safe-setup/tree/main/skills/safety-setup
Command: npx skills add https://github.com/yurukusa/cc-safe-setup --skill cc-safe-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the risk of destructive or costly mistakes when Claude Code runs autonomous tool actions, such as deleting files, leaking credentials, or pushing bad changes to critical branches.

Core Features & Use Cases

  • Prevents destructive file operations: blocks commands like rm -rf and reduces the chance of overwriting or touching paths outside the intended project.
  • Hardens git workflows: stops common disaster patterns such as force-pushing to main or resetting hard in unsafe ways.
  • Guards credentials and reduces token waste: helps prevent accidental .env/secret handling and includes protections that warn on excessive reads and inefficient behaviors during autonomous coding.

Quick Start

Run npx cc-safe-setup to install and configure the safety hooks for your Claude Code environment.

Frequently Asked Questions about cc-safe-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent Claude Code from deleting files or running rm -rf autonomously?

To prevent Claude Code from deleting files or running rm -rf, you need safety hooks that validate and block destructive actions at runtime. This skill installs pre-built hooks to intercept and stop dangerous file operations before they execute.

Can I stop autonomous AI coding from leaking credentials and .env files?

Yes, you can stop autonomous AI coding from leaking credentials by installing runtime guards. This skill enforces safety hooks that detect and block accidental exposure of .env files and secrets during autonomous tool calls.

How do I block unsafe git operations like force-pushing to main during AI refactoring?

To block unsafe git operations like force-pushing to main during AI refactoring, install runtime safety hooks. This skill hardens git workflows by validating commands and stopping disaster patterns such as hard resets or force-pushing to critical branches.

Does cc-safe-setup work without additional dependencies in my developer workflow?

Yes, cc-safe-setup works without additional dependencies. You can run npx cc-safe-setup directly to install and configure the safety hooks in your Claude Code environment, requiring no other components or external libraries.

How to reduce token waste during autonomous coding with Claude Code?

To reduce token waste during autonomous coding, you can use runtime hooks that warn on excessive reads and inefficient behaviors. This skill includes built-in protections that monitor token usage and block wasteful actions during autonomous execution.

When should I use runtime hooks for autonomous coding safety?

You should use runtime hooks for autonomous coding safety whenever Claude Code executes tool calls before commit, including refactors, bug fixes, and repository changes. They are essential for preventing catastrophic failures in unsupervised environments.