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
- AIHawk — Open-source AI browser agent: describe any task in plain language and it autonomously browses, clicks, types a 30.3k ★
- Paca — AI-native, free, open-source alternative to Jira, Trello, ClickUp & Monday 1.8k ★
- My Free Code — Open-source multi-provider AI gateway for Claude Code and other coding agents, with model routing, streaming 633 ★
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
Bleep
Stops AI coding agents (Claude Code, Codex, Copilot) from leaking private/company repository names onto public
Phantom Secrets
Stop AI coding agents from leaking your API keys. Local proxy + MCP that swaps real secrets for phm_ tokens —
Bro
Build your team of AI agents without the pain of prompt chaos, wide-open keys, MCP overload, and a free-for-al
LLM Secret Manager
The secret manager for LLM agents: create, rotate, and use secrets they can never read. OS-native keyvault (ma
Yonga
onga, a Mac AI agent that uses Gemini, ChatGPT and Claude through Chrome without API keys. It can edit files,
Agentacl
Access control and sandboxing for AI coding agents on macOS. Stop Claude Code, Codex, Gemini CLI, Copilot CLI
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
Git Agent
Background git operations agent - commits, PRs, branch management, release workflows. Runs on Sonnet to free m
Tracker Integrator
Creates epics/tasks in the team's issue tracker (currently Jira, via the Atlassian MCP) from an already-approv