careful

Block destructive commands like 'rm -rf' via PreToolUse hooks.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/GrassHopper42/ANTidy --skill careful-grasshopper42
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/GrassHopper42/ANTidy/tree/main/.claude/skills/gstack/careful
Command: npx skills add https://github.com/GrassHopper42/ANTidy --skill careful-grasshopper42

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Prevents accidental or unauthorized execution of destructive commands like 'rm -rf', 'DROP TABLE', and others that can lead to irreversible data loss in a production environment.

Core Features & Use Cases

  • Safety Checks: Before running commands like 'rm -rf' or 'git reset --hard', this Skill checks for destructive patterns and alerts the user.
  • Custom Triggers: Detects when to check for destructive actions by listening to specific trigger phrases like "be careful", "warn before destructive", and "safety mode".
  • PreToolUse Hooks: Integrates as a PreToolUse hook to evaluate and potentially block destructive commands from being executed.
  • Customization: Allows exceptions to be set up for safe operations and manual overrides for certain checks.

Quick Start

Use the "careful" skill when you need to run a command like "rm -rf" to ensure you are not performing a destructive operation accidentally.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I prevent destructive commands like rm -rf from running in production?

Preventing destructive commands in production requires pre-validation against destructive patterns before execution. This Skill checks commands like 'rm -rf' or 'git reset --hard' and alerts or blocks execution to ensure command safety and prevent irreversible data loss.

Can I set up safe exceptions for specific commands when using production guardrails?

Yes, you can set up safe exceptions for specific commands when using production guardrails. The Skill allows manual overrides and known safe command exceptions to bypass destructive pattern checks, ensuring safe operations are not blocked by pre-validation.

How do pre-validation hooks work for command safety checks?

Pre-validation hooks work for command safety by evaluating commands against a set of destructive patterns before they execute. Operating as a PreToolUse hook, it intercepts the command, analyzes it, and triggers warnings or blocks execution if destructive patterns are detected.

What is the best way to block accidental execution of destructive database operations?

The best way to block accidental execution of destructive database operations is pre-validation against destructive patterns. This Skill detects commands like 'DROP TABLE' during the pre-execution phase and blocks them, ensuring safe execution in production environments requiring extra caution.

Do I need specific trigger phrases to activate safe mode for command execution?

Yes, you need specific trigger phrases to activate safe mode for command execution. The Skill detects when to check for destructive actions by listening for custom triggers like 'be careful', 'warn before destructive', and 'safety mode' to initiate pre-validation.