Skill · Published 2026-08-08

dangerous-command-guard

Download dangerous-command-guard.zip 100% test coverage Ported from rules::dangerous_commands

A Claude Skill: download it, run it locally before executing a command you or your agent generated but aren’t fully sure about.

Three exit codes, not two

python3 check_command.py "<the exact command>"
  • 0 — clean, nothing matched.
  • 1 — a warn-tier pattern (chmod 777, git push --force) — often intentional, worth a second look.
  • 2 — a block-tier pattern (a broad rm -rf /, curl | bash, a raw write to a disk device, a SQL DROP/TRUNCATE) — treat as “don’t run without explicit, informed confirmation.”

Where this came from

Ported from the same pattern pack that runs inside PinkyAI’s own local security engine (rules::dangerous_commands), re-implemented independently in dependency-free Python with its own full test suite — currently at 100% statement coverage.

Honest scope

Every pattern matches the literal, spelled-out command. Like any regex-based check, it doesn’t survive deliberate obfuscation — a known, general limitation of pattern matching, not something this tool claims to solve. A clean result means “none of these seven shapes appeared in this exact command,” not “this command is safe to run.”

Preview the real source

Read straight out of this skill's own source directory, unedited — the exact bytes that ship inside dangerous-command-guard.zip, not a rewritten excerpt. Switch tabs to read a file before downloading, or use Copy to paste it somewhere else.

Choose a file to preview

← Back to skills