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.
npx agentmods add skills/agentproto/ts/ap-run-commandnpx skills add agentproto/ts --skill ap-run-commandgit clone --depth 1 https://github.com/agentproto/tsWrote 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.
[](https://agentmods.dev/skills/agentproto/ts/ap-run-command)<a href="https://agentmods.dev/skills/agentproto/ts/ap-run-command"><img src="https://agentmods.dev/badge/skills/agentproto/ts/ap-run-command.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00071 | $0.00770 |
| Opus 5 | $0.00036 | $0.00385 |
| Sonnet 5 | $0.00014 | $0.00154 |
| Haiku 4.5 | $0.00007 | $0.00077 |
Grade A, and why
ap-run-command scanned grade A with 0 findings 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 today.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Run a Command
When to use
Use ap-run-command for SHORT, synchronous, non-interactive shell work — a
lint check, a single test file, a git status, a quick build step. It is not
for long builds/test suites (use a session or a background terminal instead,
see ap-terminal) and not for interactive TUIs.
MCP tool: command_execute
command must be a bare basename allowlisted in
<workspace>/.agentproto/allowed-commands.json. args is an array passed to
the process verbatim — there is NO shell expansion, so no pipes, globs,
&&, or quoting tricks. timeoutMs caps at 600000 (10 minutes). stdin can
feed input; cwd sets the working directory.
{
"tool": "command_execute",
"args": {
"command": "pnpm",
"args": ["--filter=@simone/core", "check-types"],
"cwd": "/Volumes/SSDExternalMacStudio/Code/products/agentik/agentik-studio",
"timeoutMs": 120000
}
}
Every invocation creates a kind: 'command' session you can read back later
like any other session.
MCP tool: command_list
List recent command sessions, newest first.
{ "tool": "command_list", "args": { "limit": 20 } }
MCP tool: command_log_tail
Tail the stdout/stderr of a specific command session, e.g. while it's still running.
{ "tool": "command_log_tail", "args": { "sessionId": "cmd_7f0a", "lines": 200 } }
MCP tool: tool_calls_list
Unified log across both command_execute calls and agent tool calls — audit
what actually ran, in order, across a session or the whole workspace.
{ "tool": "tool_calls_list", "args": { "sessionId": "sess_a1b2" } }
HTTP
None — command_execute and friends are MCP/CLI-only; there is no daemon
HTTP route for one-off command execution.
Gotchas
- Only for SHORT synchronous commands — a 10-minute
command_executecall blocks your turn; long builds/tests belong in a session (ap-spawn-agent) or a background terminal (ap-terminal). - No shell expansion: no pipes, no globs, no
&&, no shell-interpreted quoting. Pre-compute the expansion yourself or wrap the logic in a script file and call that script instead. commandmust match an allowlisted basename exactly — a full path or an unlisted binary is rejected before it runs.- Every command run is itself a readable session — use
command_log_tailorconversation_readinstead of re-running to see output you missed.
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.
- today First seen · 89 lines · 71 tokens per session scan A 22ca2765d559
ap-run-command is a skill published in the GitHub repository agentproto/ts (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 71 tokens to every session and 770 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other skills, from other repositories
markedit-tools
Provides tools for managing MarkEdit, a macOS markdown editor.
differed-task-execution
Delays execution of a task until a specified time or after a duration. Use when the user asks to run something later, in X minutes/hours, at a specific time, schedule a command, or defer work to a future point.
herdr
Control Herdr, a terminal multiplexer for coding agents. Use only when the user explicitly asks to you use or configure Herdr.
strands-review
Local preview of the strands-agents/devtools /strands review agent. Body is the upstream Task Reviewer SOP verbatim — do not paraphrase. Use when the user types /strands-review, asks for a "strands review" of a PR, or wants to anticipate what the remote /strands review GitHub Action will flag. Findings are close but…
pr-writer
Generates pull request titles and descriptions. Use when the user asks to create, open, write, draft, or generate a PR, pull request, or merge request description.
docs-reviewer
Review documentation drafts for voice consistency, structure, and terminology before PR submission. Use after completing a draft, when checking if docs are ready to ship, or automatically after docs-writer produces output. Also triggers on "review this draft", "check my docs", "is this ready to ship", "review before…