careful

Flag risky shell commands like rm -rf before execution via a PreToolUse Bash hook.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guard destructive commands before execution by flagging risky patterns.

Core Features & Use Cases

  • Warns before destructive operations like rm -rf, git reset --hard, and kubectl delete.
  • Allows user override to proceed when safe in controlled environments.
  • Integrates as a PreToolUse Bash hook with a dedicated check script.

Quick Start

Enable careful mode by activating the PreToolUse Bash hook and running commands in your shell.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I prevent destructive bash commands like rm -rf from executing accidentally?

To prevent destructive bash commands, you need a safety guard that intercepts risky patterns before execution. This Skill flags commands like rm -rf, git reset --hard, and kubectl delete using a PreToolUse Bash hook, warning you and requiring an override to proceed.

What shell commands are considered destructive and trigger a safety warning?

Destructive shell commands that trigger a safety warning include rm -rf, git reset --hard, and kubectl delete. The guard checks command patterns via a dedicated script and prompts you with a warning before allowing execution in your interactive shell session.

Can I override the safety prompt and force a destructive command to run?

Yes, you can override the safety prompt to force a destructive command to run. When operating in controlled environments where you deem the action safe, the guard allows you to bypass the warning and proceed with executing the flagged shell command.

Does the bash safety guard work in interactive shell sessions only?

The bash safety guard is applied to interactive shell sessions to warn against destructive operations. It integrates directly as a PreToolUse Bash hook, running a check script that evaluates your commands in real-time before they are executed.

How do I set up guardrails for destructive git and kubectl operations?

To set up guardrails for destructive git and kubectl operations, you activate the PreToolUse Bash hook. This hook runs a check script that identifies risky patterns like git reset --hard and kubectl delete, warning you before execution and allowing an optional override.

What is the best way to add warning prompts for risky shell commands?

The best way to add warning prompts for risky shell commands is using a PreToolUse hook that flags destructive patterns. This approach intercepts commands before execution, providing a warning and optional user override to ensure controlled shell operations.