agent-harness-design
Designing agent harnesses and tool systems — risk taxonomy for tools, permission decisions, draft/commit pattern, structured tool…
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
$ npx -y skills add AnastasiyaW/codex-claude-code-config --skill control-cli --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/control-cliContext preview
The summary Claude sees to decide when to auto-load this skill.
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
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.
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.
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.
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.
controlled session.
user data.
interactive flow works; assert the ready marker and the expected state change.
graphical claims.
| 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 |
Adapted from Cursor Team Kit's MIT-licensed `control-cli` workflow: https://github.com/cursor/plugins/tree/main/cursor-team-kit/skills/control-cli
A practical configuration kit for Claude Code, Codex, and other coding agents. It contains architectural principles, enforcement hooks, skills, drop-in rules, starter templates, and dynamic-workflow commands.
Designing agent harnesses and tool systems — risk taxonomy for tools, permission decisions, draft/commit pattern, structured tool…
Use when designing, auditing, refactoring, or explaining an agentic harness for any domain, especially when work must continue…
Практическая инженерия диффузионных моделей: архитектуры, обучение, инференс, оптимизация памяти. Использовать при любых задачах…
Expert prompt engineering for FLUX.2 [klein] image generation and editing model. Use this skill whenever the user wants to create…
Plan or review LoRA and edit-training work specifically for FLUX.2 Klein or Qwen-Image-Edit, including paired datasets,…
Forensic image-to-prompt compiler for image generation models. Use this skill whenever the user wants to: convert/describe an…