Imported from masharratt/claude-flow-novice (
.claude/skills/cfn-careful/SKILL.md). Install upstream withnpx skills add masharratt/claude-flow-novice --skill cfn-careful. Copyright stays with the author.
CFN Careful
Purpose: Prevent accidental destructive operations by intercepting dangerous bash commands before execution.
Dangerous Patterns Detected
File Operations
rm -rf/rm -r(except whitelisted dirs)dd if=/dev/zero
Database
DROP TABLEDROP DATABASETRUNCATE
Git
git push --force/git push -fgit reset --hardgit checkout -- ./git checkout .git clean -f
Container/Orchestration
kubectl deletedocker system prunedocker rm -f
Whitelisted Safe Deletions
These directories are safely regenerated and do not contain user data:
- node_modules, .next, dist, pycache, .cache, .turbo
- *.pyc, *.o, .DS_Store
- Build artifacts in /tmp/
How It Works
PreToolUse hook on Bash tool. Parses command from stdin JSON, checks against dangerous patterns. Returns exit 2 (block) with warning message if matched, exit 0 (allow) otherwise.
Activation
The hook is registered in settings.json and always active. No /careful command needed to activate.