Safe Command Guardrails for Coding Agents
Block, confirm, or allow every shell, git, SQL, and cloud command before your agent runs it, and catch credential leaks on the way.
Free
Works with the AI Agents you already use
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.
| Command | Tier | Why |
|---|---|---|
rm -rf dist build | CONFIRM | Recursive delete. Scoped to two build folders. |
git add src/ tests/ README.md | ALLOW | Files staged by name, not git add -A. |
git add .env | SECRET | Would commit a credentials file to history. Refused. |
git push origin main | CONFIRM | Visible outside this machine. |
rm -rf ~ (suggested "free up disk space") | BLOCK | Deletes your home directory. Never run. |
What I'll do after you approve
- Delete
dist/andbuild/. - Commit the staged files with the message "Fix config loading".
- 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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
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.