careful

Guard destructive shell commands with confirmation prompts before execution.

Updated Dec 13, 2017
One-click install
npx skills add https://github.com/dogeared/tnra --skill careful-dogeared
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/dogeared/tnra/tree/main/.claude/skills/gstack/careful
Command: npx skills add https://github.com/dogeared/tnra --skill careful-dogeared

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safe shell practices can be easily broken by accidental destructive commands. The careful skill provides automated guardrails that warn before operations like rm -rf, DROP TABLE, git reset --hard, kubectl delete, and similar risky actions, giving users an opportunity to abort or override.

Core Features & Use Cases

  • Destructive-command detection with proactive warnings before execution.
  • Supports Bash, SQL, and Git workflows across local machines, CI, and production-like environments.
  • Use Case: A developer runs a maintenance script and is prompted to confirm before deleting data or irreversible changes.

Quick Start

Enable safety checks before executing destructive commands in your shell or scripts.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I prevent accidental data loss from destructive bash commands like rm -rf?

You can prevent accidental data loss by using a PreToolUse hook that scans bash commands for patterns like rm -rf and prompts for confirmation before execution. This guardrail intercepts risky shell operations to provide a manual override or abort opportunity.

Can I add safety guardrails for git reset --hard and kubectl delete in my automation pipeline?

Yes, safety guardrails can protect automation pipelines by detecting git reset --hard and kubectl delete operations through a bash script hook. It warns before executing these destructive commands across development, staging, and production contexts.

What destructive commands does the careful skill guard against in interactive shells?

The careful skill guards against destructive commands including rm -rf, DROP TABLE, git reset --hard, and kubectl delete in interactive shells. It scans for these risky patterns and prompts for confirmation or an override when a risk is detected.

Does this safety hook work with SQL workflows and DROP TABLE statements?

Yes, this safety hook supports SQL workflows by detecting DROP TABLE statements and prompting for confirmation before execution. It is designed to guard destructive commands across Bash, SQL, and Git workflows in local and production-like environments.

How do I override a destructive command warning when I intentionally need to run it?

You can override a destructive command warning by providing an override input when the risk is detected. The hook prompts for confirmation before execution, allowing you to proceed with the intentional operation or abort it.

What is the best way to add warned overrides for destructive shell commands in CI environments?

The best way to add warned overrides in CI environments is implementing a PreToolUse hook backed by a bash script that scans commands for destructive patterns. This approach provides automated guardrails while allowing intentional overrides for maintenance scripts.