careful

Warn before destructive shell commands and prompt for confirmation via a PreToolUse hook.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety guardrails for destructive commands in shell workflows. Warns before rm -rf, DROP TABLE, force-push, git reset --hard, kubectl delete, and similar destructive operations. Users can override each warning to proceed in urgent cases.

Core Features & Use Cases

  • Detects dangerous commands and prompts for confirmation before execution.
  • Includes safe exceptions for common build artifacts.
  • Integrates as a PreToolUse hook in Bash to intercept risky actions.

Quick Start

Enable careful mode and execute a potentially destructive command to prompt for a warning.

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 data loss from destructive bash commands, you can implement a PreToolUse hook that intercepts risky actions and prompts for confirmation before execution. This safety guardrail catches commands like rm -rf before they run.

What is a PreToolUse hook for bash command safety?

A PreToolUse hook for bash command safety is a mechanism that analyzes commands before execution. When it detects destructive operations like git reset --hard or kubectl delete, it returns a permission decision to ask the user for confirmation.

Can I bypass warning prompts for urgent destructive commands?

Yes, you can bypass warning prompts for urgent destructive commands. The safety guardrails include an override option, allowing you to proceed with the execution of intercepted risky actions when urgent situations demand it.

Does this bash safety hook support safe exceptions for build artifacts?

Yes, the bash safety hook supports safe exceptions for build artifacts. You can specify safe targets, so common build artifact removals proceed without triggering the destructive command warning or requiring user confirmation.

What destructive commands are intercepted by bash safety guardrails?

Bash safety guardrails intercept destructive commands that could cause data loss, including rm -rf, DROP TABLE, force-push, git reset --hard, kubectl delete, and docker system prune, prompting for confirmation before execution.