careful

Detect destructive shell commands and warn before execution.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidental destructive actions by detecting dangerous commands and prompting for confirmation before execution.

Core Features & Use Cases

  • Destructive command detection and warning across shell operations (rm -rf, git reset --hard, kubectl delete, etc.).
  • Configurable override to proceed when safe.
  • Activity logging for audit and safety reviews in development and production environments.

Quick Start

Enable careful mode to guard any destructive command before it runs and to log warnings for later review.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I prevent accidental execution of destructive shell commands like rm -rf or git reset --hard?

Destructive command detection works by intercepting shell commands via a prehook before execution, checking them against known dangerous patterns like rm -rf or kubectl delete, and warning you with a confirmation prompt. It applies across local and production environments to prevent irreversible actions.

Can I override the warning and force execute a destructive command if I know it is safe?

Yes, you can safely override the warning to proceed with a destructive command. The prehook enforces safety checks that can be bypassed by user confirmation, allowing you to execute commands like kubectl delete when you have verified the action is intentional and safe.

Does destructive command detection work across different environments like local development and production?

Destructive command detection applies to any environment where destructive actions can occur, including both local and production contexts. Whether you are running rm -rf locally or executing kubectl delete in production, the prehook identifies the risk and prompts for confirmation.

How do I log destructive command warnings for later safety audits?

You can log destructive command warnings for audit by enabling the safety prehook, which records potential risks and warning events during shell operations. This activity logging supports safety reviews in development and production environments by tracking destructive commands like rm and git reset.

What are the limitations of using a prehook to warn about destructive bash commands?

A limitation of using a prehook to warn about destructive bash commands is that it requires user confirmation to override, which may interrupt automated scripts. Additionally, the safety mechanism relies on detecting known patterns like rm -rf and git reset --hard, so highly obfuscated commands might not trigger the warning.