careful

Warn before executing destructive shell commands via a PreToolUse hook.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidental destructive shell commands by warning before execution.

Core Features & Use Cases

  • Pre-execution Bash command checks identify destructive patterns like rm -rf, git reset --hard, kubectl delete, and similar risky actions.
  • Prompt-based override allows the user to proceed or cancel, fostering safe experimentation in development and production environments.
  • Usage analytics are logged locally to help improve safety policies without sending data to external services.
  • Use Case: In a multi-tenant development environment, activating careful mode prevents accidental data loss during scripted deployments.

Quick Start

Enable safety mode and test with a destructive command to see the warning prompt and choose whether to proceed.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I prevent accidental destructive bash commands from executing in the terminal?

You can prevent accidental destructive bash commands by using a PreToolUse hook that analyzes shell input for risky patterns like rm -rf or git reset --hard. It warns before execution and prompts you to proceed or cancel.

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

Destructive shell commands that trigger a safety warning include patterns like rm -rf, git reset --hard, and kubectl delete. The guardrail script analyzes bash commands for these risky actions before they execute.

Can I override the safety check if I need to run a risky command intentionally?

Yes, you can override the safety check. When the guardrail detects a destructive bash command, it provides a prompt-based override that allows you to choose whether to proceed with execution or cancel it.

Does this safety guardrail work for automated deployment scripts or only interactive terminals?

The safety guardrail works in both interactive terminals and automation scripts. It is specifically applicable in environments where the risk of data loss is present, such as multi-tenant development deployments.

How do I set up bash command guardrails to prevent data loss in development environments?

You set up bash command guardrails through a strict installation of a Bash-based safety script. This hook intercepts risky commands, logs usage analytics locally, and prompts you before allowing destructive execution.

Are the usage analytics from the safety checks sent to external services?

No, the usage analytics are not sent to external services. The guardrail logs analytics locally to help improve safety policies while maintaining strict data privacy within your environment.