control-cli

Drive and inspect interactive CLIs or TUIs using a reproducible local test environment: supports deterministic inputs, interaction recording, and optional performance analysis. Suitable for CLI UX checks, prompt flow validation, starting regression tests, and exercising interactive behaviors like suspension, interrupts, window-resize, or memory growth. Not intended for non‑interactive commands that regular tests already cover.

Last repository push
GitHub Stars
218
Forks
33
Issues / PRs
5

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "control-cli" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-6a63a4c6bd63c8e59f6fc6d7d35529ba3dd74bd5854e44589c818a7a7d68aa06. Verify the upstream source and version against https://github.com/AnastasiyaW/codex-claude-code-config before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Drive and inspect interactive CLIs or TUIs using a reproducible local test environment: supports deterministic inputs, interaction recording, and optional performance analysis. Suitable for CLI UX checks, prompt flow validation, starting regression tests, and exercising interactive behaviors like suspension, interrupts, window-resize, or memory growth. Not intended for non‑interactive commands that regular tests already cover.

0 Downloads

Introduction source: third_party · AnastasiyaW · 0.0.1 Reference

SkillPi interpretation

Tasks
Drive and inspect an interactive CLI or TUI with a repeatable local harness, deterministic input, transcripts, and optional profiling. Use for CLI UX checks, prompt flows, startup regressions, hangs, interrupts, resize behavior, or memory growth. Do not use for a non-interactive command that a normal test can cover.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: control-cli
description: Drive and inspect an interactive CLI or TUI with a repeatable local harness, deterministic input, transcripts, and optional profiling. Use for CLI UX checks, prompt flows, startup regressions, hangs, interrupts, resize behavior, or memory growth. Do not use for a non-interactive command that a normal test can cover.

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.

Troubleshooting

Symptom Likely cause Action
Harness hangs Wrong ready marker or child process owns the terminal Capture the screen, inspect the process tree, then terminate cleanly
Input is ignored Program is not in the expected prompt state Wait for a fresh marker and send one action only
Works manually, fails in harness Hidden environment, terminal size, or timing dependency Record env/size and replace sleeps with state-based waits
Transcript is empty Output is on another stream or the PTY was detached Capture stdout and stderr through the repo-native harness and verify file size

Source

Adapted from Cursor Team Kit's MIT-licensed control-cli workflow: https://github.com/cursor/plugins/tree/main/cursor-team-kit/skills/control-cli

Version history

  1. v2026.10.24 GitHub ↗
    Original release notes

    Three ideas from this month's agent-harness news, adopted as checks rather than prompts. ## New - **Output legibility** — [`docs/output-legibility.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/docs/output-legibility.md). Karpathy's readability ladder (STE-style text, diagram, HTML, video), plus the two ASD-STE100 rules that need no licensed dictionary: one concept keeps one term, and sentences stay short. - **`scripts/term_drift_check.py`** — checks agent output against a project glossary. It flags synonyms of your terms (`stem*` covers inflection, so it works in Russian too) and overlong sentences, and skips code, URLs and HTML comments. Exit `0` clean, `1` findings, `2` not checked. It ships with a self-test whose must-fail controls catch six deliberate breaks of the logic. - **Bounded harness-improvement pilot** — [`docs/harness-improvement-pilot.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/docs/harness-improvement-pilot.md). The method behind Google Research's Harness², without the auto-patcher: a frozen suite with a held-out case, one change per candidate, strict improvement and no safety regression. - **Dead-code sweep** — a new reference in the `refactoring-safely` skill, after OpenAI's GPT-6 maintenance guide. It covers a read-only audit with production evidence and one small draft PR per removal, and keeps killswitches and safeguards out of scope. ## Changed - `rules/quality-code.md`: when you change code, update or delete the comment next to it in the same commit. Research suggests a wrong or stale comment misleads a model more than a missing one. - `CLAUDE.md`: new Harness² and Output Legibility sections. Full changelog: [`UPDATES.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/UPDATES.md) · PRs #18, #19

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供完整的交互式 CLI/TUI 测试方法论,具有明确的实用价值
  • 适用于 CLI UX 检查、回归测试、性能分析等实际开发场景
  • 包含详细的 Harness Loop 和 Evidence 收集规范
Trigger Precision95/100

Highlights

  • description 字段完整描述了 Skill 的用途和适用场景
  • 触发词精准且边界清晰,明确排除了非交互式命令场景
Structure and Standards90/100

Highlights

  • 文档结构清晰,包含完整的执行流程和章节划分
  • frontmatter 完整,文档长度适中,易于理解
Execution Reliability88/100

Highlights

  • 提供了详细的执行步骤和异常处理建议
  • 包含安全规范和 Troubleshooting 指南,覆盖主要异常场景
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Accounts, secrets or authorization

    Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.

    Mentioned in main document · lines 43
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.