careful

Intercept destructive commands and prompt for confirmation before execution.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Destructive operations can cause data loss or downtime if run accidentally. This Skill provides automatic safety by inspecting commands and prompting for confirmation before executing dangerous actions.

Core Features & Use Cases

  • Guardrails for dangerous commands: Detects common destructive patterns (rm -rf, git reset --hard, kubectl delete, docker system prune) and prompts for confirmation.
  • Override workflow: Users can explicitly approve or cancel actions with a clear warning message to prevent accidental damage.
  • Hook-based safety: Integrates a pre-tool hook that analyzes the command and returns a permission decision to prevent unsafe runs in automation contexts.

Quick Start

Enable careful mode to warn before any destructive command and permit the user to override with explicit confirmation.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I add a confirmation prompt before running destructive shell commands?

To add a confirmation prompt before destructive shell commands, use a pre-tool hook that inspects the command and emits a permissionDecision ask signal. This guardrail intercepts dangerous patterns like rm -rf and prompts for explicit override before execution.

What destructive command patterns does this safety guardrail intercept?

This safety guardrail intercepts destructive command patterns such as rm -rf, git reset --hard, kubectl delete, and docker system prune. A pre-tool hook analyzes the input command to detect these actions and prevent accidental data loss or downtime.

Can I use command guardrails to prevent accidental data loss in automation pipelines?

Yes, you can use command guardrails to prevent accidental data loss in automation pipelines. The hook-based safety mechanism analyzes commands and returns a permission decision to prevent unsafe runs automatically, ensuring destructive actions require explicit approval.

How do I override a blocked destructive command if I intentionally want to run it?

To override a blocked destructive command, you explicitly approve or cancel the action when the warning message appears. The override workflow presents a clear warning to prevent accidental damage, allowing you to confirm and continue execution if intentional.

Does this command warning system work across different interactive shells?

Yes, this command warning system works across different interactive shells and automation pipelines. It integrates a pre-tool hook that analyzes the input command regardless of the shell environment to consistently intercept and warn before destructive actions.