gstack-careful

Detect destructive Bash commands and request confirmation before execution.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Prevents accidental destructive operations that can wipe data, rewrite history, or impact production systems by warning before risky Bash commands run.

Core Features & Use Cases

  • Safety guardrails for destructive Bash commands: Detects high-risk patterns like recursive deletes, SQL drops/truncates, force-pushes, hard resets, kubectl deletes, and Docker prune/removal.
  • Safe exceptions to reduce friction: Allows common build/artifact deletions (like node_modules, dist, .cache) without warning.
  • User override behavior: When a destructive pattern is detected, it returns an “ask” decision so you can confirm or cancel.

Quick Start

Tell the assistant to activate safety mode with a prompt like: “Be careful—run the safe commands only while I debug production changes.”

Frequently Asked Questions about gstack-careful

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

FAQPage Schema
How do I prevent destructive bash commands from running accidentally?

Preventing destructive bash commands involves scanning tool input JSON before execution to match high-risk patterns like recursive deletes, SQL drops, and force-pushes, returning an ask decision with a warning. The Skill intercepts these operations and prompts you to confirm or cancel before any damage occurs.

What destructive command patterns should safety mode guardrails catch?

Safety mode guardrails should catch recursive deletes, SQL drops and truncates, git force-pushes, hard resets, kubectl deletes, and Docker prune or removal operations. The Skill detects these high-risk patterns in Bash commands and warns you before they execute on your system.

How do I activate safety mode to protect a live production environment?

To activate safety mode, tell the assistant to be careful and run safe commands only while you work. The Skill then parses your Bash commands against destructive patterns, allowing you to troubleshoot production changes without risking accidental data loss or system impact.

Can I safely delete build artifacts without triggering destructive command warnings?

You can safely delete common build artifacts like node_modules, dist, and .cache directories without triggering warnings. The Skill includes explicit safe exceptions for these frequent build and artifact deletions to reduce friction during development.

How does a PreToolUse hook detect high-risk git and kubectl operations?

A PreToolUse hook detects high-risk operations by parsing the Bash command from tool input JSON and matching it against destructive patterns with explicit safe exceptions. When a match is found, it returns a permission decision of ask with a warning message before execution.

When should I not rely on destructive command protection for shared environments?

You should not rely solely on destructive command protection when working in shared environments where others can execute commands outside your session. The Skill only intercepts Bash commands routed through its PreToolUse hook, so direct terminal access bypasses the guardrails entirely.