ptywright-testing

ptywright-testing is a skill for Claude Code, 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 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/kingsword09/ptywright/ptywright-testing
Any agent
npx skills add kingsword09/ptywright --skill ptywright-testing
Clone the repo
git clone --depth 1 https://github.com/kingsword09/ptywright

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge for your README with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them.

agentmods badge for ptywright-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/kingsword09/ptywright/ptywright-testing.svg)](https://agentmods.dev/skills/kingsword09/ptywright/ptywright-testing)
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. 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.00093 $0.01535
Opus 5 $0.00046 $0.00767
Sonnet 5 $0.00019 $0.00307
Haiku 4.5 $0.00009 $0.00153

Measured 3d ago against content hash 98b6b1fa04d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 3mo ago), licensed Apache-2.0. It adds 93 tokens to every session and 1,535 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

playwright-cli

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

mitchdenny/hex1b · 52 tokens

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

gui-onboarding-verification-skill

GUI desktop app only. Launch two parallel Oz cloud agents with computer use to download and install the latest stable Linux Warp build, capture screenshots while walking through first-time onboarding in both logged-out and logged-in states, then selectively fan out follow-up cloud agents for distinct onboarding…

warpdotdev/warp · 98 tokens

gui-integration-test

GUI desktop app only. Writes, runs, and debugs Warp integration tests using the custom Builder/TestStep framework in crates/integration. Use when adding a new integration test, fixing a failing integration test, wiring a test into the manual runner or nextest suite, or verifying end-to-end UI and terminal behavior in…

warpdotdev/warp · 72 tokens

gui-integration-test-video

GUI desktop app only. Run and author Warp Rust integration tests (the crates/integration harness) that capture screenshots and video via TestStep::withstartrecording() / withtakescreenshot(), including mouse and keyboard event overlays. TRIGGER only for the integration-test recording pipeline: recording or…

warpdotdev/warp · 132 tokens