careful

Intercept destructive Bash commands and warn users before execution.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety mode provides guardrails that warn before destructive commands like rm -rf, git reset --hard, kubectl delete, and more, preventing accidental data loss in prod or shared environments.

Core Features & Use Cases

  • Adds a pre-execution safety check that alerts you when a destructive command is detected, offering a warning and an option to proceed.
  • Supports common destructive patterns (rm -rf, git push --force, git reset --hard, kubectl delete) and safe exceptions for build artifacts.
  • Useful during maintenance, debugging live systems, or when collaborating in critical environments.

Quick Start

Enable safety mode for destructive commands by running the pretool hook before executing risky operations.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I add a warning before executing destructive bash commands like rm -rf?

You can intercept destructive bash commands by enabling a pre-execution safety check that detects patterns like rm -rf and warns you before execution. This guardrail prevents accidental data loss by returning a permission decision to proceed or cancel.

What is the best way to prevent accidental data loss during live system debugging?

The best way to prevent accidental data loss during live debugging is applying a pre-execution hook that intercepts risky operations. It performs checks for destructive patterns and prompts a warning, allowing you to verify the command before proceeding.

Can I get a warning before running git reset --hard or kubectl delete?

Yes, you can get a warning before running git reset --hard or kubectl delete by using a safety hook. It scans for these specific destructive patterns and returns a permission decision, offering an option to proceed only after acknowledging the warning.

Does the destructive command safety check allow exceptions for build artifacts?

Yes, the destructive command safety check supports safe exceptions for build artifacts. While it intercepts patterns like rm -rf and git push --force by default, it allows defined safe operations to proceed without triggering the warning.