Need a customized project? We build it to your exact requirements.Contact us on WhatsApp

Block Destructive Commands

Mod security 31 lines

Denies Bash commands that match destructive patterns (recursive rm on roots, force push, hard reset, destructive SQL, disk formatting) before they run. A tool.call hook with a Bash matcher that returns { deny } without calling next.

block-destructive-commands.mdPreview
# block-destructive-commands

Denies Bash commands that match destructive patterns before they run.
A `tool.call` hook under a `{ tool: "Bash" }` matcher: on a match it returns
`{ deny }` without calling `next`, so nothing beneath (other plugins,
PreToolUse shell hooks, the tool itself) runs; otherwise it passes through.

**If …

You are seeing the first 50 words. Purchase the Claude Skills Pack to see the full mod and download it.

Buy the pack · $19.98

More in security

Human GateMod · securityHolds irreversible tool calls (deploy, publish, push to main, money, outbound messages, destructive SQL) for a person, so auto mode and allow rules cannot approve them, and lets read-only calls through without a prompt.Jev Auto ModeMod · securityA permission layer driven by a JSON policy: allow, ask or deny every tool call (Bash, edits, web, MCP, subagents, skills), every slash command or skill you type, and every skill preloaded into a subagent. Rules decide first (deny ask allow, compound Bash commands split); what no rule covers can…Jev GuardrailsMod · securityScreens every prompt going into the conversation and every reply coming out of it with TypeSafe's Jev, a System One decision model, the way TypeSafe's guardrails cookbook does: one request per message asks a battery of hazard questions (jailbreak, harm or a crime, a diagnosis or a dosage,…Jev Vercel SandboxMod · securityA Vercel Sandbox Claude sends work to on purpose: long test runs in the background, someone else's repository, an installer of unknown origin, a bulk change to preview as a patch, a clean build. TypeSafe's Jev reads each Bash command and spots those jobs; by default you are asked whether it runs…Large Edit ConfirmationMod · securityAsks the user, in the engine's AskUserQuestion dialog ($.ui.ask), before Claude edits or overwrites a file larger than a configurable line count; denies by default when nobody can answer (headless runs). A tool.call hook on Edit and Write using $.fs.read.Protected Paths GuardMod · securityDenies Edit, Write and NotebookEdit calls on sensitive paths (.env files, lockfiles, CI workflows, git internals, private keys) with a glob allowlist override. A tool.call hook with an array matcher.