Safe Command Guardrails for Coding Agents

    1

    Block, confirm, or allow every shell, git, SQL, and cloud command before your agent runs it, and catch credential leaks on the way.

    Free

    1 useSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Safe Command Guardrails for Coding Agents

    Example session with this skill installed

    Clean out the build folders, commit everything including the .env I just fixed, and push to main. Then free up disk space however you need to.

    • Read your context and instructions
    • Compiled the safe command guardrails

    Summary

    Four of the actions you asked for are fine to plan, but they fall into different safety tiers. Two need your yes, one I won't do, and one I can't do without leaking a credential.

    CommandTierWhy
    rm -rf dist buildCONFIRMRecursive delete. Scoped to two build folders.
    git add src/ tests/ README.mdALLOWFiles staged by name, not git add -A.
    git add .envSECRETWould commit a credentials file to history. Refused.
    git push origin mainCONFIRMVisible outside this machine.
    rm -rf ~ (suggested "free up disk space")BLOCKDeletes your home directory. Never run.

    What I'll do after you approve

    1. Delete dist/ and build/.
    2. Commit the staged files with the message "Fix config loading".
    3. Push to origin main.

    I left .env out of the commit. If it isn't already in .gitignore, I can add it.

    For disk space, I can list the largest folders with du -sh * | sort -h so you can choose what to remove.

    Reply "yes" to run steps 1 to 3, or tell me which ones to skip.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Coding agents run commands constantly, and most of the time that is fine. The problem is the one command in a thousand that force-pushes over a teammate's work, truncates a table, or echoes an API key into a shared transcript. This skill gives your agent a clear, four-tier rule for deciding what to run.

    BLOCK covers damage no project can justify: deleting root or home, formatting disks, fork bombs. SECRET covers anything that would print, stage, or upload a credential. CONFIRM covers recursive deletes, pushes, history rewrites, destructive SQL, infrastructure teardown, and package publishing. Everything else is ALLOW. The agent refuses the first two, asks before the third, and runs the fourth.

    The SKILL.md is advisory. It teaches the agent how to decide and when autonomous mode does and does not count as consent. For a hard stop that does not depend on the model's judgment, the package includes a standard-library Python script that applies the same tiers mechanically and returns a distinct exit code per tier. A reference page shows how to wire it as a Claude Code PreToolUse hook in a few lines of settings.json, and how other agents can call it from their own pre-exec hooks. If the script ever breaks, it fails open with a warning, so it never silently locks you out.

    Every pattern lives in a readable reference file so you can tune the lists for your project. The script ships with a self-test you can run after any change. Patterns are conservative on purpose: a grep for a dangerous string is allowed, while the same string inside bash -c is blocked.

    Built by Korey Dillon (LatentAxis). Source: https://github.com/koreydillon/cipher-harness

    The SKILL.md is advisory: the agent follows it by judgment. For a hard stop, wire the included script as a pre-execution hook (Claude Code PreToolUse is documented). Patterns are regex based and conservative, so an obfuscated command (base64 piped to sh, a script file that deletes things) can get through. Treat it as a strong floor, not a sandbox.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Permissions

    Terminal / Shell

    The skill guides an agent that already runs shell commands. The optional check_command.py script only reads the command string from stdin or an argument and prints a decision. It makes no network calls, reads no files, and writes nothing.

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    It gives the agent a four-tier rule for every shell, git, SQL, and cloud command. BLOCK commands (like deleting root or formatting a disk) are refused. SECRET commands (printing, staging, or uploading a credential) are refused. CONFIRM commands (recursive deletes, pushes, history rewrites, destructive SQL, infrastructure teardown) wait for your yes. Everything else runs normally.

    Any agent that reads SKILL.md files, including Claude Code, Cursor, GitHub Copilot, Codex CLI, and Gemini CLI. The optional enforcement script works with any agent that can run a command before executing one. Wiring it as a Claude Code PreToolUse hook is documented step by step.

    SKILL.md with the decision procedure, scripts/check_command.py (Python 3.8+, standard library only, with --json, --hook, and --self-test modes), references/patterns.md with every regex by tier, and references/claude-code-hook.md with the settings.json snippet, failure behavior, and interpreter notes.

    The SKILL.md tells the agent to look for production signals before its first mutating command, such as production environment variables, hosted database hosts, or a kube context containing prod. If one appears, it confirms the target with you first. That check is part of the agent instructions; the script itself classifies commands only.

    It fails open with a one-line warning. Malformed input, empty input, or an internal error lets the command fall through to your normal permission flow instead of blocking every Bash call. If python3 is missing from PATH, Claude Code shows a non-blocking notice. The reference file covers all five cases.

    Patterns are regex based, so deliberately obfuscated commands (encoded payloads piped to a shell, or a script file that does the damage) can get past the script. The SKILL.md asks the agent to read scripts before running them, but treat this as a strong floor, not a sandbox.

    New in Security