careful

Inspect Bash commands for destructive patterns and request confirmation.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/24601/gastack-pre-fork --skill careful-24601
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/24601/gastack-pre-fork/tree/main/careful
Command: npx skills add https://github.com/24601/gastack-pre-fork --skill careful-24601

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidental destructive operations by scanning user-supplied shell and VCS commands and prompting for confirmation before they run, reducing data loss and production incidents.

Core Features & Use Cases

  • Pre-execution scanning: Intercepts Bash tool commands and inspects them before execution.
  • Pattern-based warnings: Detects rm -rf, DROP/TRUNCATE, git force-push, git reset --hard, kubectl delete, docker prune, and similar destructive patterns.
  • Safe exceptions and logging: Allows common safe deletes (node_modules, build artifacts), logs hook fires locally without recording command contents, and returns a permissionDecision to request user confirmation.
  • Use Case: Use when working in production shells, reviewing CI/CD steps, or collaborating in a shared repository to avoid irreversible operations.

Quick Start

Use the careful skill to scan the next Bash command and warn me if it contains destructive operations before execution.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I get a warning before running destructive shell commands like rm -rf?

You can intercept destructive shell commands like rm -rf using a PreToolUse hook that scans Bash tool invocations, matches configured destructive patterns, and returns a permission decision to ask for your confirmation before execution.

Can I prevent accidental git force-push and git reset --hard in my terminal?

Yes, preventing accidental git force-push and git reset --hard is achieved by inspecting version-control commands through a pre-execution hook that detects destructive Git patterns and prompts you for confirmation before allowing them to run.

Does this destructive command warning system work with kubectl delete and docker prune?

Yes, the warning system works with kubectl delete and docker prune by matching those specific destructive patterns during Bash tool inspection and requesting user confirmation before the command executes.

How do I add safe exceptions so common build artifact deletes are not blocked?

You can configure safe exceptions for common build artifacts like node_modules so the pre-execution scanner recognizes them as non-destructive, logs the hook event locally without recording command contents, and allows execution without prompting.

What is the best way to protect production shells from destructive database operations?

Protecting production shells from destructive database operations like DROP or TRUNCATE is done by scanning user-supplied shell commands via a PreToolUse hook that matches dangerous patterns and returns a permission decision requiring explicit confirmation.

Why should I use a pre-execution hook instead of manually checking commands for destructive operations?

Using a pre-execution hook automates the inspection of Bash tool inputs, consistently matching destructive patterns with safe exceptions and logging events locally, which reduces human error and prevents data loss better than manual checks.