careful

Intercepts destructive Bash commands and warns or blocks before execution.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/abdulazeezoj/monovella-poc --skill careful-abdulazeezoj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/abdulazeezoj/monovella-poc/tree/main/.agents/skills/gstack/careful
Command: npx skills add https://github.com/abdulazeezoj/monovella-poc --skill careful-abdulazeezoj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents and developers can accidentally run destructive shell commands like rm -rf, DROP TABLE, or git push --force, causing irreversible data loss or production impact. This Skill adds a PreToolUse safety hook that inspects every Bash command before it runs. ## Core Features & Use Cases - Two-tier protection: MEDIUM-tier patterns (recursive deletes, SQL DROP/TRUNCATE, force-push, git reset --hard, kubectl delete, docker prune) trigger an overridable warning, while HIGH-tier catastrophes (recursive delete of / or $HOME, force-push to the default branch) are hard-denied. - Evasion resistance: Detects shell obfuscation via IFS word-splitting and base64-to-shell decoding, parses hook payloads with a real JSON parser, and fails closed on unparseable input. - Configurable rules: Add custom warn patterns via global or per-project careful-patterns.txt files, which can only add rules, never suppress baseline warnings. - Use Case: Activate safety mode before debugging a live production system so any accidental kubectl delete or DROP TABLE prompts for confirmation first. ## Quick Start Ask the AI to enable careful mode so every destructive Bash command is checked and warned about before running.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I prevent accidental rm -rf or destructive git commands?

Activate careful mode to install a PreToolUse hook that checks every Bash command against destructive patterns. Matching commands like rm -rf, git reset --hard, or DROP TABLE trigger an overridable warning before they run.

What commands does the careful hook block or warn about?

It warns on recursive deletes, SQL DROP and TRUNCATE, git force-push, git reset --hard, git checkout ., kubectl delete, and docker prune. It hard-denies recursive deletes of / or the home directory and force-pushes to the default branch.

Can I add custom destructive command patterns?

Yes, add one POSIX ERE per line to ~/.gstack/careful-patterns.txt globally or ~/.gstack/projects/<slug>/careful-patterns.txt per project. These rules are additive only and can never suppress a built-in baseline warning.

Does the careful hook allow deleting node_modules or build folders?

Yes, a standalone rm -rf of node_modules, .next, dist, __pycache__, .cache, build, .turbo, or coverage is whitelisted without warning. Multi-line commands or command substitution targeting these paths still fall through to the destructive checks.

Can the careful hook be bypassed with shell obfuscation?

The hook detects IFS word-splitting and base64-decode-piped-to-shell patterns and treats them as a reason to ask. Compound commands that evade simple matching fall through to the MEDIUM ask tier rather than being silently allowed.