careful

Intercepts destructive bash commands and prompts for confirmation before execution.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/dhnpmp-tech/project-agent --skill careful-dhnpmp-tech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/dhnpmp-tech/project-agent/tree/main/.claude/skills/gstack/careful
Command: npx skills add https://github.com/dhnpmp-tech/project-agent --skill careful-dhnpmp-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Accidentally running destructive commands like rm -rf, DROP TABLE, or git push --force can cause irreversible data loss, especially when working in production or shared environments. This Skill adds a safety checkpoint that warns you before such commands execute. ## Core Features & Use Cases - Destructive Pattern Detection: Scans every bash command for rm -rf, DROP TABLE, TRUNCATE, git force-push, git reset --hard, kubectl delete, and docker prune operations. - Safe Exceptions: Allows recursive deletes of build artifacts like node_modules, dist, .next, pycache, and coverage without warnings. - User Override: Returns an "ask" permission decision so you can review the warning and choose to proceed or cancel. - Use Case: While debugging a live production issue, you ask the AI to clean up old files. If it proposes rm -rf /var/data, the hook intercepts the command and warns you before anything is deleted. ## Quick Start Ask the AI to enable careful mode before running shell commands against your production 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 commands when using AI coding assistants?

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 permission decision with a warning, letting you confirm or cancel the command.

What destructive commands does the careful skill detect?

It detects rm -rf and recursive deletes, SQL DROP TABLE, DROP DATABASE, and 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 without getting warnings?

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

Does the careful hook block commands permanently?

No. The hook returns an ask permission decision rather than a hard denial, so you can always review the warning and choose to proceed. The protection is session-scoped and ends when the conversation ends.

Why did the careful hook not trigger on my command?

The hook only checks commands run through the Bash tool and matches a fixed set of destructive patterns. Commands that fail JSON parsing of the tool input are allowed by default, and patterns outside the defined list are not intercepted.