careful

Intercepts destructive bash commands and prompts for confirmation before execution.

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/raghavbadhwar/rstack --skill careful-raghavbadhwar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/raghavbadhwar/rstack/tree/main/careful
Command: npx skills add https://github.com/raghavbadhwar/rstack --skill careful-raghavbadhwar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Destructive commands like rm -rf, DROP TABLE, or git push --force can permanently delete data or rewrite history with a single keystroke. This Skill adds a confirmation checkpoint before such commands run, preventing accidental data loss in production or shared environments. ## Core Features & Use Cases - Destructive Pattern Detection: Warns before rm -rf, DROP TABLE, TRUNCATE, git force-push, git reset --hard, kubectl delete, and docker prune commands execute. - Safe Exceptions: Allows routine cleanup of build artifacts like node_modules, dist, .next, and pycache without prompting. - User Override: Every warning can be acknowledged and bypassed, so legitimate destructive operations are never blocked outright. - Use Case: While debugging a live production issue, you ask the agent to clean up old files. If it attempts rm -rf on a data directory, the hook pauses execution and asks you to confirm before anything is deleted. ## Quick Start Ask the agent to enable careful mode before running any commands against the production database.

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 commands in an AI coding agent?

Enable a PreToolUse hook that scans every Bash command for recursive delete patterns before execution. When a match is found, the hook returns an ask decision so you can confirm or cancel the command.

What destructive commands does the careful skill detect?

It detects rm -rf and rm -r, DROP TABLE and DROP DATABASE, TRUNCATE, git push --force, git reset --hard, git checkout ., kubectl delete, and docker rm -f or docker system prune. Each match triggers a warning you can override.

Can I still delete node_modules without getting a warning?

Yes. Standalone recursive deletes of build artifacts such as node_modules, dist, .next, __pycache__, .cache, build, .turbo, and coverage are whitelisted and run without prompting. Commands mixing these with other targets still trigger a warning.

Does the careful hook block commands permanently?

No. The hook only returns an ask decision with a warning message. You can always confirm and proceed, so legitimate destructive operations like an intentional database reset are never hard-blocked.

How do I turn off careful mode after enabling it?

The hook is session-scoped, so it deactivates automatically when the conversation ends. Start a new session to run commands without the destructive-pattern checks.