careful

Warn users before executing destructive Bash commands via PreToolUse hook.

1|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/bhianerd/aimemory --skill careful-bhianerd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/bhianerd/aimemory/tree/main/.claude/skills/gstack/careful
Command: npx skills add https://github.com/bhianerd/aimemory --skill careful-bhianerd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The careful skill prevents accidental data loss and destructive operations by warning you before dangerous shell commands run.

Core Features & Use Cases

  • Destructive command detection: Identifies high-risk operations such as recursive deletes, SQL DROP/TRUNCATE, force-push, and hard resets.
  • Safety exceptions: Allows common build-artifact deletions (like dist, .next, node_modules) without warnings.
  • Manual override workflow: When a destructive pattern is detected, you receive a warning and can choose to proceed or cancel.

Quick Start

Ask your AI to run the /careful skill to enable destructive command guardrails for Bash.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I prevent accidental data loss from destructive Bash commands in production?

You can prevent accidental data loss by using a PreToolUse hook that warns you before executing destructive Bash commands. It matches patterns like recursive deletes, database drops, and hard resets, returning a permission decision that asks you to proceed or cancel.

What destructive shell commands should I safeguard during DevOps workflows?

Destructive shell commands to safeguard include recursive deletes, SQL DROP and TRUNCATE operations, force-pushing, hard resets, Kubernetes deletions, and Docker pruning. Safeguarding these commands warns you before operations that could cause irreversible damage to your production environment.

Can I safely delete build artifacts without triggering destructive command warnings?

Yes, you can safely delete common build artifacts without warnings. The command detection includes safety exceptions for directories like dist, .next, and node_modules, allowing routine build-artifact deletions to execute normally while still guarding against irreversible damage.

How do I set up guardrails for dangerous bash commands in my development environment?

You set up guardrails by enabling a PreToolUse hook that extracts your Bash command from tool input and matches it against destructive patterns. When a match is found, it returns a warning and asks for your permission before the command can execute.

Does the destructive command detection work with Kubernetes and Docker operations?

Yes, destructive command detection works with Kubernetes deletions and Docker pruning operations. The system matches these destructive patterns and prompts you with a warning, ensuring you can choose to proceed or cancel before any irreversible infrastructure damage occurs.

What is the best way to add warnings before running destructive database commands?

The best way to add warnings is to use a command guardrail that detects SQL DROP and TRUNCATE operations. When a destructive database pattern is matched, you receive a warning and can manually override the workflow by choosing to proceed or cancel the execution.