secure-agent

secure-agent is a skill for Claude Code, Codex from mathematic-inc/earl. It costs 48 tokens per session (1,851 once invoked), scanned A, original, Apache-2.0.

A security setup for an AI agent that limits which commands it can run and which web addresses its templates can contact.

In plain words
What is it for?
Use it after setting up Earl to block selected commands such as curl, gh, or stripe-cli and to restrict network access. It supports Claude Code, Cursor, and Windsurf with different levels of enforcement.
Why use it?
It makes the agent's security rules enforceable at the platform level instead of relying only on instructions in a configuration file. It also helps prevent the agent from reaching unauthorized services, although command restrictions can have workarounds.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Good fit Use it after setting up Earl to block selected commands such as curl, gh, or stripe-cli and to restrict network access. It supports Claude Code, Cursor, and Windsurf with different levels of enforcement.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mathematic-inc/earl/secure-agent
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mathematic-inc/earl --skill secure-agent
Clone the repo
git clone --depth 1 https://github.com/mathematic-inc/earl

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for secure-agent

README.md
[![agentmods](https://agentmods.dev/badge/skills/mathematic-inc/earl/secure-agent/github.svg)](https://agentmods.dev/skills/mathematic-inc/earl/secure-agent)
Your own site
<a href="https://agentmods.dev/skills/mathematic-inc/earl/secure-agent"><img src="https://agentmods.dev/badge/skills/mathematic-inc/earl/secure-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for secure-agent

Your own site · 80×15
<a href="https://agentmods.dev/skills/mathematic-inc/earl/secure-agent"><img src="https://agentmods.dev/badge/skills/mathematic-inc/earl/secure-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,851 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 72
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01851
Opus 5.5 $0.00019 $0.00740
Sonnet 5.5 $0.00010 $0.00370
Haiku 4.5 $0.00005 $0.00185

Measured 3mo ago against content hash ee9871116fb0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

secure-agent scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

1. **`deniedTools`**: Blocks specific bash commands (curl, gh, stripe-cli, etc.) at the
skills/development/secure-agent/SKILL.md · 196 lines

How it starts

The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on 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

  1. deniedTools: Blocks specific bash commands (curl, gh, stripe-cli, etc.) at the platform level for Claude Code. Agents cannot run these commands at all.
  2. 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.

Read the full file on GitHub · 196 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 196 lines · 48 tokens per session scan A ee9871116fb0

Subscribe to this mod's changes

secure-agent is a skill published in the GitHub repository mathematic-inc/earl (114 stars, last pushed 26d ago), licensed Apache-2.0. It adds 48 tokens to every session and 1,851 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

secure-agent compared with skills from other repositories

secure-agent next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
secure-agentmathematic-inc/earlSkill11426d agoApache-2.0A48Claude Code, Codex
api-design-patternsbobmatnyc/claude-mpmSkill1603mo agononeA29Claude Code
api-designasgarovf/locusaiSkill238mo agoMITA37Claude Code
goericrisco/rsc-harnessSkill6825d agoMITA86Claude Code, Codex
api-designericrisco/rsc-harnessSkill6825d agoMITA105Claude Code, Codex
mcp2cliknowsuchagency/mcp2cliSkill2.4k21d agoMITB126Claude Code
api-design-patternsaAAaqwq/AGI-Super-TeamSkill1214d agoMITA29Claude Code