careful

Intercepts destructive bash commands and prompts for confirmation before execution.

Updated May 15, 2026
One-click install
npx skills add https://github.com/tgmarinho/canetaco --skill careful-tgmarinho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/tgmarinho/canetaco/tree/main/.claude/skills/careful
Command: npx skills add https://github.com/tgmarinho/canetaco --skill careful-tgmarinho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Accidentally running destructive commands like rm -rf, DROP TABLE, or git push --force can cause irreversible data loss, especially in production or shared environments. This Skill adds a safety checkpoint that warns you before such commands execute. ## Core Features & Use Cases - Destructive Command Detection: Scans every bash command for dangerous patterns including rm -rf, DROP TABLE, TRUNCATE, git push --force, git reset --hard, kubectl delete, and docker system prune. - Confirmation Prompts: Returns an ask-permission decision with a warning message when a risky pattern is found, letting you proceed or cancel. - Safe Exceptions: Allows routine cleanup of node_modules, .next, dist, build, coverage, and similar build artifacts without warnings. - Use Case: While debugging a live production issue, activate careful mode so any accidental kubectl delete or force-push triggers a confirmation prompt instead of executing immediately. ## Quick Start Ask the assistant to enable careful mode so every destructive bash command requires your confirmation before running.

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 scans every bash command for destructive patterns. When a match is found, it returns an ask permission decision so you can confirm or cancel before execution.

What destructive command patterns does the careful skill detect?

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

Can I still delete node_modules or build folders without warnings?

Yes. The skill whitelists safe cleanup targets including node_modules, .next, dist, __pycache__, .cache, build, .turbo, and coverage, so routine cleanup commands run without confirmation prompts.

Can I override a destructive command warning?

Yes. Every warning is an ask-permission prompt, not a hard block. You can choose to proceed with the command after reviewing the warning, or cancel it.

How do I turn off careful mode after activating it?

End the current conversation or start a new one. The hooks are session-scoped, so the protection automatically deactivates when the session ends.