careful

Warn before destructive Bash commands via a PreToolUse hook.

Updated Oct 25, 2025
One-click install
npx skills add https://github.com/shaythegay13/serenity-pocket-app-final --skill careful-shaythegay13
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/shaythegay13/serenity-pocket-app-final/tree/main/.claude/skills/gstack/careful
Command: npx skills add https://github.com/shaythegay13/serenity-pocket-app-final --skill careful-shaythegay13

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety risk of destructive commands in shell environments leads to accidental data loss. This skill provides guardrails and warnings before executing commands like rm -rf, DROP TABLE, force-push, git reset --hard, kubectl delete, and similar destructive operations, with optional override.

Core Features & Use Cases

  • Pre-tool-use check for destructive commands in Bash
  • Safe exceptions for common rebuild tasks and non-destructive targets
  • Command logging and analytics to track risky actions
  • Works across development, staging, and production environments

Quick Start

Enable the PreToolUse Bash hook and start issuing commands as usual, with warnings if a destructive pattern is detected.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I add warnings before running destructive bash commands in development and production?

To add warnings before destructive bash commands, this tool implements a PreToolUse hook that detects risky patterns like rm -rf and git reset --hard, returning a permission prompt to prevent accidental data loss across environments.

Does this safety hook work with kubectl delete and docker system prune operations?

Yes, this safety hook works with kubectl delete and docker system prune. It detects these specific destructive shell commands and prompts for confirmation before execution, guarding against accidental infrastructure or data removal.

How can I protect my staging environment from accidental git reset --hard and force-push actions?

You can protect staging environments by enabling the PreToolUse Bash hook, which screens for destructive git operations like force-push and git reset --hard, prompting for user confirmation before allowing execution.

Can I safely run common rebuild tasks without triggering destructive command warnings?

Yes, you can safely run common rebuild tasks without triggering warnings. The hook includes safe exceptions for non-destructive targets, ensuring standard development workflows proceed uninterrupted while still screening for risky actions.

What is the best way to track risky shell actions and prevent accidental data loss in bash workflows?

The best way to track risky shell actions is using this hook, which logs destructive command events and analytics. It intercepts dangerous bash patterns and prompts for permission, actively preventing accidental data loss.

Will the destructive command guard block my workflow entirely when a risky pattern is detected?

No, the destructive command guard will not block your workflow entirely. It returns a permissionDecision of ask, allowing you to manually override the warning and proceed with the command if the action is intentional.