control-cli

A guide for testing interactive command-line programs through a repeatable terminal session. It captures prompts, screen output, user input, interruptions, resizing, and optional performance data.

In plain words
What is it for?
Use it to check command-line prompts, startup failures, hangs, keyboard interrupts, resize behavior, or memory growth.
Why use it?
Normal automated tests may not reveal problems that happen only while a person interacts with a terminal interface.

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/anastasiyaw/codex-claude-code-config/control-cli
Any agent
npx skills add AnastasiyaW/codex-claude-code-config --skill control-cli
Clone the repo
git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 735 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.00068 $0.00735
Opus 5 $0.00034 $0.00367
Sonnet 5 $0.00014 $0.00147
Haiku 4.5 $0.00007 $0.00073

Measured 2d ago against content hash c97b5f0ceca6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

control-cli 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 2d 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.

skills/development/control-cli/SKILL.md · 72 lines

How it starts

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

Control CLI

Exercise an interactive terminal program through a small, repeatable harness. Prefer a repository-native demo or test harness; only assemble a temporary PTY or terminal session when the project has no suitable one.

Harness Loop

  1. Identify the command, smallest fixture, expected ready marker, and cleanup condition.
  2. Discover existing package scripts, PTY helpers, expect scripts, demo recorders, or TUI tests.
  3. Launch in an isolated environment with deterministic variables and local disposable data.
  4. Capture the initial screen or transcript.
  5. Send one action at a time and wait for a concrete prompt or screen marker.
  6. Capture the resulting transcript and any requested profile artifact.
  7. Stop the process and remove temporary sessions, ports, and profiles.

On Windows, prefer the project's own test runner or a checked-in Python/Node probe. Use ConPTY or an already-installed PTY helper when available; do not add a dependency just to run a one-off probe. On other systems, tmux, pty, or a repository-supported terminal harness may be appropriate.

Evidence

For a bug fix or regression, run the same deterministic interaction against the baseline and treatment and pass the captures to verify-this. For a hang, keep the last screen, process exit state, timeout, and a stack/CPU sample when available. For memory growth, use equal repetitions and record before/after snapshots or a bounded allocation metric.

Prefer stable text markers and accessibility-aware terminal probes over sleeps. If a sleep is unavoidable, state why and keep it bounded.

Safety

  • Never send credentials, destructive commands, or production paths into the controlled session.
  • Do not rely on stale screen state after navigation, resize, or a prompt change.
  • Do not hard-code paths, ports, or commands from another repository.
  • Keep transcripts and profiles private when they contain prompts, source, or user data.

Gotchas

  • A process that exits successfully before receiving input is not proof that the interactive flow works; assert the ready marker and the expected state change.
  • Fixed sleeps hide race conditions and make a green run non-repeatable.
  • A terminal transcript can miss rendering defects; use a real UI surface for graphical claims.
  • Cleanup must be verified, especially after a timeout or forced interrupt.

Read the full file on GitHub · 72 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. 2d ago First seen · 72 lines · 68 tokens per session scan A c97b5f0ceca6

Subscribe to this mod's changes

control-cli is a skill published in the GitHub repository AnastasiyaW/codex-claude-code-config (147 stars, last pushed 7d ago), licensed MIT. It adds 68 tokens to every session and 735 once invoked, about $0.0003 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-08-30.