careful

Intercept destructive Bash commands and warn before execution.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/akiyoshi/gstack-copilot-jp --skill careful-akiyoshi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: careful
Source: https://github.com/akiyoshi/gstack-copilot-jp/tree/main/.github/skills/careful
Command: npx skills add https://github.com/akiyoshi/gstack-copilot-jp --skill careful-akiyoshi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety guardrails warn before destructive commands to prevent accidental data loss or system disruption.

Core Features & Use Cases

  • Detects destructive command patterns in Bash and prompts for confirmation.
  • Integrates as a PreToolUse hook to intercept commands before execution.
  • Suitable for development, CI, and production-like workflows to prevent risky operations such as rm -rf, git push --force, and database drops.

Quick Start

Enable safety mode and try a potentially destructive command to see the warning prompt.

Frequently Asked Questions about careful

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

FAQPage Schema
How do I prevent accidental execution of destructive Bash commands like rm -rf?

To prevent destructive Bash commands, a PreToolUse hook intercepts high-risk actions such as rm -rf, git push --force, and database drops, prompting for confirmation before execution to safeguard against accidental data loss.

How does a PreToolUse hook intercept shell commands before they run?

A PreToolUse hook intercepts shell commands by running a check script before execution within the shell session. This mechanism enforces safety guardrails by detecting risky patterns and warning the user before proceeding.

Can I use safety guardrails for destructive commands in CI and production-like workflows?

Yes, safety guardrails for destructive commands are suitable for development, CI, and production-like workflows. They intercept high-risk Bash actions like database drops and git push --force to prevent system disruption across environments.

What's the best way to add warnings before running git push --force in a shell session?

The best way to add warnings before running git push --force is implementing a PreToolUse Bash hook. It detects destructive command patterns and prompts for confirmation, preventing accidental data loss or system disruption.

When do I need a safety mode for destructive shell commands?

You need safety mode for destructive shell commands when executing high-risk actions like rm -rf, git push --force, or database drops. It provides warnings and confirmation prompts to prevent accidental data loss during development or CI workflows.