# global-agent-guardrails

> Claude/Codex skill by [@davidondrej](https://omgskills.com/library/davidondrej/index.md) · 4.2k stars · Updated 2026-10-28

Configure the shared guard against catastrophic shell commands in local AI agents. Use when changing block patterns, adding an agent or machine, or investigating why a command was or wasn't blocked.

## Install

```sh
git clone https://github.com/davidondrej/skills /tmp/skills && ln -s /tmp/skills/skills/ops-and-setup/global-agent-guardrails ~/.claude/skills/global-agent-guardrails
```

## From README

Global Agent Guardrails Block catastrophic shell commands before execution. One patterns file feeds a shared hook script or native adapter for each agent. This guards against accidents, not malicious agents (obfuscation like python -c "shutil.rmtree(...)" can slip past regex). Cloudroom ships a built-in Command Guard based on this one, on by default. File map The consists of a shared pattern list, a guard script, a test suite, and agent-specific adapters. Keep those in the appropriate user-level configuration locations for your tools. Check Confirm the shared guard and patterns are present, then run the test suite; it should report no failures. If missing, rebuild from the wiring documentation in the project documentation. Add or tune a pattern Edit the shared patterns file. Write POSIX ERE (grep -E). Use \[\[:space:\]\], never \\s — adapters may convert \[:space:\] to \\s for JS/Python and compile in multiline mode. Add block and allow cases to the test suite, then run it; all must pass.

## Links

- HTML page: https://omgskills.com/library/davidondrej/skills/global-agent-guardrails/
- GitHub: https://github.com/davidondrej/skills
- Author: [@davidondrej](https://omgskills.com/library/davidondrej/index.md)

## More from this repo

- [anti-sleep](https://omgskills.com/library/davidondrej/skills/anti-sleep/index.md) — Keep a Mac awake for a set duration or while a process runs.
   - [@davidondrej](https://omgskills.com/library/davidondrej/index.md) · 4.2k stars
- [adr-verbatim](https://omgskills.com/library/davidondrej/skills/skills/thinking-and-docs/adr-verbatim/index.md) — Record concise ADRs that preserve the user's decisions without conversational noise.
   - [@davidondrej](https://omgskills.com/library/davidondrej/index.md) · 4.2k stars
- [ask-then-build](https://omgskills.com/library/davidondrej/skills/skills/thinking-and-docs/ask-then-build/index.md) — Clarify a feature, change, or refactor through questions, then write a build prompt for another agent.
   - [@davidondrej](https://omgskills.com/library/davidondrej/index.md) · 4.2k stars
