Skip to Content
MeowKit
Skills

mk:careful

Warns before destructive Bash commands such as rm -rf, DROP TABLE and force-push, and blocks the critical ones in production.

Source.claude/skills/careful/SKILL.md
Ownerresearch
Runtimeclaude-code
Riskmedium

mk:careful adds a PreToolUse hook on every Bash call (bin/check-careful.cjs) that checks the command against a catalogue of destructive patterns and asks before it runs. Use it when touching production, debugging a live system or working in a shared environment, or when you say "careful mode" or "prod mode". The hook lasts for the session and ends with the conversation.

When not to use it

To limit file edits to one directory, use mk:freeze.

Usage

/mk:careful

What it does

For each Bash command the hook returns allow (no match or a safe exception), ask (a match, which you can override) or block (a CRITICAL match in a production context). Matching looks at the command string only, so source code that mentions rm -rf in a comment does not trigger it.

SeverityMeaningBehaviour
CRITICALIrreversible, possible data loss or production impactAsk in development. Blocked with no override in production
HIGHReversible but costly to recoverAsk everywhere
MEDIUMDangerous in some contextsAsk everywhere

A context counts as production when NODE_ENV, APP_ENV or ENVIRONMENT contains production, prod or staging. The block message says an override needs a human to unset those variables.

Each override is logged with the command in .meowkit/telemetry/security-log.md.

Pattern categories

CategoryExamples
File systemrm -rf, find -delete, shred, dd, chmod -R
SQLDROP TABLE, DROP DATABASE, TRUNCATE, prisma migrate reset, rails db:drop
NoSQL and cacheredis-cli FLUSHALL, db.dropDatabase()
Gitpush --force, reset --hard, checkout ., clean -fd, filter-branch, rebase -i
Containerskubectl delete, docker rm -f, helm uninstall
Cloudterraform destroy, aws s3 rm --recursive, gcloud ... delete

The full list is references/destructive-patterns.md, kept in step with the hook.

Never warned: deleting build and dependency caches (node_modules, .next, dist, build, .turbo, coverage, __pycache__, .cache, .gradle, target, vendor, Pods, .venv, venv), removing stopped containers, and removing dangling images.

Gotchas

  • During mk:investigate, destructive-command warnings still fire. Each debugging command that touches state needs your confirmation.
  • A shell alias such as alias del='rm -rf' can slip past the match.
  • A multi-line command with backslash continuations may not match a single-line pattern.
  • Run git stash before git reset --hard to keep uncommitted work.

On this page