exec

A restricted HTTP interface for running approved commands on a machine. Each request supplies a command and its arguments, and the server returns the result.

In plain words
What is it for?
Use it to run permitted command-line tools, receive their output and exit status, and choose buffered or streaming results.
Why use it?
It lets an agent run machine tasks without allowing arbitrary commands. An allow list and deny list control what can execute.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/to-agent/agent-exec/exec
Any agent
npx skills add to-agent/agent-exec --skill exec
Clone the repo
git clone --depth 1 https://github.com/to-agent/agent-exec

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 612 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00000 $0.00612
Opus 5 $0.00000 $0.00306
Sonnet 5 $0.00000 $0.00122
Haiku 4.5 $0.00000 $0.00061

Measured yesterday against content hash 6f0f54b49d92, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

exec 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 yesterday.

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.

curl -X POST http://<host>/api/exec \
content/api/exec/SKILL.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SKILL: exec

Endpoint: POST /api/exec

Description: Execute a command on this machine

Overview

Execute a command via POST /api/exec. The command must be in the exec.allow list and must not match exec.deny.

Request

curl -X POST http://<host>/api/exec \
  -H "X-API-Key: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"args": ["aexec", "--version"]}'

Body

Field Type Description
args array Command and arguments: ["cmd", "arg1", "arg2"]required
memo string Optional opaque memo text echoed back by agent-exec; not interpreted or stored

Body fields other than the listed fields are rejected. cmd, command, env, cwd, and shell return HTTP 400.

Query Parameters

Parameter Values Default Description
format json, text json Response format
mode buffered, stream buffered Execution mode. stream is direct-command only and is rejected for plugin commands.

Response

buffered + format=json

{"output": "agent-exec v0.2.0\n", "length": 18, "exitCode": 0, "status": "done", "duration": 3}

stream + format=json

Use streaming only for direct commands. If the command is handled by a plugin, use buffered mode or a plugin-specific /api/command/:name/* route.

NDJSON — one JSON object per line:

{"output":"line1\n","length":6,"status":"running"}
{"output":null,"exitCode":0,"status":"done","duration":42}

ACL

Commands are checked against server-side ACL rules before execution. exec.deny is evaluated before exec.allow. Plain string patterns are exact matches only. Glob patterns may use *, and regexp patterns use /.../ when the host intentionally wants broader matching. A rule like cmd * allows any arguments to cmd; treat broad glob rules as host policy, not agent permission to assume safety.

agent-exec executes args as argv. It does not run commands through a shell, and command/args are not accepted from the query string. Shell metacharacters such as &&, ;, and | are not interpreted by agent-exec itself.

Read the full file on GitHub · 67 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. yesterday First seen · 67 lines · 0 tokens per session scan A 6f0f54b49d92

Subscribe to this mod's changes

exec is a skill published in the GitHub repository to-agent/agent-exec (1 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 612 tokens. 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-31.

Related

Other skills, from other repositories