PreToolUse hook. Warns before destructive bash commands (rm -rf, DROP TABLE, git push --force, etc). Activates via /careful. Whitelists safe deletions (node_modules, .next, dist).
Scanned 9/5/2026
Install to Claude Code
npx -y skills add masharratt/claude-flow-novice --skill cfn-careful --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Cfn Careful?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/masharratt-cfn-careful)More formats (shields.io, HTML) on the badges page.
---
name: cfn-careful
description: "PreToolUse hook. Warns before destructive bash commands (rm -rf, DROP TABLE, git push --force, etc). Activates via /careful. Whitelists safe deletions (node_modules, .next, dist)."
version: 1.0.0
tags: [safety, guardrails, hooks, destructive-commands]
status: production
---
# 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 TABLE`
- `DROP DATABASE`
- `TRUNCATE`
### Git
- `git push --force` / `git push -f`
- `git reset --hard`
- `git checkout -- .` / `git checkout .`
- `git clean -f`
### Container/Orchestration
- `kubectl delete`
- `docker system prune`
- `docker 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.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.
Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.
Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.
Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.