careful

Warn before executing destructive Bash commands via a PreToolUse hook.

107|19|Updated Mar 23, 2026
One-click install
npx skills add https://github.com/mr-daedalium/ostack --skill careful-mr-daedalium
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/mr-daedalium/ostack/tree/main/careful
Command: npx skills add https://github.com/mr-daedalium/ostack --skill careful-mr-daedalium

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety guardrails for destructive commands. Warns before rm -rf, DROP TABLE, force-push, git reset --hard, kubectl delete, and similar destructive operations. User can override each warning. Use when touching prod, debugging live systems, or working in a shared environment. Use when asked to "be careful", "safety mode", "prod mode", or "careful mode".

Core Features & Use Cases

  • Warnings before destructive commands (rm -rf, DROP TABLE/DATABASE, TRUNCATE, git push --force, git reset --hard, kubectl delete, docker prune) to prevent data loss or service disruption.
  • Safe exceptions allow certain patterns (e.g., rm -rf node_modules, build directories) to proceed without warning.
  • Per-command override lets users continue after a warning, and the hook runs automatically as a PreToolUse step.

Quick Start

Enable careful mode before running risky commands to receive warnings and the option to override.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I add a warning prompt before running destructive bash commands like rm -rf?

To add a warning prompt before destructive bash commands like rm -rf, enable careful mode to implement a PreToolUse hook that pattern-matches risky commands and requests per-command override approval.

What destructive operations are blocked by safety guardrails in shared environments?

Safety guardrails in shared environments block destructive operations including rm -rf, DROP TABLE, TRUNCATE, git push --force, git reset --hard, kubectl delete, and docker prune by warning before execution.

Can I safely exclude certain directories from destructive command warnings?

You can safely exclude directories from destructive command warnings using safe exceptions, allowing specific patterns like rm -rf node_modules or build directories to proceed without triggering a prompt.

How do I override a warning to continue executing a command in production mode?

To override a warning and continue executing a command in production mode, use the per-command override feature which lets you bypass the guardrail after the PreToolUse hook successfully triggers its alert.

Does the careful hook work with git force-push and kubectl delete operations?

The careful hook works with git push --force and kubectl delete operations by using pattern matching to detect these specific commands during the PreToolUse step and warning before execution proceeds.

When should I enable safety mode for bash commands?

You should enable safety mode for bash commands when touching production, debugging live systems, working in shared staging environments, or when explicitly asked to enter careful mode to prevent accidental data loss.