/ork-extras:carefulfrom ork-extras
Blocks destructive shell commands (rm -rf, force pushes, git reset --hard, DROP TABLE, kubectl delete, terraform destroy) via a PreToolUse Bash guard. Use before touching production, shared branches, live databases, or clusters.
Ships in ork-extras. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Invoking this skill registers a PreToolUse hook on Bash (the hooks: block above).
Claude Code keeps a skill's hooks registered for the rest of the session, on every
later turn, so careful stays on until the session ends. There is no off switch:
start a new session to work without it.
| Rule | Blocks | Still allowed |
|---|---|---|
rm-rf | rm with recursive and force flags (-rf, -fr, -r -f, --recursive --force), xargs rm -rf, and any target the shell expands: $TMPDIR/x, $TMP, $TEMP, $X, $( ), globs, braces, ~ | the same command when every target is a LITERAL absolute path that lands, after following existing symlinks, strictly inside /tmp, /private/tmp or the configured TMPDIR (trusted only when it is two or more levels deep); write /tmp/build, not $TMPDIR/build, because a command can reassign TMPDIR first (TMPDIR=/ ; rm -rf $TMPDIR/usr); rm -r; rm -f file |
git-push-force | git push --force, -f (also inside -uf), --force-with-lease[=...], a +branch refspec, to any branch | git push, git push -u origin <branch> |
git-push-delete | git push origin --delete <b>, -d <b>, :<b> | git push origin <b>:<b> |
git-reset-hard | git reset --hard | git reset --soft, git reset HEAD <file> |
sql-drop | DROP TABLE, DROP DATABASE, DROP SCHEMA anywhere in the command, heredocs included | a SELECT that mentions drop |
sql-truncate | TRUNCATE TABLE, or a TRUNCATE <name> statement sent to a SQL client | truncate -s 0 file.log |
kubectl-delete | kubectl ... delete | kubectl get, kubectl logs |
terraform-destroy | terraform destroy, terraform apply -destroy, the same with tofu | terraform plan, terraform apply |
Matching is on shell words, not substrings: a commit message or grep pattern that
quotes git push --force is text, not a push. Compound commands are split on
;, &&, | and newlines, and the bodies of bash -c, eval, $( ) and the
remote command of ssh host '...' are checked as well.
The hook exits 2 and Claude sees the reason, for example:
[ork-extras:careful] blocked by rule git-push-force: git push with --force-with-lease.
careful mode is on for this session, so destructive commands do not run unattended.
To proceed, ask the operator: they can run the command themselves, or confirm it and run it outside careful mode.
Then stop and ask. Do not rewrite the command to slip past the matcher (a different flag spelling, a script file, an alias): the operator turned careful on to be asked, and a workaround defeats that even when the matcher misses it.
careful is a pattern matcher on the text of each Bash call. It is a seatbelt, not a sandbox. It does NOT see:
shell aliases and functions (alias nuke='rm -rf', then nuke src);
scripts, Makefiles, npm scripts or binaries that run these commands inside
(./deploy.sh, make clean, npm run reset-db);
eval or bash -c built from variables, base64 or other indirection it cannot
read as text; it only reads literal strings;
interpreters and other shells running the same thing (python -c "shutil.rmtree(...)",
node -e, fish -c, pwsh), or a remote shell other than plain ssh host '...';
a link created in the same command (ln -s / /tmp/r9 && rm -rf /tmp/r9/usr): the
guard follows links that already exist when it runs (a temp path through a link to
/usr is denied), but one made by the command itself is out of reach for a text
check, like python -c "shutil.rmtree(...)";
MCP tools, file edits, and anything outside the Bash tool.
If the hook cannot read its input it blocks (exit 2) rather than guess.
To also fence file edits to one directory, use the freeze skill.
The guard is scripts/careful-guard.mjs (Node, no dependencies); its matcher
cases live in tests/unit/test-careful-guard.mjs.
ork-extras:freeze: fence file edits to one directory; careful covers shell commands, freeze covers the edit tools.ork:security-patterns: defense in depth, the wider picture a text matcher is one layer of.ork:commit: history hygiene and branch protection for the force pushes careful asks about.What SKILL.md sets; muted values are Claude Code's defaults
Bashnode "${CLAUDE_PLUGIN_ROOT}/skills/careful/scripts/careful-guard.mjs"Three short reads, in order
Bash, Git, Kubernetes, Terraform, SQL
npx claudepluginhub yonatangross/orchestkit --plugin ork-extras33 skills in this plugin
/accessibilityWCAG 2.2 accessibility patterns: keyboard focus management, React Aria, cognitive inclusion, native HTML-first. Use when implementing screen reader support, keyboard navigation, ARIA patterns, focus traps, accessible components, or reduced motion./agent-orchestrationAgent orchestration patterns for agentic loops, multi-agent coordination, and alternative frameworks. Use when building autonomous agent loops, coordinating multiple agents, evaluating CrewAI/AutoGen/Swarm, or orchestrating multi-step scenarios./ai-ui-generationAI UI generation with json-render, v0.app, Stitch, Bolt, and Cursor: prompt engineering, review checklists, design system conformance, CI gates. Use when generating UI components with AI tools, reviewing AI-generated code, or rendering MCP visual output./animation-motion-designAnimation patterns with Motion (formerly Framer Motion) and the View Transitions API. Use when implementing component animations, page transitions, micro-interactions, gesture-driven UIs, or prefers-reduced-motion support./async-jobsAsync job processing patterns for background tasks, Celery workflows, task scheduling, retry strategies, and distributed task execution. Use when implementing background job processing, task queues, or scheduled task systems./audit-activationAudits sub-agent activation from telemetry: attempted, started, completed, unattributed spawns, and zero-start agents. Use when agents feel under-used or before pruning the catalog.Other plugins' skills for the same job