Skip to content

Verify destructive command blocking and sandboxing in Bash-enabled agent skills

Check whether CLI-driven skills block force-pushes, recursive deletes, prod profile mutations, and subshell bypasses cleanly.

Copy the prompt and paste it into the AI assistant you already use.

String-based command blocklists are bypassable; combine PreToolUse guardrails with OS/container sandboxing for untrusted inputs.

Why regex command filters fail—and what strong shell skills do instead

  1. 01

    Pair OS sandboxing with tool-level hooks

    Blocklists watching for 'rm -rf' miss 'find . -delete' or 'python -c os.unlink'; Seatbelt or container mounts enforce real boundaries.

  2. 02

    Check dry-run flags before state-mutating CLIs

    Well-authored DevOps skills run terraform plan, rsync --dry-run, or git diff --stat and pause before applying changes.

  3. 03

    Verify git branch and remote protections

    Ensure coding skills forbid git reset --hard, git clean -fd, and pushing directly to main/master without explicit confirmation.

  4. 04

    Audit interactive TTY hang prevention

    Skills running CLI tools without --non-interactive or CI=true flags stall agent harnesses waiting for invisible prompts.

Questions and answers

Can a PreToolUse hook alone guarantee shell safety?

Hooks are great safety rails against accidental mistakes like force-pushing main, but adversarial containment requires OS sandboxes (Seatbelt/Bubblewrap/Docker).

Why do shell skills hang indefinitely on certain commands?

Commands like git rebase -i, npx create-*, or watch open interactive pagers or prompts; ranked CLI skills pass PAGER=cat and non-interactive flags.

Do skill ratings penalize skills asking for --dangerously-skip-permissions?

Yes. Any skill recommending blanket permission bypasses outside ephemeral throwaway containers receives an automatic security warning.