careful

Warns before executing destructive bash commands like rm -rf, DROP TABLE, and force-push.

2|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/westkite1201/garden-engine --skill careful-westkite1201
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/westkite1201/garden-engine/tree/main/.claude/skills/gstack/careful
Command: npx skills add https://github.com/westkite1201/garden-engine --skill careful-westkite1201

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Destructive shell commands such as rm -rf, DROP TABLE, or git push --force can cause irreversible data loss when run accidentally, especially in production or shared environments. This Skill intercepts every bash command before execution and warns you when a destructive pattern is detected, letting you confirm or cancel. ## Core Features & Use Cases - Destructive Pattern Detection: Checks bash commands against patterns including rm -rf, DROP TABLE, TRUNCATE, git push --force, git reset --hard, kubectl delete, and docker system prune. - Safe Exceptions: Allows recursive deletes of build artifacts like node_modules, dist, build, pycache, and coverage without warnings. - Override-Friendly Warnings: Returns an "ask" permission decision with a clear risk explanation, so you can always choose to proceed. - Use Case: While debugging a live production issue, you ask the AI to clean up old database tables. Before any DROP TABLE runs, the hook warns you about permanent data loss and asks for confirmation. ## Quick Start Ask the AI to enable careful mode or safety mode before running shell commands in a production or shared environment.

Frequently Asked Questions about careful

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent accidental rm -rf or destructive commands in Claude Code?

Enable the careful skill, which registers a PreToolUse hook that checks every bash command against destructive patterns. When a match like rm -rf or DROP TABLE is found, it returns an ask decision with a warning so you can confirm or cancel before execution.

What destructive command patterns does the careful hook detect?

It detects rm -rf and recursive deletes, DROP TABLE and DROP DATABASE, TRUNCATE, git push --force, git reset --hard, git checkout or restore of the working tree, kubectl delete, and docker rm -f or system prune.

Can I still delete node_modules or build folders without warnings?

Yes. Recursive deletes targeting only safe build artifacts such as node_modules, dist, build, .next, __pycache__, .cache, .turbo, and coverage are allowed without triggering a warning.

Can I override a destructive command warning and proceed anyway?

Yes. The hook returns a permissionDecision of ask rather than a hard block, so you always see the warning message and can choose to proceed with the command if the operation is intentional.

How do I turn off careful mode after activating it?

End the current conversation or start a new one. The PreToolUse hooks are session-scoped, so the destructive command checks stop applying once the session ends.