careful

Warn before executing destructive shell commands via a PreToolUse Bash hook.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety guardrails warn before executing destructive commands and prevent accidental data loss by requiring confirmation.

Core Features & Use Cases

  • Pre-execution warnings for dangerous operations (rm -rf, git reset --hard, kubectl delete, and similar commands).
  • Optional override support to allow proceeding with explicit confirmation.
  • Automatic logging of usage analytics for governance and auditing.

Quick Start

Enable the PreToolUse Bash hook and run a test safe command to verify the warning prompts.

Frequently Asked Questions about careful

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

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

A pre-execution warning for destructive commands works by using a PreToolUse Bash hook to analyze commands before they run. It detects operations like git reset --hard and kubectl delete, then pauses to require explicit user confirmation before proceeding.

Can I override the safety warning if I need to force a git reset --hard in a pipeline?

Yes, you can override the safety warning to proceed with destructive commands. The Skill provides optional override support that allows you to bypass the pre-execution prompt and execute operations like git reset --hard after giving explicit confirmation.

Does this destructive command guard work for kubectl delete operations in shared environments?

Yes, this destructive command guard works for kubectl delete operations across prod and shared environments. It is applicable to both interactive shells and automation pipelines, ensuring warnings trigger before risky kubectl actions are executed.

How do I log usage analytics for overridden destructive commands in devops?

To log usage analytics for overridden destructive commands in devops, the Skill automatically records usage data when the pre-execution hook triggers. This provides governance and auditing records for every warning event and subsequent override action.

What is the best way to prevent accidental data loss from rm -rf in an automation pipeline?

The best way to prevent accidental data loss from rm -rf in an automation pipeline is to implement a PreToolUse Bash hook. This mechanism intercepts destructive commands, enforces warning prompts, and logs usage analytics for auditing without stopping valid pipeline flows.

When should I not use a pre-execution warning hook for bash safety?

You should not use a pre-execution warning hook for bash safety in fully autonomous, non-interactive pipelines where pausing for a prompt would cause a timeout. While overrides are supported, requiring confirmation can block automated flows if not properly configured.