Wmux UI Verifier
Launch and test the wmux desktop app UI by clicking elements, capturing screenshots, and verifying behavior.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/verify-wmux-openwong2kim/— the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Works for every skill.What this command does
- Makes a new, empty temporary folder.
- Downloads the skill's folder,
.claude/skills/verify-wmux, fromgithub.com/openwong2kim/wmux(branchmain), the GitHub repository it's listed from. You get the version that is there now, not a copy we keep. - Copies that folder to
~/.claude/skills/verify-wmux-openwong2kim/. - Deletes the temporary folder.
Installing runs none of the skill's files; it only downloads and copies them. When you later use the skill, Claude follows its SKILL.md and may run scripts that come with it. Read them first.
Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Launch and drive the real wmux desktop app (Electron main window) to prove a change works the way a user sees it: start an isolated instance, check it with doctor, click/press by data-testid or ARIA label over CDP, capture ARIA snapshots and screenshots, then stop only what was launched. Use whenever you need to run, launch, screenshot or verify wmux UI behavior, reproduce a UI bug, or say a wmux feature works; read references/features/ for the per-feature recipes.
What this skill does
verify-wmux
Status: proven on macOS against the installed /Applications/wmux.app 4.3.0: launch, doctor, drive (Settings first, then one sweep over all ten feature files), ARIA snapshots and CDP screenshots, stop --purge, evidence kept. Not yet run on Windows or Linux, nor against a dev build; the PC switcher was proven only in its absent state.
wmux is an Electron terminal multiplexer. The surface a user touches is the main window (sidebar, panes with xterm terminals, rail pages, settings, dialogs). Secondary surfaces (the wmux CLI, the MCP server, the phone web client) are not driven by this skill; prove those with a terminal transcript or the repo's own harnesses (e2e/, rig/).
Everything runs through one driver, scripts/control-wmux.mjs (Node 22+, uses the repo's playwright-core dependency; run npm ci once in a fresh checkout). Every command prints one JSON object and exits non-zero on failure. Read references/features/README.md before driving, then the feature file that matches the request.
Launch
node scripts/control-wmux.mjs launch # /Applications/wmux.app, suffix -verify-<random>
node scripts/control-wmux.mjs launch --app <path/to/wmux> # any other packaged build's executable
node scripts/control-wmux.mjs launch --suffix -verify-mytest --timeout 90000
node scripts/control-wmux.mjs launch --app <exe> --env-file vars.json # extra env, applied after the scrub below
node scripts/control-wmux.mjs launch --app <exe> --user-data-dir <dir> # Electron userData at <dir><suffix>
node scripts/control-wmux.mjs launch --app <exe> --fake-audio clip.wav # a WAV plays once as the microphone
--env-file takes a JSON object of string values, set on the app after the scrub (so a WMUX_* knob such as WMUX_NO_PATH_REFRESH survives it); it may not set WMUX_DATA_SUFFIX or WMUX_MCP_REGISTER_EXTERNAL (MCP registration writes the real agent configs). restart reuses it. CONTROL_WMUX_DIR=<dir> moves the run state and evidence from this skill's folder to <dir>/.run and <dir>/evidence, so a harness such as scripts/e2e-first-run.mjs keeps its own record. On macOS the app always gets --use-mock-keychain (no login-keychain dialog on the owner's desktop) and, unless --user-data-dir says otherwise, --user-data-dir=~/.wmux<suffix>/electron-user-data; wmux appends the suffix to whatever userData it was given. Elsewhere userData stays at its default (%APPDATA%\wmux<suffix>, $XDG_CONFIG_HOME or ~/.config/wmux<suffix>), where the wmux CLI looks for it. restart reuses the first launch's choice.
--fake-audio proves voice dictation without a microphone. Chromium's fake capture device plays the 16-bit PCM WAV once, from when a recording opens it, and the real microphone is never touched. The audio service's sandbox would refuse to read the file, so only that sandbox is off for the instance. restart reuses the clip. Make a clip with say -o x.aiff "…" then afconvert -f WAVE -d LEI16@16000 -c 1 x.aiff x.wav.
Where userData actually is: launch and doctor print a userData field, the path the app logs at boot ([Main] WMUX_DATA_SUFFIX="<suffix>" → userData="<path>"), and userDataSource: logged, or predicted when the app never logged that line (then doctor lists it under problems). It is kept in state.json. Every recipe that reads a profile file (session.json, .first-run) takes the path from that field, never from a hard-coded ~/Library/Application Support/… or %APPDATA%\…: a guessed path can hold a stale file from an earlier run.
What it does: spawns the app executable directly (its PID is recorded) with WMUX_DATA_SUFFIX=<suffix>, which isolates the socket, MCP socket, auth token, TCP port file, data dir ~/.wmux<suffix>/, the daemon and Electron userData (src/shared/constants.ts dataSuffix(), src/main/index.ts appInit). The launching environment is scrubbed of WMUX_* pane identity and CLAUDE* session variables first, because an agent usually runs inside the owner's wmux. The instance also gets WMUX_TEST_CDP_PORT=1, the test harness opt-in (src/main/browser-session/cdpTestOptIn.ts). The contract: every harness that launches wmux by itself to drive it over CDP, Playwright launchers (_electron.launch) included, sets it in the env it spawns the app with (scripts/__tests__/testCdpOptIn.guard.test.mjs checks this). ELECTRON_ENABLE_LOGGING=1 sends the renderer console into app.log.
Ready means: the CDP port is found and the main window has rendered #root. wmux picks its own CDP port in 18800-18899 at startup (src/main/browser-session/cdpPort.ts claimCdpPort); a --remote-debugging-port flag is not honored. The driver takes the port the app logs ([WinMux] CDP requested on port N), and only once the claim file ~/.cache/wmux-cdp/wmux-cdp-<N>.lock names the launched PID; until that line is logged there is no port and launch keeps polling within its timeout. Claims are never cleaned up, so a stale one naming a reused PID is never trusted on its own. doctor cross-checks the CDP listening on port N line.
Refusals (by design): an empty suffix (the owner's real instance), -dev (every dev build's default), -portable (any packaged copy outside /Applications), a suffix whose socket or daemon is already live, and a second launch while the recorded instance is still running. Every other command reads .claude/skills/verify-wmux/.run/state.json and refuses without it, and re-checks before each attach that the CDP claim still names the launched PID. The driver can only ever touch an instance it started.
Doctor
node scripts/control-wmux.mjs doctor
Read-only toward the app (it may update the recorded userData in state.json from the app's log). Reports healthy, userData/userDataSource (see Launch) plus problems[]: app PID alive; app version vs checkout version (skew means the feature map's handles may not exist in the running build); CDP disabled (WMUX_DISABLE_CDP=true or ~/.wmux<suffix>/config.json browser.cdp.enabled:false, both stop all driving); CDP port claimed by our PID and answering /json/version; CDP listening logged (vs unverified); daemon PID; whether the first-run wizard or settings is open; window visibilityState/focus; renderer console error count. Run it before the first drive, after anything surprising, and after every failed drive. A failing doctor means fix or relaunch, not retry the drive. Output is also saved as doctor.json in the evidence dir.
Drive
node scripts/control-wmux.mjs click --testid first-run-wizard-skip
node scripts/control-wmux.mjs click --label Fleet # aria-label, exact
node scripts/control-wmux.mjs click --role menuitem --name "Settings ⌘,"
node scripts/control-wmux.mjs click --text "Skip for now" [--nth 0]
node scripts/control-wmux.mjs press --key Meta+Comma # Playwright key syntax
node scripts/control-wmux.mjs press --key Enter --label "Terminal input" # focus target first
node scripts/control-wmux.mjs type --text 'echo hi' --label "Terminal input" # keyboard.type into the target (appends)
node scripts/control-wmux.mjs select --label "<select label>" --value <option> # native select user control
node scripts/control-wmux.mjs hover --selector '[data-sidebar-row]' --nth 0 # reveal hover-only controls
node scripts/control-wmux.mjs wait-settle --testid settings-page-title [--state visible|hidden] [--timeout 10000]
node scripts/control-wmux.mjs eval --js "document.querySelector('[data-testid=settings-page-title]')?.textContent"
node scripts/control-wmux.mjs inspect --js "..." # alias of eval
- Targets, best first:
--testid(data-testid),--label(aria-label),--role+--name,--text,--selector(CSS, last resort; never a generated class). Never screen coordinates. - A target matching several elements fails and says how many; scope it or pass
--nth. - A click blocked by a modal fails with the element that intercepts pointer events (for example
onboarding-backdrop); close that dialog through its own control. wait-settlewaits for the target state, then for 400 ms of DOM quiet (MutationObserver, which keeps working when a hidden or locked window pauses rAF). Use it after every action instead of sleeps.eval/inspectis for read-only inspection (a value, a count, a store read). Never use it to put the app into the state you were asked to reach; that skips the code the user runs.
Evidence
node scripts/control-wmux.mjs snapshot [--testid ID | --selector CSS | --role R --name N] --as settings-general
node scripts/control-wmux.mjs screenshot --as settings-general
node scripts/control-wmux.mjs console [--errors] [--tail 50]
Artifacts go to .claude/skills/verify-wmux/evidence/<run-id>/ (git-ignored): numbered NNN-<as>.aria.yml (accessibility tree with the instance suffix and window title in the header) and NNN-<as>.png, plus app.log (main + renderer console), doctor.json and timeline.jsonl (every command and outcome). Screenshots use CDP Page.captureScreenshot; when the screen is locked or the window occluded it may time out (screenshot: unavailable) or come back near-empty (suspectBlank: true): then the ARIA snapshot plus an eval read-back is the evidence, and say so.
Proof standards:
- Drive the real user path (button, shortcut, menu). Internal setters, test-only hooks and
evalthat writes state do not count. Arranging a precondition is fine; injecting the symptom is not. - Capture the action and the resulting state: a snapshot or screenshot right after the action, of the region that changed. A final screenshot alone does not show causation.
- Confirm side effects from a second, read-only view: reopen the panel, read the value back with
eval, read the file under~/.wmux<suffix>/. - Keep identity visible: the snapshot header carries the suffix; doctor output records app, version and port.
- Every mapped entry point, or an explicit skip: if a feature has a button and a shortcut, proving one does not prove the other. Report
skipped: <entry>, reason: <why>. - Report exactly one verdict with the claim restated so it can fail:
VERIFIED | NOT VERIFIED | INCONCLUSIVE
Claim: <falsifiable claim>
Evidence: <artifact paths, read-back values>
Skipped: <entry points not driven, with reason> (or none)
Confidence: high | medium | low, and why
A clean NOT VERIFIED is a useful result. Do not upgrade INCONCLUSIVE because the code looks right.
Cleanup
For an app-only reconnect check, control-wmux restart gracefully exits only
the recorded app and relaunches that same executable/profile. It requires a
live daemon proven to be the recorded instance's: the daemon answering
daemon status on the suffixed pipe reports the PID in
~/.wmux<suffix>/daemon.pid (outside Windows, that PID's own environment
carrying the suffix also counts). It retains that daemon and its sessions. Run doctor afterward and compare the daemon PID and
terminal output. This does not apply an engine change that needs a daemon restart.
node scripts/control-wmux.mjs stop # app + its daemon; data dir kept for inspection
node scripts/control-wmux.mjs stop --purge # also delete the suffixed data this run created
stop SIGTERMs the launched app PID (SIGKILL after 10 s, after re-checking it), but only while that PID still has the creation time launch recorded in state.json (pidCreatedAt); a PID that died and was reused, a state without a creation time, or a process it is not permitted to signal is reported in steps and left alone. On Windows, where a signal is a bare-PID TerminateProcess, it instead opens a handle to the PID, checks the creation time while holding it, and terminates through that same handle, so a reused PID is never hit; restart does the same. Before the purge it waits up to 15 s for the app's own process tree (its Chromium helpers, and on Windows the daemon and panes) to exit, so no file in userData is still held open. Then it stops the daemon that instance spawned (a normal quit only detaches from it): first wmux daemon stop over the instance's own suffixed socket, then, only if still alive, SIGTERM to the PID in ~/.wmux<suffix>/daemon.pid, and only when that PID is proven to be the instance's daemon the way restart proves it. On Windows the proof is taken before daemon stop, after reading the daemon's creation time, and the PID is ended through a handle pinned to that time. It boots out finished launchd jobs labelled com.wmux.daemon<suffix>.* (macOS). It removes the CDP claim the app left (~/.cache/wmux-cdp/wmux-cdp-<port>.lock, which a hard kill leaves behind), for the port the app logged only, and only while that file names the launched PID and that PID is gone or now belongs to a process that started after the file was written; restart does the same before it relaunches. --purge removes only suffixed paths that did not exist before launch: ~/.wmux<suffix> with its socket, token and port files, and Electron's userData (the path launch recorded and checked against the one the app logs at boot). It skips, and lists under purgeSkipped, a path that existed before launch, a userData whose pre-launch state is unknown or was never recorded (a state from an older driver), and any path that is or holds a symlink or junction, which it never follows. Never pkill, killall, or kill by name. Evidence is never removed; stop lists what survived. Run stop after every attempt, failed ones included; the state moves to .run/stopped-<run-id>.json.
Record the verdict (verifying a PR)
When the claim is a pull request, end with the verdict line above in your report. A pane has no tool that records a verdict: the agent factory's verifier bot records its own (pr_verdict in bot mode), and the factory's merge lane merges a PR only on a pass at exactly the head being merged.
Helpers
| Command | Purpose |
|---|---|
launch | start an isolated instance, wait for CDP + rendered root |
doctor | read-only health and identity check |
snapshot | ARIA tree of body or one target, saved to evidence |
screenshot | CDP PNG of the main window, saved to evidence |
click / hover / press / type | act by handle / key / characters |
select | choose a native select option with --value through its UI control |
restart | relaunch the owned app while retaining its verified daemon |
eval (inspect) | read-only JS expression in the main window |
wait-settle | wait for a target state and DOM quiet |
console | renderer console lines from app.log |
stop | tear down what launch started |
Pure rules (suffix refusal, CDP claim parsing, env scrub, console parsing) live in scripts/lib/control-wmux-lib.mjs and are tested by scripts/__tests__/controlWmux.test.mjs.
Gotchas
- A fresh suffix is a fresh profile: the first-run wizard ("Welcome to wmux") covers the window, an onboarding tour ("Every agent, one board", Step 1 / 4) can follow, and a "Keyboard shortcuts" card appears. Reset to the baseline in
references/features/README.mdbefore driving. - Isolation covers wmux's own paths only. Things outside them are shared with the owner:
~/.claude/settings.json,~/.claude.json,~/.wmux/hooks/(Claude Code integration), the~/.local/bin/wmuxCLI shim, Keychain, the network. The feature files list which actions write there; do not drive them. - A packaged build outside
/Applications(for exampleout/fromnpm run package) launched with our suffix still runs the macOS CLI-shim repair about 3 s after boot and may repoint~/.local/bin/wmuxat itself (src/main/index.ts,PORTABLE_DATA_SUFFIXguard). Prefer/Applications/wmux.app; if you must use a copy, check the shim afterwards. - Version skew: handles come from this checkout's
src/renderer; the installed app may be older. Doctor reports it. A missing handle under skew is not drift. - macOS "wmux is not responding"/memory dialogs or a locked screen can stall the window; CDP DOM reads keep working, screenshots may not.
- The quick-launch window (
launcher.html) is a secondpagetarget; the driver always picksindex.html.
Supersedes (follow-up, not done here)
These existing scripts drive the UI over CDP against whatever wmux is already running (several scan the 18800-18899 range and attach to the first answer, which can be the owner's instance; some write evidence to hard-coded Windows paths), and each re-implements attach and evidence. Their scenarios should move into feature files driven by control-wmux; they are left untouched for now:
scripts/channel-dock-dogfood.mjs,scripts/channel-members-dogfood.mjsscripts/s-c1-fleet-dogfood.mjs,scripts/s-c2-fleet-deepening-dogfood.mjsscripts/x3-dogfood-main.mjs,scripts/x3-dogfood-linkclick.mjs,scripts/x3-dogfood-restore.mjs,scripts/x3-dogfood-cleanup.mjsscripts/pane-stacking-dogfood.mjs,scripts/v281-gui-probe.mjs,scripts/homescreen-launch-probe.mjsscripts/a2a-state-query-dogfood.mjs,scripts/b1-plugin-host-dogfood.mjs,scripts/lanlink-pr5-cdp-dogfood.mjs,scripts/managed-chat-fault-probe.mjs,scripts/phase3-retention-probe.mjs
Keep the map honest with /maintain-verification-skill.
Related skills
Generative Code Art
anthropics
Create algorithmic art with p5.js using randomness and interactive parameters.
UI/UX Pro Max
anthropics
Build production-grade web components and interfaces with distinctive, polished design.
Artifact Theme Toolkit
anthropics
Apply professional color and font themes to slides, docs, and web pages.
Multi-Component Web Artifacts
anthropics
Build complex React artifacts with Tailwind CSS and shadcn/ui components.