cc-safe-setup

cc-safe-setup is a skill for Claude Code from yurukusa/cc-safe-setup. It costs 51 tokens per session (466 once invoked), scanned C, a copy of cc-safe-setup, MIT.

A safety setup for Claude Code: an AI coding assistant that can read and change files through tools. It installs checks that block dangerous file, Git, credential, and token-use actions.

In plain words
What is it for?
Use it to protect files, prevent unsafe Git commands, keep credential files such as .env out of agent actions, reduce wasteful token use, and add checks before changes are committed.
Why use it?
Written instructions can be overlooked during automation, while these checks run around tool calls and stop selected risky actions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

Part of the cc-safe-setup plugin — 2 skills, 1 hook shipped together

Good fit Use it to protect files, prevent unsafe Git commands, keep credential files such as .env out of agent actions, reduce wasteful token use, and add checks before changes are committed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yurukusa/cc-safe-setup/safety-setup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yurukusa/cc-safe-setup --skill safety-setup
Clone the repo
git clone --depth 1 https://github.com/yurukusa/cc-safe-setup

Made for: Claude Code.

Or install cc-safe-setup, the plugin that ships this one along with the rest of its 2 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cc-safe-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/yurukusa/cc-safe-setup/safety-setup.svg)](https://agentmods.dev/skills/yurukusa/cc-safe-setup/safety-setup)
Your own site
<a href="https://agentmods.dev/skills/yurukusa/cc-safe-setup/safety-setup"><img src="https://agentmods.dev/badge/skills/yurukusa/cc-safe-setup/safety-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 466 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.00466
Opus 5 $0.00026 $0.00233
Sonnet 5 $0.00010 $0.00093
Haiku 4.5 $0.00005 $0.00047

Measured 7d ago against content hash b79d254c6091, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade C, and why

cc-safe-setup scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **File protection**: Block `rm -rf`, prevent overwriting files outside project
Origin

This is a copy

98% identical to cc-safe-setup — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/safety-setup/SKILL.md · 48 lines

What it actually says

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

npx github:yurukusa/cc-safe-setup

This runs an interactive wizard that configures hooks based on your risk profile.

Install individual hooks

npx github:yurukusa/cc-safe-setup --install-example large-read-guard
npx github:yurukusa/cc-safe-setup --install-example prevent-rm-rf
npx github:yurukusa/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

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 48 lines · 51 tokens per session scan C b79d254c6091

Subscribe to this mod's changes

cc-safe-setup is a skill published in the GitHub repository yurukusa/cc-safe-setup (6 stars, last pushed 3d ago), licensed MIT. It adds 51 tokens to every session and 466 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). It is 98% identical to cc-safe-setup, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

dcg

Destructive Command Guard - High-performance Rust hook for Claude Code that blocks dangerous commands before execution. SIMD-accelerated, modular pack system, whitelist-first architecture. Essential safety layer for agent workflows.

Dicklesworthstone/destructive_command_guard · 42 tokens

app-store-screenshots

Use when building App Store or Google Play screenshot pages, generating exportable marketing screenshots for iOS and/or Android apps, or creating programmatic screenshot generators with Next.js. Triggers on app store, play store, screenshots, marketing assets, html-to-image, phone mockup, android screenshots, feature…

fatihkan/badi · 68 tokens

content

Content production and SEO writing skills. Blog posts, long-form content research, structured content frameworks, audience-targeted writing, content optimization. Triggers on: blog, content writing, article, copywriting, content strategy, content brief, SEO content, audience research.

fatihkan/badi · 55 tokens

expo-app-config

Choosing between app.json vs app.config.ts vs app.config.js, environment variables, variants, extra fields, plugin chain, and slug/scheme/bundle/version discipline. Triggers on app.json, app.config.ts, app.config.js, expo config, environment variable, .env, eas secret, variant, extra field, slug, scheme, bundle…

fatihkan/badi · 86 tokens

expo-config-plugin

Writing Expo config plugins, withInfoPlist, withAndroidManifest, withDangerousMod, mod compose, plugin testing, and registration in app.config.ts. Triggers on config plugin, with-plugin, withInfoPlist, withAndroidManifest, withDangerousMod, withEntitlementsPlist, withGradleProperties, mod, native config, expo plugin…

fatihkan/badi · 85 tokens

expo-modules

Writing Swift/Kotlin native modules with the Expo Modules API, requireNativeModule, async functions, view modules, and the event-emitter pattern. Triggers on expo modules, native module, swift, kotlin, requireNativeModule, expo-module-scripts, expo.modules.json, view module, event emitter, native function, async…

fatihkan/badi · 77 tokens