careful

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety guardrails are activated to warn before destructive commands such as rm -rf, git reset --hard, or kubectl delete, preventing accidental data loss.

Core Features & Use Cases

  • PreToolUse Bash hook to intercept destructive commands and prompt for confirmation.
  • Detects common dangerous patterns (rm -rf, git reset --hard, kubectl delete) and blocks or warns as configured.
  • Safe exceptions allow certain build-related deletions, with clear prompts and override options for advanced users.

Quick Start

Enable careful mode for your shell or tool workflow to receive warnings before executing destructive commands.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I prevent accidental data loss from destructive bash commands like rm -rf?

To prevent accidental data loss from destructive bash commands like rm -rf, you can use a PreToolUse Bash hook that intercepts the execution and prompts you for confirmation before proceeding. This adds safety guardrails to your workflow.

Can I get a warning before running git reset --hard in a shared workspace?

Yes, you can get a warning before running git reset --hard in a shared workspace. The hook detects common dangerous patterns and prompts for permission, ensuring you do not accidentally overwrite shared work or cause data loss.

What is a PreToolUse Bash hook for command safety?

A PreToolUse Bash hook for command safety is a mechanism that analyzes your shell command before it executes. If it detects a dangerous pattern like kubectl delete, it blocks or warns you, providing an override option only after explicit confirmation.

Does the destructive command warning allow exceptions for build-related deletions?

Yes, the destructive command warning allows exceptions for build-related deletions. It provides safe exceptions for certain known safe operations while still delivering clear prompts and override options for advanced users when needed.

How do I set up safety guardrails for kubectl delete on production environments?

To set up safety guardrails for kubectl delete on production environments, enable careful mode in your shell or tool workflow. This mode implements a precheck hook that intercepts dangerous commands and prompts for permission before execution.