careful

Warn before executing destructive Bash commands like rm -rf and kubectl delete.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Chang-Shih-Yung/auto-learning --skill careful-chang-shih-yung
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/Chang-Shih-Yung/auto-learning/tree/main/.claude/skills/gstack/careful
Command: npx skills add https://github.com/Chang-Shih-Yung/auto-learning --skill careful-chang-shih-yung

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety guardrails for destructive commands in Bash. Warns before rm -rf, DROP TABLE, git reset --hard, kubectl delete, and similar destructive operations. User can override each warning to proceed when necessary. This guard helps prevent accidental data loss in prod, debugging live systems, or working in a shared environment.

Core Features & Use Cases

  • Warning prompts for dangerous Bash commands before execution.
  • Per-command override to proceed after a warning, with auditing.
  • Local analytics logging to ~/.gstack/analytics for monitoring and improvement.

Quick Start

Enable careful mode and run a risky command to see the guardrail warning.

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 prompt before executing destructive Bash commands like rm -rf?

A PreToolUse hook analyzes incoming destructive Bash commands like rm -rf or git reset --hard and returns a permissionDecision with a warning. This guardrail intercepts execution to prevent accidental data loss in development, staging, or production environments.

Can I override the safety guardrail and proceed with a destructive command if needed?

Yes, you can use a per-command override to proceed after a safety guardrail warning. This allows you to execute the destructive Bash command while the system audits the override event for monitoring and improvement purposes.

Does this safety guardrail work with git reset --hard and kubectl delete operations?

Yes, the safety guardrail works with git reset --hard and kubectl delete operations. It prevents accidental destructive operations by warning before execution across development, staging, or production environments.

What is the best way to monitor and log usage events for destructive Bash commands?

The best way to monitor destructive Bash commands is logging usage events to a local analytics file. The guardrail logs warning and override events to a local analytics directory for ongoing monitoring and improvement.

How does a PreToolUse hook prevent accidental data loss in production environments?

A PreToolUse hook prevents accidental data loss in production environments by analyzing incoming Bash commands and returning a warning before execution. It stops destructive actions like DROP TABLE or rm -rf until you review and explicitly override the prompt.