careful

Block destructive shell commands until user confirmation via a PreToolUse Bash hook.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safe, proactive guardrails for destructive commands to prevent catastrophic edits in shells, databases, and deployments by warning before execution and requiring explicit confirmation or override.

Core Features & Use Cases

  • Detects destructive patterns such as rm -rf, git push --force, git reset --hard, kubectl delete and similar dangerous operations and issues warnings.
  • PreToolUse hook integration that inspects each command and blocks unapproved actions until user confirms.
  • Safe for prod or shared environments with exceptions for known safe targets and opt-out overrides.

Quick Start

Enable careful mode and run any command to receive a safety warning before execution.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I prevent destructive shell commands like rm -rf from executing accidentally?

To prevent destructive shell commands like rm -rf from executing, you need a guardrail that inspects input via a PreToolUse Bash hook. This mechanism blocks unapproved actions during interactive sessions, requiring explicit user confirmation or an override before proceeding.

Can I add a warning prompt for git push --force and git reset --hard in production environments?

Yes, you can add a warning prompt for git push --force and git reset --hard in production environments. Safety guardrails monitor these specific patterns, issuing warnings and blocking execution until you confirm the decision to proceed or cancel.

How does a PreToolUse hook work for blocking dangerous bash commands?

A PreToolUse hook works by intercepting and analyzing bash command input before execution. It logs usage events locally, detects destructive patterns, and returns a programmatic decision to either proceed after a warning or cancel the operation entirely.

Is there a way to override safety guardrails for known safe targets during deployments?

Yes, safety guardrails support an override mechanism to proceed after a warning. They are designed to be safe for shared and production environments by offering exceptions for known safe targets while still logging usage events locally.

What types of destructive operations should I monitor for in shared environments?

In shared environments, you should monitor for destructive operations such as rm -rf, git push --force, git reset --hard, kubectl delete, and similar dangerous shell commands. Implementing a warning system prevents catastrophic edits to deployments and databases.