Cc Safe — Development skill for Claude Code
Tip 34: Write lots of tests (and use TDD).
How to install Cc Safe
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open ykdojo/cc-safe and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Cc Safe does
Security scanner for Claude Code settings files. Recursively scans all subdirectories for dangerous patterns in your approved commands that could compromise your host machine. You can run it manually or ask Claude Code to run it with `npx cc-safe .`
Alternatives in Development
- Om Tidy — Self-maintenance pass — acts on every hygiene flag: archives completed work, groups loose clusters, splits ove 4.6k ★
- Claude-code-safety-net Rules Reference — Custom rules reference for defining safe/dangerous command patterns 1.2k ★
- Hippo Feature — Build one hippo feature from RESEARCH.md using the micro-eval TDD loop 734 ★
README
cc-safe
Security scanner for Claude Code settings files. Recursively scans all subdirectories for dangerous patterns in your approved commands that could compromise your host machine. You can run it manually or ask Claude Code to run it with `npx cc-safe .`
Motivation
A user [reported on Reddit](https://www.reddit.com/r/ClaudeAI/comments/1pgxckk/claude_cli_deleted_my_entire_home_directory_wiped/) that Claude Code ran `rm -rf tests/ patches/ plan/ ~/` - that trailing `~/` wiped their entire home directory.
It's easy to dismiss this as a "vibe coder" mistake, but when you're approving dozens of commands across multiple projects, mistakes happen. The permission prompt becomes muscle memory, and one bad approval can be catastrophic.
cc-safe automates what's hard to do manually: scan all your approved commands across all projects and flag the dangerous ones before they cause damage.
Installation
npm install -g cc-safe
Usage
cc-safe [options]
Examples
cc-safe . # Scan current directory and all subfolders
cc-safe ~/projects # Scan a specific directory recursively
cc-safe . --no-low # Hide LOW severity findings
cc-safe --help # Show help
Options
| Option | Description |
|---|---|
--no-low |
Hide LOW severity findings (show only HIGH and MEDIUM) |
--help, -h |
Show help message |
What It Detects
cc-safe scans `.claude/settings.json` and `.claude/settings.local.json` files for risky patterns in the `permissions.allow` array.
Severity Levels
**HIGH** - Critical security risks:
rm -rf/rm -f- Force-deletes filesBash- Allows ANY bash command (without specifier)chmod 777- World-writable permissionschmod -R- Recursive permission changescurl | sh- Downloads and executes codedd if=- Raw disk operationsmkfs,fdisk- Disk formatting> /dev/sd*- Direct device writes
...
Related Skills
TDD Red
Write comprehensive failing tests following TDD red phase principles.
Implement Code
Write tests and production code via TDD, committing incrementally
Implement Slice
RED-GREEN TDD for one vertical slice — write tests, confirm RED, implement, confirm GREEN
Coding Skill
Portable TDD-first coding-agent skill for Codex and Claude Code: clarify behavior first, write RED tests, impl
TDD Green
Implement minimal code to make failing tests pass in TDD green phase:
Green TDD
GREEN phase - Implement just enough code to make tests pass with automatic artifact storage in sprintdag direc
Related Agents
Tester
Test writing specialist for creating and executing tests following TDD methodology. Uses Read, Write, Bash too
Langertha Test Writer
Write Langertha tests (Test2::Bundle::More) — regression tests, TDD red phase, coverage for a new engine/role/
TDD Red Agent
Expert TDD RED phase for React/Vite/TypeScript - write failing tests before implementation