Command Guard
Use when an agent's shell tool needs a guard: block catastrophic commands before they run.
Install
npx skills add SamueleBassoli/hermes-fleet-apps --skill command-guardgit clone --depth 1 https://github.com/SamueleBassoli/hermes-fleet-apps.git /tmp/hermes-fleet-apps
mkdir -p ~/.claude/skills
cp -r /tmp/hermes-fleet-apps/roles/coder/skills/command-guard ~/.claude/skills/command-guardPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Command Guard
A denylist that stops an agent's shell tool from running catastrophic commands.
One plain-text pattern file, one small Python adapter, one regression suite.
It guards against **accidents**, not a hostile agent. A regex cannot see through
`python -c "shutil.rmtree('/')"`. Treat it as a seatbelt, not a cage.
## File map
```
~/.agents/hooks/dangerous-patterns.txt THE denylist - one regex per line
~/.agents/hooks/deny_dangerous.py adapter - hook JSON in, exit 2 blocks
~/.agents/hooks/test_guard.py regression suite - run after EVERY edit
```
The folder is a suggestion; any user-level folder works if every agent's config
points at the same files. Pure stdlib Python. No `jq`, no bash, no deps — chosen
because git-bash on Windows has no `jq`, and a bash guard that needs it does not
work there.
## Build it if it is missing
This skill ships the method, not the files. If the three files are not there:
1. **Pattern file.** One Python regex per line, `#` for comments. Start from the
groups in "What it covers" below.
2. **Adapter, about 50 lines.** Read the hook JSON from stdin, take the command
(`tool_input.command` for Claude Code, `.command` for Cursor-shaped payloads),
match it against every line with `re.MULTILINE | re.IGNORECASE`. On a match,
print the reason to stderr and exit 2. On any error (no file, bad JSON, bad
regex line), exit 0: see "Fails open" below.Details
- Skill name
command-guard- Repository
- SamueleBassoli/hermes-fleet-apps
- Path
roles/coder/skills/command-guard/SKILL.md- License
- MIT
- Repo updated
- 31 October 2026
FAQ
What does the Command Guard skill do?
Use when an agent's shell tool needs a guard: block catastrophic commands before they run.
How do I install the Command Guard skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add SamueleBassoli/hermes-fleet-apps --skill command-guard. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Command Guard popular?
It lives in SamueleBassoli/hermes-fleet-apps, which has 44 GitHub stars and 0 forks.
Related skills
Agent Facing CLI
44SamueleBassoli/hermes-fleet-apps
Use when an agent will drive a CLI. Contract test first.
Agent Fleet Design
44SamueleBassoli/hermes-fleet-apps
Use when adding, backing up, or driving the agent fleet.
Agent Identity Setup
44SamueleBassoli/hermes-fleet-apps
Use when setting up or resetting agent SOUL, memory, skills.
Dependency Vetting
44SamueleBassoli/hermes-fleet-apps
Use when the owner brings a model or library to adopt. Vet it.
AI SDK 6 Skills
23gocallum/nextjs16-agent-skills
AI SDK 6 Beta overview, agents, tool approval, Groq (Llama), and Vercel AI Gateway. Key breaking changes from v5 and new patterns.
Fleet Agent Inspection
44SamueleBassoli/hermes-fleet-apps
Use when checking, briefing, or retiring another fleet agent.
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.