careful

Intercepts destructive bash commands and prompts for confirmation before execution.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/TarunTeja44/portfolio --skill careful-tarunteja44
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/TarunTeja44/portfolio/tree/main/.agents/skills/careful
Command: npx skills add https://github.com/TarunTeja44/portfolio --skill careful-tarunteja44

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents and developers can accidentally run destructive commands like rm -rf, DROP TABLE, or git push --force, causing irreversible data loss or production outages. This Skill adds a safety checkpoint that warns before such commands execute. ## Core Features & Use Cases - Destructive Command Detection: Scans every Bash command for dangerous patterns including recursive deletes, SQL DROP/TRUNCATE, git force-push, git reset --hard, kubectl delete, and docker prune. - Safe Exceptions: Allows routine cleanup of build artifacts like node_modules, dist, .next, pycache, and coverage without triggering 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 system, you ask the agent to clean up old files. When it attempts rm -rf /var/data, the hook intercepts the command and warns you before anything is deleted. ## Quick Start Ask the agent to enable careful mode before running shell commands against a 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 from an AI 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 with a warning, letting you confirm or cancel the command.

How to add safety guardrails for destructive git commands?▼

Use a hook script that pattern-matches git push --force, git reset --hard, and git checkout . in the command string. The check-careful.sh script detects these via grep regular expressions and warns that history rewrites or uncommitted work loss may occur.

Does the destructive command check allow deleting node_modules?▼

Yes, rm -rf of build artifacts is explicitly allowed without warning. Safe targets include node_modules, .next, dist, __pycache__, .cache, build, .turbo, and coverage directories.

What destructive patterns does the careful hook detect?▼

The hook detects rm -rf, DROP TABLE, DROP DATABASE, TRUNCATE, git push --force, git reset --hard, git checkout ., kubectl delete, docker rm -f, and docker system prune. SQL matching is case-insensitive.

Why is the destructive command warning not triggering?▼

The hook only inspects Bash tool commands, so destructive actions through other tools are not covered. Also verify the hook is registered in the session, since hooks are session-scoped and deactivate when the conversation ends.