Global Agent Guardrails
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
npx skills add davidondrej/skills --skill global-agent-guardrailsgit clone --depth 1 https://github.com/davidondrej/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/global-agent-guardrails ~/.claude/skills/global-agent-guardrailsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Global Agent Guardrails
Block catastrophic shell commands before a coding agent runs them. One patterns file feeds a shared hook script, or a small native adapter, for each agent. This guards against accidents, not malicious agents: obfuscation like `python -c "shutil.rmtree(...)"` slips past any regex.
This is a generic recipe built on each tool's public hook system. [Cloudroom](https://www.cloudroom.dev/security) ships a built-in Command Guard based on this design, on by default.
## File map
```
~/.agents/hooks/dangerous-patterns.txt # THE denylist: one POSIX-ERE regex per line, # comments
~/.agents/hooks/deny-dangerous.sh # shared guard: hook JSON on stdin -> exit 2 blocks
~/.agents/hooks/test-guard.sh # test suite: run after ANY pattern change
~/.config/opencode/plugins/command-guard.ts # OpenCode adapter (throws to block)
~/.pi/agent/extensions/command-guard.ts # Pi adapter (returns {block:true})
~/.hermes/plugins/command-guard/ # Hermes plugin (returns {"action":"block"})
```
## Check installation
```bash
ls ~/.agents/hooks/deny-dangerous.sh ~/.agents/hooks/dangerous-patterns.txt
~/.agents/hooks/test-guard.sh # must end "failed: 0"
```
If missing, rebuild from the script below and the wiring table.
## Guard script
`deny-dangerous.sh` reads the hook JSON on stdin, pulls out the command, and tests it against every pattern. Its core:Details
- Skill name
global-agent-guardrails- Repository
- davidondrej/skills
- Path
skills/global-agent-guardrails/SKILL.md- License
- MIT
- Repo updated
- 17 November 2026
FAQ
What does the Global Agent Guardrails skill do?
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.
How do I install the Global Agent Guardrails skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add davidondrej/skills --skill global-agent-guardrails. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Global Agent Guardrails popular?
It lives in davidondrej/skills, which has 4,336 GitHub stars and 628 forks.
Related skills
Browser Harness
4.3kdavidondrej/skills
Direct browser control via CDP. Use when the user wants to automate, scrape, test, or interact with web pages. Connects to the user's already-running Chrome.
4x4
4.3kdavidondrej/skills
Pull 16 fast decisions out of the user with 4 sets of 4 open questions, then present an implementation plan. Only for risky changes, large product decisions, or large refactors. Run when the user types /4x4. Agents may suggest it in one line but never start it on their own.
Adr Verbatim
4.3kdavidondrej/skills
Record concise ADRs that preserve the user's decisions without conversational noise. Use for "adr-verbatim", "new ADR", "document that as an ADR", "record this decision", or supplied ADR wording.
Goal Loop
4.3kdavidondrej/skills
Draft /goal prompts and explain persistent agent loops. Use for goal or Ralph loops, autonomous run setup, monitoring, and troubleshooting.
Gemini Review
4.3kdavidondrej/skills
Launch an independent Gemini 4 Carbon code review through Cursor at High reasoning and return it verbatim. Use for /gemini-review, or when the user or another agent asks for a Gemini review.
Gpt Review
4.3kdavidondrej/skills
Launch an independent GPT-6.2-Astra code review and return it verbatim. Use for /gpt-review, or when the user or another agent asks for a GPT review.
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.