Safe Shell

Block destructive Bash commands before Claude executes them — even in --dangerously-skip-permissions (YOLO) mode where Anthropic's own permission prompts are bypassed. Use this skill when the user runs /claude-papercuts:safe-shell, asks what safe-shell blocks, or wants to know why a command they expected was refused. A PreToolUse hook scans every Bash tool call against a list of irreversible patterns (rm -rf against / or ~, git push --force, git reset --hard HEAD~, mkfs, dd to /dev/sda, curl-pipe-bash, fork bombs) and refuses them with a structured explanation. Block decisions are visible to Claude so it can re-plan.

dhruba-datta Updated
/claude-papercuts:safe-shell refusing rm -rf ~/ before Claude executes it

File contents

dhruba-datta/claude-papercuts commit 579f969a0e

Frequently asked questions

npx get-skill add dhruba-datta/safe-shell