ap-terminal

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

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-terminal
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.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.svg" alt="Measured on agentmods" 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 929 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.00083 $0.00929
Opus 5 $0.00042 $0.00464
Sonnet 5 $0.00017 $0.00186
Haiku 4.5 $0.00008 $0.00093

Measured today against content hash 6627caa9e4df, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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-terminal/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 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.

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

MCP tool: agentproto_terminal

Attach an interactive terminal panel for a human (or you) to watch or drive live, instead of polling terminal_output in a loop.

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

Read the full file on GitHub · 107 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 · 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 (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 83 tokens to every session and 929 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