careful

Intercepts destructive bash commands and prompts for confirmation before execution.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/aicodepro/ai-agent-nexi --skill careful-aicodepro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/aicodepro/ai-agent-nexi/tree/main/agent/skills/gstack/careful
Command: npx skills add https://github.com/aicodepro/ai-agent-nexi --skill careful-aicodepro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Destructive shell commands like rm -rf, DROP TABLE, or git push --force can cause irreversible data loss when run accidentally during development or production work. This Skill adds a safety checkpoint that warns you before such commands execute, letting you confirm or cancel. ## Core Features & Use Cases - Destructive Pattern Detection: Scans every bash command for risky patterns including recursive deletes, SQL DROP/TRUNCATE, git force-push, git reset --hard, kubectl delete, and docker prune. - Safe Exceptions: Allows routine cleanup of build artifacts like node_modules, dist, pycache, and coverage without triggering warnings. - Session-Scoped Guardrails: Hooks stay active for the session and log anonymized usage events locally. - Use Case: While debugging a live production issue, enable careful mode so any accidental kubectl delete or force-push triggers a confirmation prompt instead of executing immediately. ## Quick Start Ask the assistant to enable careful mode so all destructive commands require confirmation 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?

Enable careful mode, which installs a PreToolUse hook that scans every bash command for destructive patterns like rm -rf, git reset --hard, and force-push. Matching commands trigger a confirmation prompt that you can approve or cancel.

What destructive command patterns does the careful hook detect?

The hook detects recursive deletes (rm -r), SQL DROP TABLE/DATABASE and TRUNCATE, git push --force, git reset --hard, git checkout/restore of the working tree, kubectl delete, and docker rm -f or system prune.

Does the careful hook block rm -rf node_modules?

No, deleting build artifacts is allowed without warning. Safe targets include node_modules, .next, dist, __pycache__, .cache, build, .turbo, and coverage, so routine cleanup is not interrupted.

Can I override a destructive command warning?

Yes, every warning returns a permission decision of ask rather than a hard block. You can review the warning message and choose to proceed with the command or cancel it.

How long does careful mode stay active?

The hook is session-scoped, so protection lasts until the conversation ends. Starting a new conversation deactivates the guardrails automatically.