ap-run-command

ap-run-command is a skill for Claude Code, Codex from agentproto/ts. It costs 71 tokens per session (755 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

Written for no agent in particular: nothing here depends on one.

Good fit Use it for commands such as a lint check, one test file, git status, or a short build, subject to the workspace command allowlist.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentproto/ts/ap-run-command
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 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/github.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/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 ap-run-command

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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 755 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00071 $0.00755
Opus 5.5 $0.00028 $0.00302
Sonnet 5.5 $0.00014 $0.00151
Haiku 4.5 $0.00007 $0.00076

Measured 7d ago against content hash b477bdbcb779, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 7d 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.

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=@demo/core", "check-types"],
    "cwd": "/path/to/project",
    "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. 7d ago Changed b477bdbcb779
  2. 2mo ago 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 (11 stars, last pushed today), licensed Apache-2.0. It adds 71 tokens to every session and 755 once invoked, about $0.0003 per session on Opus 5.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

ap-run-command compared with skills from other repositories

ap-run-command next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ap-run-commandagentproto/tsSkill11todayApache-2.0A71Claude Code, Codex
markedit-toolssammcj/agentic-codingSkill1744d agoApache-2.0A16Claude Code, Codex
deferred-task-executionsammcj/agentic-codingSkill1744d agoApache-2.0A54Claude Code
herdrsammcj/agentic-codingSkill1744d agoApache-2.0A29Claude Code, Codex
gadgetomnigent-ai/omnigentSkill12ktodayApache-2.0A46Claude Code
glyphyonatangross/orchestkitSkill312yesterdayMITA53Claude Code
disk-cleanupyonatangross/orchestkitSkill312yesterdayMITA61Claude Code