secure-agent
БесплатноБез исполняемых скриптовНе проверенLocks down an AI agent by configuring platform-level tool restrictions (deniedTools) and Earl network egress rules. Use after Earl is working and templates…
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
Secure Agent
After Earl is set up and working, this skill restricts the agent's ability to bypass Earl and make raw API/CLI calls directly. Without this step, CLAUDE.md is just a suggestion.
What This Does
deniedTools: Blocks specific bash commands (curl, gh, stripe-cli, etc.) at the platform level for Claude Code. Agents cannot run these commands at all.- Egress rules: Restricts which URLs Earl templates can contact, preventing Earl itself from being used as an open proxy.
Important Limitation
deniedTools pattern matching can be bypassed via alternative tools (python3 -c "import urllib...", node -e "fetch(...)", etc.). This blocks accidental or habitual CLI use — the
common case. For stronger containment, pair with OS-level firewall rules or a network proxy.
Platform Support
| Platform | Mechanism | Hard restriction? |
|---|---|---|
| Claude Code | deniedTools in .claude/settings.json |
Yes — platform enforced |
| Cursor | .cursor/mcp.json or Cursor settings UI |
Partial — check Cursor docs for per-tool restrictions |
| Windsurf | .windsurf/mcp.json or Windsurf settings UI |
Partial — check Windsurf docs for per-tool restrictions |
| Claude Desktop | No bash access | N/A |
| Non-MCP CLI agents | CLAUDE.md instructions only | No — advisory only |
This skill primarily targets Claude Code. Instructions for other platforms are best-effort.
Step 1: Check Coverage
Only deny tools for services that have Earl templates. Denying a tool for a service with no Earl template would leave the agent unable to interact with that service at all.
earl templates list --json
Note which providers are covered. Map each to the CLI tools to deny:
| Earl template covers | Deny these tools |
|---|---|
github |
Bash(gh *), Bash(hub *) |
stripe |
Bash(stripe *) |
slack |
Bash(slack *) |
openai |
Bash(openai *) |
vercel |
Bash(vercel *) |
| Any HTTP API template | Bash(curl *), Bash(wget *), Bash(http *), Bash(httpie *) |
| Any SQL template | Bash(psql *), Bash(mysql *), Bash(sqlite3 *) |
| Any gRPC template | Bash(grpcurl *) |
Do NOT deny Bash entirely. Earl's bash protocol and legitimate shell operations still
need it.
Note on Bash(curl *) and Bash(wget *): Denying these also blocks all non-API curl
uses — downloading binaries, health probes (curl http://localhost:8080/health), fetching
install scripts, etc. If the agent legitimately needs curl for non-API tasks, add a narrow
allowedTools override for those specific patterns, or use earl call instead for all
HTTP operations.
Note on Bash(gh *): Denying gh also blocks all gh CLI uses that are not API calls:
gh pr create, gh release upload, gh repo clone, branch management, etc. If the agent
needs gh for repository operations that don't have Earl templates, add narrow exceptions or
create templates for those commands before denying Bash(gh *).
Step 2: Generate and Present Denylist
Based on the covered providers, generate the deniedTools array. Show it to the user before
applying anything:
"Based on your Earl templates, I'd add these restrictions to
.claude/settings.json:{ "deniedTools": [ "Bash(curl *)", "Bash(wget *)", "Bash(gh *)", "Bash(stripe *)" ] }This blocks the listed tools for this agent in this project. Other projects are unaffected. Shall I apply this?"
Do not apply until the user explicitly approves.
Step 3: Apply Denylist
For Claude Code: read .claude/settings.json, merge the deniedTools array (do not overwrite
other keys), write it back.
If deniedTools already exists, merge arrays — do not duplicate entries.
Step 4: Verify
For Claude Code: Attempt to run a denied command:
curl https://example.com
Claude Code will refuse to run this command. The "tool denied" or "not allowed" error message from Claude Code is the success signal — it means the denylist is active. You c
Установить secure-agent в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл secure-agent?
Locks down an AI agent by configuring platform-level tool restrictions (deniedTools) and Earl network egress rules. Use after Earl is working and templates are created, to make Earl's security guarantee enforceable rather than advisory.
Как установить скилл secure-agent?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл secure-agent запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic