careful

Detect destructive shell and deployment command patterns before execution.

6|2|Updated Oct 18, 2021
One-click install
npx skills add https://github.com/jerrywu001/jerrywu001 --skill careful-jerrywu001
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/jerrywu001/jerrywu001/tree/main/.claude/skills/careful
Command: npx skills add https://github.com/jerrywu001/jerrywu001 --skill careful-jerrywu001

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Destructive terminal and deployment commands can cause irreversible damage by deleting data, rewriting history, or impacting production. This Skill reduces the risk by detecting common destructive patterns and forcing an explicit confirmation step before execution.

Core Features & Use Cases

  • Destructive command detection: Warns before running high-risk operations such as rm -rf, DROP TABLE/TRUNCATE, force-push, git reset --hard, kubectl delete, and docker prune/rm -f.
  • Session-scoped safety hook: Applies guardrails via a pre-execution hook so the user can make a conscious choice each time.
  • Configurable safe exceptions: Allows specific “common cleanup” paths like node_modules, dist, and build artifacts without blocking.

Use Case: While debugging in a shared environment or touching production, you want guardrails that catch obvious catastrophic commands without stopping legitimate cleanup work.

Quick Start

Ask the AI to run your command in safety mode, for example: "Use careful mode to check before running rm -rf /var/data."

Frequently Asked Questions about careful

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

FAQPage Schema
How do I prevent destructive commands like rm -rf from executing automatically in a shell session?

Destructive command prevention intercepts high-risk shell operations like rm -rf before execution using a pre-tool hook, returning an 'ask' permission decision that forces an explicit user confirmation to proceed.

Can I add safe exceptions for common cleanup paths like node_modules when using safety mode?

Configurable safe exceptions allow specific cleanup paths like node_modules, dist, and build artifacts to execute without triggering the destructive command guardrails, preventing unnecessary workflow interruptions.

Does git safety mode protect against force-push and git reset --hard history rewrites?

Git safety mode detects version control history rewriting operations such as force-push and git reset --hard, applying guardrails via a session-scoped pre-execution hook that requires a conscious choice before running.

What Kubernetes and Docker destructive operations are caught by production safeguards?

Production safeguards catch Kubernetes kubectl delete commands and Docker cleanup operations including docker prune and docker rm -f by scanning tool input for protected patterns before they run.

When should I not use a pre-execution hook for command safety?

Avoid using a pre-execution hook for command safety during automated pipelines or non-interactive scripts where a forced confirmation step will halt execution, as it requires a manual choice on every matched pattern.