Skip to content
Back to skills

Careful

BSecurity

Warns before rm -rf, DROP TABLE, force-push. NOT for mk:freeze.

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 29, 2026
ai-agentsgoshellbashnoderailsgitdocumentation

Security analysis

B85/100
  • highPerforms destructive filesystem operations

Pro scans all 3 files and shows the line behind each finding

Scanned November 24, 2026

npx -y skills add ngocsangyem/MeowKit --skill careful --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Careful?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Careful
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/ngocsangyem-careful/badge)](https://www.skillsdirectory.com/skills/ngocsangyem-careful)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mk:careful
version: 0.1.0
description: "Warns before rm -rf, DROP TABLE, force-push. NOT for mk:freeze."
allowed-tools:
  - Bash
  - Read
hooks:
  PreToolUse:
    - matcher: Bash
      hooks:
        - type: command
          command: node
          args: ["${CLAUDE_PROJECT_DIR}/.claude/skills/careful/bin/check-careful.cjs"]
          statusMessage: Checking for destructive commands...
source: gstack
keywords:
  - careful
  - safety-mode
  - destructive-commands
  - prod-mode
  - guardrails
when_to_use: "Working on prod."
user-invocable: true
owner: research
criticality: medium
status: active
runtime: claude-code
---

# /careful — Destructive Command Guardrails

Goal: ask before a destructive shell command runs (`rm -rf`, `DROP TABLE`, force-push, `reset --hard`, `kubectl delete`), for the rest of the session. To confine edits to one directory instead, use `mk:freeze`; the two stack.

## What's protected

See [references/destructive-patterns.md](references/destructive-patterns.md) for the full pattern list and its known gaps.

## How it works

This skill registers a `PreToolUse` hook on Bash (`bin/check-careful.cjs`). The hook is active from the moment the skill is invoked and ends with the session. It reads the command from the tool input, matches it against the pattern table, and when one matches it asks you to confirm before the command runs. You can approve a single command; each match asks again.

In a production-like environment the answer is stricter. When `NODE_ENV`, `APP_ENV` or `ENVIRONMENT` names production, prod or staging, a CRITICAL command is refused outright with no prompt to override; only a person changing that environment variable lifts it. HIGH patterns still ask. Recursive deletes of build outputs and dependency trees (`node_modules`, `dist`, `.next` and similar) pass without a prompt.

Each match is appended to a log of override requests; it records the request, not your decision.

## Hooks

- **Bash command guard**: asks before destructive commands; refuses CRITICAL ones in a production-like environment. It checks Bash only: Edit and Write are not covered (see `mk:freeze`).
- Session-scoped: it exists only because `mk:careful` was invoked.

## Gotchas

- **False positives on legitimate operations**: Pattern matching `rm` or `drop` in file content, not commands → Check command context, not just string presence
- **Overly broad regex blocking development**: Guard triggers on test fixtures or documentation mentioning destructive commands → Scope guards to actual Bash tool invocations only

Files in this skill

  • SKILL.md2.8 KB
  • bin/check-careful.sh10.3 KB
  • references/destructive-patterns.md11.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.