ap-run-command

ap-run-command is a skill for Claude Code, Codex from agentproto/ts. It costs 71 tokens per session (770 once invoked), scanned A, original, Apache-2.0.

A tool for running a short, non-interactive shell command synchronously and returning its output and exit code as a trackable session.

In plain words
What is it for?
Use it for commands such as a lint check, one test file, git status, or a short build, subject to the workspace command allowlist.
Why use it?
It provides a controlled way to run quick checks without using an interactive terminal or a long-running background process.

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/agentproto/ts/ap-run-command
Any agent
npx skills add agentproto/ts --skill ap-run-command
Clone the repo
git clone --depth 1 https://github.com/agentproto/ts

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 ap-run-command

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentproto/ts/ap-run-command.svg)](https://agentmods.dev/skills/agentproto/ts/ap-run-command)
Your own site
<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>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 770 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00071 $0.00770
Opus 5 $0.00036 $0.00385
Sonnet 5 $0.00014 $0.00154
Haiku 4.5 $0.00007 $0.00077

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

Security

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.

packages/skill-pack-agentproto/src/skills/ap-run-command/SKILL.md · 89 lines

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_execute call 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.
  • command must 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_tail or conversation_read instead of re-running to see output you missed.

Read the full file on GitHub · 89 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. today First seen · 89 lines · 71 tokens per session scan A 22ca2765d559

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

markedit-tools

Provides tools for managing MarkEdit, a macOS markdown editor.

sammcj/agentic-coding · 16 tokens

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.

sammcj/agentic-coding · 55 tokens

herdr

Control Herdr, a terminal multiplexer for coding agents. Use only when the user explicitly asks to you use or configure Herdr.

sammcj/agentic-coding · 29 tokens

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…

strands-agents/harness-sdk · 125 tokens

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.

strands-agents/harness-sdk · 39 tokens

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…

strands-agents/harness-sdk · 68 tokens