ptywright-testing

ptywright-testing is a skill for Codex from kingsword09/ptywright. It costs 93 tokens per session (1,535 once invoked), scanned A, original, Apache-2.0.

A testing toolkit for terminal programs, text-based interfaces, pseudo-terminals, and browser-based terminals. It can capture terminal interactions and replay them as repeatable tests.

In plain words
What is it for?
Use it to test CLI and TUI applications, browser terminals, PTY output, MCP interactions, and agent terminal flows.
Why use it?
It replaces manual checking of terminal behavior with deterministic recordings, replays, and snapshots. This helps detect regressions in command-line and terminal-agent workflows.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex.

Good fit Use it to test CLI and TUI applications, browser terminals, PTY output, MCP interactions, and agent terminal flows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kingsword09/ptywright/ptywright-testing
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 kingsword09/ptywright --skill ptywright-testing
Clone the repo
git clone --depth 1 https://github.com/kingsword09/ptywright

Made for: 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 ptywright-testing

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kingsword09/ptywright/ptywright-testing"><img src="https://agentmods.dev/badge/skills/kingsword09/ptywright/ptywright-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,535 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.00093 $0.01535
Opus 5.5 $0.00037 $0.00614
Sonnet 5.5 $0.00019 $0.00307
Haiku 4.5 $0.00009 $0.00153

Measured 1mo ago against content hash 98b6b1fa04d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ptywright-testing 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 1mo 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/ptywright-testing/SKILL.md · 163 lines

How it starts

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

Ptywright Testing

Use ptywright when the task involves terminal or browser-terminal behavior that should be repeatable without manual inspection. Prefer stable text, DOM, and terminal snapshots over screenshots unless the user explicitly needs visual media.

First Decision

Choose one workflow before editing:

  • Browser terminal agent regression: Use when a web app renders a terminal and exposes [data-terminal-root], or when testing integrations such as Codex/Claude/Droid wrappers. Read references/agent-regression.md.
  • Raw PTY recording and replay: Use when the user wants to capture terminal bytes from node-pty, Bun Terminal, bun-pty, or an arbitrary command, then replay them into another renderer. Read references/raw-pty-cassettes.md.
  • Downstream browser renderer harness: Use when a raw PTY cassette needs to be replayed into a browser terminal renderer before ptywright snapshots the DOM. Use the repository docs at docs/browser-terminal-harness.md.
  • Scripted TUI tests: Use when testing a CLI/TUI directly through ptywright scripts, golden snapshots, and HTML reports. Read references/script-runner.md.
  • MCP interactive driving or recording: Use when an agent should interact through ptywright MCP tools or record an MCP-driven session into a script. Read references/mcp-tools.md.
  • CI/debugging/artifact triage: Use when a ptywright run failed, snapshots mismatch, a manifest is stale, or reusable commands need to be executed. Read references/ci-and-debugging.md.

If more than one workflow applies, start with the highest-level workflow that preserves determinism. For example, for an evolving browser terminal renderer, record a raw PTY cassette first, then create a browser agent regression that replays the cassette into the renderer.

Installation And Entry Points

Prefer the local project command when working inside a ptywright checkout:

bun run src/cli.ts <command>

Prefer published package commands in downstream projects:

Read the full file on GitHub · 163 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 163 lines · 93 tokens per session scan A 98b6b1fa04d1

Subscribe to this mod's changes

ptywright-testing is a skill published in the GitHub repository kingsword09/ptywright (1 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 93 tokens to every session and 1,535 once invoked, about $0.0004 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-08-31.

Related

Other skills, from other repositories

verify

Exercise the real app/API/CLI and collect observable evidence; tests alone do not count as end-to-end verification.

Hmbown/CodeWhale · 25 tokens

webapp-testing

Start/reuse a local app, wait for readiness, inspect rendered state/console/network, act from observed selectors, and verify with evidence.

Hmbown/CodeWhale · 32 tokens

verify-ui-change-in-cloud

Verifies user-facing Warp client changes by spawning a cloud agent with computer use to test Warp. Use only when the user explicitly requested computer-use verification or accepted an offer to run it, and ONLY in non-sandboxed environments and local environments. Triggers a cloud agent that runs the test-warp-ui skill.

warpdotdev/warp · 69 tokens

test-warp-ui

Guides testing Warp UI features and changes using the computer use tool. Use this skill only when computer-use testing was requested (explicit request or accepted offer) and the computeruse tool is available to the agent. Covers launching Warp and verifying UI behavior.

warpdotdev/warp · 55 tokens

tui-test

Control, inspect, test, and record real terminal apps with the tui-test CLI or its Rust, Python, and JavaScript APIs. Use for shells, TUI apps, text and style locators, keyboard or mouse input, terminal state, clipboard waits, screenshots, recordings, snapshots, and live terminal sessions.

microsoft/tui-test · 67 tokens

tui-explorer

Discover and replay terminal UI paths using agent-tui. Use when you need to launch a TUI app, explore navigation with bounded BFS, generate markdown acceptance tests, and verify those tests repeatedly. Do not use for web or desktop GUI automation.

pproenca/agent-tui · 54 tokens