cc-safe-setup
- Repo stars 29
- Author repo cc-safe-setup
cc-safe-setup
Safety-first configuration for Claude Code. Prevents the accidents that happen when AI writes code autonomously.
What it does
Installs pre-built safety hooks into your Claude Code environment. These hooks run automatically before/after tool calls to block dangerous operations.
Categories:
- File protection: Block
rm -rf, prevent overwriting files outside project - Git safety: Prevent force-push to main, block
reset --hard - Credential guards: Stop
.envfiles from being committed or read by AI - Token optimization: Warn on large file reads, limit subagent spawning
- Quality gates: Detect lazy rewrites, verify claims before committing
Quick start
npx cc-safe-setup
This runs an interactive wizard that configures hooks based on your risk profile.
Install individual hooks
npx cc-safe-setup --install-example large-read-guard
npx cc-safe-setup --install-example prevent-rm-rf
npx cc-safe-setup --install-example git-force-push-block
Why hooks instead of CLAUDE.md rules
Rules in CLAUDE.md are suggestions — Claude can forget them. Hooks are enforced at the system level. A hook that blocks rm -rf cannot be overridden by the AI.
From 800+ hours of autonomous operation: the hooks that matter most are the ones you don't notice until something goes wrong.
Resources
- Repository: https://github.com/yurukusa/cc-safe-setup
- Hook Selector (find hooks for your setup): https://yurukusa.github.io/cc-safe-setup/hook-selector.html
- Token Checkup (diagnose waste): https://yurukusa.github.io/cc-safe-setup/token-checkup.html
- Fluxly category
- Security
- Author-declared agents
- No explicit declaration found; this is not inferred or tested compatibility
- Static check
- 88 / 100 · heuristic scan, not runtime safety proof
- Author / version / license
- @yurukusa · no license declared
- Fluxly token estimate
- Lean
- Fluxly setup estimate
- Guided setup
- External API key
- No requirement detected
- Detected OS requirements
- macOS · Linux · Windows
- Runtime requirements
- Unspecified
- Detected file/system behavior
-
- Read-only
- Shell exec
- Env read
- Detected network behavior
- Local-only
- Install commands
- None (reference only)
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
The current SKILL.md does not define a fixed output example. Installs pre-built safety hooks into your Claude Code environment. These hooks run automatically before/after tool calls to block dangerous operations. Categories: File protection: Block rm -rf, prevent overwriting files outside project
This runs an interactive wizard that configures hooks based on your risk profile.
Install individual hooks
Rules in CLAUDE.md are suggestions — Claude can forget them. Hooks are enforced at the system level. A hook that blocks rm -rf cannot be overridden by the AI. From 800+ hours of autonomous operation: the hooks that matter most are the ones you don't notice…
Repository: https://github.com/yurukusa/cc-safe-setup Hook Selector (find hooks for your setup): https://yurukusa.github.io/cc-safe-setup/hook-selector.html Token Checkup (diagnose waste): https://yurukusa.github.io/cc-safe-setup/token-checkup.html
# cc-safe-setup
Safety-first configuration for Claude Code. Prevents the accidents that happen when AI writes code autonomously.
## What it does
Installs pre-built safety hooks into your Claude Code environment. These hooks run automatically before/after tool calls to block dangerous operations.
**Categories:**
- **File protection**: Block `rm -rf`, prevent overwriting files outside project
- **Git safety**: Prevent force-push to main, block `reset --hard`
- **Credential guards**: Stop `.env` files from being committed or read by AI
- **Token optimization**: Warn on large file reads, limit subagent spawning
- **Quality gates**: Detect lazy rewrites, verify claims before committing
## Quick start
```bash
npx cc-safe-setup
```
This runs an interactive wizard that configures hooks based on your risk profile.
## Install individual hooks
```bash
npx cc-safe-setup --install-example large-read-guard
npx cc-safe-setup --install-example prevent-rm-rf
npx cc-safe-setup --install-example git-force-push-block
```
## Why hooks instead of CLAUDE.md rules
Rules in CLAUDE.md are suggestions — Claude can forget them. Hooks are enforced at the system level. A hook that blocks `rm -rf` cannot be overridden by the AI.
From 800+ hours of autonomous operation: the hooks that matter most are the ones you don't notice until something goes wrong.
## Resources
- Repository: https://github.com/yurukusa/cc-safe-setup
- Hook Selector (find hooks for your setup): https://yurukusa.github.io/cc-safe-setup/hook-selector.html
- Token Checkup (diagnose waste): https://yurukusa.github.io/cc-safe-setup/token-checkup.html Author text anchors workflow facts; Fluxly only indexes current sections, terms, files, and commands.
sections -> What it does → Quick start → Install individual hooks → Why hooks instead of CLAUDE.md rules → Resources
terms -> Categories · File protection · Git safety · Credential guards · Token optimization · Quality gates
files/cmd -> rm -rf · reset --hard · .env · before/after · CLAUDE.md · github.com/yurukusa/cc-safe-setup · yurukusa.github.io/cc-safe-setup/hook-selector.html · yurukusa.github.io/cc-safe-setup/token-checkup.html
body sha256 -> b46f196ae6ac
Decide Fit First
Design Intent
How To Use It
Boundaries And Review