careful

Detect destructive Bash command patterns and require confirmation before execution.

Updated Jun 18, 2026
One-click install
npx skills add https://github.com/abhishekmmgn/didactic-invention --skill careful-abhishekmmgn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/abhishekmmgn/didactic-invention/tree/main/.agents/skills/gstack/careful
Command: npx skills add https://github.com/abhishekmmgn/didactic-invention --skill careful-abhishekmmgn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety guardrails for destructive commands in Bash environments, helping prevent accidental data loss and risky operations.

Core Features & Use Cases

  • Detects destructive patterns like rm -rf, git reset --hard, kubectl delete, and warns before execution
  • Enforces a PreToolUse check that returns a permissionDecision and a status message to guide user actions
  • Works across interactive sessions and DevOps workflows to reduce the risk of accidental damage

Quick Start

Enable safety mode to prompt for permission before destructive shell commands.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I add safety guardrails to prevent destructive Bash commands like rm -rf?

You can add safety guardrails by enabling a PreToolUse hook that detects destructive patterns like rm -rf and requires confirmation before execution. This intercepts risky commands in interactive shells to prevent accidental data loss.

What destructive Bash commands does a PreToolUse safety check detect?

A PreToolUse safety check detects destructive Bash patterns including rm -rf, git reset --hard, and kubectl delete. It analyzes shell input, warns before execution, and surfaces a status message to guide user confirmation.

Does careful work with DevOps workflows using kubectl delete and git reset --hard?

Yes, careful works across interactive sessions and DevOps workflows. It detects destructive operations like kubectl delete and git reset --hard, enforcing a permission check to reduce the risk of accidental damage in complex environments.

How do I require confirmation before running risky shell commands in interactive sessions?

You require confirmation by enabling safety mode, which implements a PreToolUse hook running a check script. This hook evaluates shell commands in interactive sessions, returning a permission decision and status message before destructive execution.

Are there limitations to using Bash safety hooks for destructive command detection?

Bash safety hooks apply specifically to interactive shells and DevOps tasks. They function by detecting known destructive patterns to warn before execution, meaning unrecognized risky syntax or non-interactive scripts may not trigger the permission check.

Why should I use a PreToolUse hook instead of manually checking destructive commands?

Using a PreToolUse hook automates destructive command detection across sessions, preventing human error. It systematically checks patterns like rm -rf and git reset --hard, returning a permission decision and warning status without relying on manual vigilance.