cc-safe-setup
- Repo stars 29
- Author updated Live
- Author repo cc-safe-setup
- Domain
- Security
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @yurukusa · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- macOS · Linux · Windows
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Shell exec
- Env read
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: cc-safe-setup
description: Safety hooks for Claude Code — 700 pre-built hooks that prevent file deletion, credential leaks…
category: security
runtime: no special runtime
---
# cc-safe-setup output preview
## PART A: Task fit
- Use case: Safety hooks for Claude Code — 700 pre-built hooks that prevent file deletion, credential leaks, git disasters, and token waste during autonomous AI coding sessions. 9,200+ tests. Install with npx cc-safe-setup..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “What it does / Quick start / Install individual hooks” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Safety hooks for Claude Code — 700 pre-built hooks that prevent file deletion, credential leaks, git disasters, and token waste during autonomous AI coding sessions. 9,200+ tests. Install with npx cc-safe-setup.”.
- **02** When the source has headings, the agent prioritizes “What it does / Quick start / Install individual hooks” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, run shell commands, read environment variables, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, run shell commands, read environment variables, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, run shell commands, read environment variables, write/modify files.
Start with a small task and check whether the result follows “What it does / Quick start / Install individual hooks”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: cc-safe-setup
description: Safety hooks for Claude Code — 700 pre-built hooks that prevent file deletion, credential leaks…
category: security
source: yurukusa/cc-safe-setup
---
# cc-safe-setup
## When to use
- Safety hooks for Claude Code — 700 pre-built hooks that prevent file deletion, credential leaks, git disasters, and to…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “What it does / Quick start / Install individual hooks” and keep inference separate from source facts.
- read files, run shell commands, read environment variables, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "cc-safe-setup" {
input -> user goal + target files + boundaries + acceptance criteria
context -> What it does / Quick start / Install individual hooks
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, run shell commands, read environment variables, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 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
Decide Fit First
Design Intent
How To Use It
Boundaries And Review