ap-terminal

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

A real interactive terminal session with a PTY, the kind of terminal interface expected by programs that redraw the screen or read individual keystrokes.

In plain words
What is it for?
Use it to drive tools such as Vim, htop, interactive command-line wizards, or another agent running inside a terminal.
Why use it?
Ordinary command execution cannot reliably handle interactive programs, terminal resizing, cursor controls, or step-by-step prompts.

Skill for Claude CodeCodex

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

Good fit Use it to drive tools such as Vim, htop, interactive command-line wizards, or another agent running inside a terminal.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentproto/ts/ap-terminal/github.svg)](https://agentmods.dev/skills/agentproto/ts/ap-terminal)
Your own site
<a href="https://agentmods.dev/skills/agentproto/ts/ap-terminal"><img src="https://agentmods.dev/badge/skills/agentproto/ts/ap-terminal/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-terminal

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentproto/ts/ap-terminal"><img src="https://agentmods.dev/badge/skills/agentproto/ts/ap-terminal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 993 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.00083 $0.00993
Opus 5.5 $0.00033 $0.00397
Sonnet 5.5 $0.00017 $0.00199
Haiku 4.5 $0.00008 $0.00099

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

Security

Grade A, and why

ap-terminal 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 12d 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-terminal/SKILL.md · 110 lines

How it starts

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

Real PTY Terminals

When to use

Use ap-terminal when a task needs a genuine interactive terminal — a TUI that repaints in place, a CLI that prompts step by step, or anything expecting a real tty (raw mode, cursor control, paste detection). Batch, non-interactive work belongs in command_execute (see ap-run-command), not here.

MCP tool: terminal_start

Spawn a PTY running argv (e.g. ['bash'], or an interactive CLI directly). Set cwd, a name/label for the session list, and cols/rows if the TUI is picky about terminal size.

{
  "tool": "terminal_start",
  "args": {
    "argv": ["claude"],
    "cwd": "/Volumes/SSDExternalMacStudio/Code/products/agentik/agentik-studio/apps/simone",
    "name": "simone-claude-tui",
    "cols": 120,
    "rows": 40
  }
}

MCP tool: terminal_output

Read the current screen/buffer. clean: true strips ANSI escape codes for readable text; lastBytes caps how much of the tail you pull back. The buffer is a ring of roughly 64KiB — older output is gone once it rolls off.

{ "tool": "terminal_output", "args": { "sessionId": "term_4b91", "clean": true, "lastBytes": 4000 } }

MCP tool: terminal_input

Send keystrokes. text is sent verbatim (no implicit newline). Set enter: true to additionally send an isolated carriage return AFTER the text — required for paste-detecting TUIs that ignore a newline embedded in pasted content.

{ "tool": "terminal_input", "args": { "sessionId": "term_4b91", "text": "/status", "enter": true } }

MCP tool: terminal_kill

Tear down the PTY when done or wedged.

{ "tool": "terminal_kill", "args": { "sessionId": "term_4b91" } }

MCP tool: terminal_sessions_list

List live terminal sessions. Without limit at most 50 rows come back; when there are more, the reply carries total, truncated: true and a nextCursor (pass it as cursor, with a limit, for the next page), or narrow with onlyAlive / status.

{ "tool": "terminal_sessions_list", "args": {} }

Read the full file on GitHub · 110 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. 12d ago Changed · +3 lines f1f35760fbe8
  2. 1mo ago First seen · 107 lines · 83 tokens per session scan A 6627caa9e4df

Subscribe to this mod's changes

ap-terminal is a skill published in the GitHub repository agentproto/ts (10 stars, last pushed yesterday), licensed Apache-2.0. It adds 83 tokens to every session and 993 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.