Rollcage Guard — AI skill for Claude Code
Free, open-source hook that stops AI coding agents (Claude Code, Codex, Cursor, Gemini CLI) from reading secrets, leaking keys and running destructive commands.
How to install Rollcage Guard
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open nmaties/rollcage-guard and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Rollcage Guard does
Free, open-source hook that stops AI coding agents (Claude Code, Codex, Cursor, Gemini CLI) from reading secrets, leaking keys and running destructive commands.
Alternatives in AI
- Hol Guard — Open-source antivirus for AI agents: block risky tools, secret access, prompt injection, malicious packages, M 485 ★
- Open AI Agents Hub — Open-source, self-hosted platform to build, host, and chat with AI agents — LLM chat bots and image/video gene 23 ★
- Devcules — Open-source, terminal-first dev desk for AI agents 17 ★
README
Rollcage Guard
[](https://github.com/nmaties/rollcage-guard/actions/workflows/ci.yml) [](LICENSE)
A free, open-source hook that stops AI coding agents from **reading your secrets**, **leaking keys in commits** and **running destructive commands**. It works with **Claude Code, Codex CLI, Cursor and Gemini CLI**.
$ rollcage-guard install
Claude Code hook added to ~/.claude/settings.json
Cursor hook added to ~/.cursor/hooks.json
Gemini CLI hook added to ~/.gemini/settings.json
$ rollcage-guard explain "cat .env.local"
block: .env.local
Rollcage blocked access to .env.local: it contains secrets the user hasn't shared with coding agents. …
$ rollcage-guard explain "git push --force origin main"
ask: Force push
Agents run as you. They can read every file you can and run every command you can, and it takes one approved prompt for a `cat .env` to send your keys to a model, or for an `rm -rf` on the wrong path to delete your work. Rollcage Guard checks every tool call before it runs, using each agent's own hook system. It runs locally, needs no account and sends nothing anywhere.
What it stops
| Examples | Default | |
|---|---|---|
| Secret files | .env, .env.local, .envrc, .dev.vars, .npmrc, ~/.ssh, ~/.aws, ~/.kube/config, *.pem, *.key, Rails master.key, *.tfstate, *.tfvars, service-account JSON, wp-config.php… (.env.example and friends are allowed) |
block |
| Environment dumps | env, printenv, export -p, set, echo $OPENAI_API_KEY, ps eww, /proc/*/environ, Keychain password reads |
block |
| Code that reads env vars | python -c 'os.environ', node -e 'process.env', ruby -e, php -r, perl -e, deno eval, awk ENVIRON… |
block |
| Destructive commands | rm -rf ~ / . / *, git clean -f, DROP DATABASE, TRUNCATE, |
Related Skills
Monaa Guard
Stop Claude Code, Cursor & AI agents from burning $20 reading node_modules or leaking .env — 27µs Pure-Rust MC
Bleep
Stops AI coding agents (Claude Code, Codex, Copilot) from leaking private/company repository names onto public
Microbrainsforagents
Sub-2ms CPU safety shield & smart tool router for AI agents (Claude Code, MCP). Stops bugs, destructive shell
Phantom Secrets
Stop AI coding agents from leaking your API keys. Local proxy + MCP that swaps real secrets for phm_ tokens —
Tyslin Studio
Free AI agent dashboard: run AI agencies made of AI agents. A Lead plans the work and delegates to Claude Code
Bro
Build your team of AI agents without the pain of prompt chaos, wide-open keys, MCP overload, and a free-for-al
Related Agents
Secret Guard
MUST be used whenever the user asks to scan for secrets, API keys, credentials, or tokens before a commit or i
i18n Auditor
Use this agent to find untranslated i18n keys, missing locale entries, and raw enum values leaking to the UI.
Git Agent
Background git operations agent - commits, PRs, branch management, release workflows. Runs on Sonnet to free m