/cypress:cypress-tapfrom Cypress
Drives a Cypress open-mode session to run and rerun specs, inspect reporter/command logs, and query the app under test via DOM, accessibility, styles, and snapshots. Use when authoring or debugging e2e or component specs without GUI interaction.
Ships in Cypress. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
cypress tapcypress tap controls an already-running cypress open session. Use it to iterate on specs,
inspect the reporter and command log, and read the app under test without GUI interaction.
Use cypress run instead for a one-shot headless batch.
A headed cypress open pops a window and a browser over the human's work and can steal focus on
every run. If you must start the session yourself, launch it with --headless, in the
background (it runs until stopped, so a foreground call never returns). The requirements, the
launch command, and pid handling are in
session-launch-and-cleanup.md; read it before
launching.
Which session to use: run tap sessions first. It does not show whether a session is
headless, so treat any session you did not start as possibly headed: driving it can bring its
browser up over the user's work. Use it only if the user is working in it or asked you to;
otherwise start your own headless one, then continue with the core loop, passing
--session <your pid> on every tap call. Without it, auto-selection prefers the
lowest-pid session for the cwd, which is usually the user's older one. Drop --headless only if
the user asks to watch.
You own every process you start, and must stop it before your final answer and on every failure path. A headless session is invisible, so a leaked one silently burns CPU and memory. Never stop a session you did not start. Background it, record its launch pid and session pid, and stop the launch's process group by following the Stop procedure in session-launch-and-cleanup.md. Also stop any dev server you started.
npx cypress tap sessions # confirm a session and note its pid
npx cypress tap status --session <pid> # baseline startedAt + spec
npx cypress tap run cypress/e2e/foo.cy.ts --session <pid> # async — returns immediately
# poll status until passed|failed for your spec with a changed startedAt
npx cypress tap reporter --session <pid>
npx cypress tap reporter --test-id r3 --session <pid> # one test: log, network, stubs, error
Always pass --session, even when tap sessions lists only one session: the user can open
another partway through, and auto-selection would then switch to it.
run is asynchronous. A stale verdict matches a fresh one on every field except startedAt,
and a watcher rerun of the selected spec can advance startedAt without running your file.
Gate on startedAt, spec, and a terminal status. Do not wait to observe running — fast
specs can finish between polls. Copy-paste poller:
session-lifecycle.md. JSON field helpers:
json-recipes.md.
In poll loops, prefer ./node_modules/.bin/cypress tap … over npx cypress tap … when the
project pins Cypress.
tap. Do not use tap --help to probe an unknown older build; prereleases below the
version floor may attempt session discovery instead of printing help.cypress open session and any configured baseUrl dev server must be running. Choose or
start the session as described in "Launch headless and clean up" above; stop any dev server
you started.tap from a compatible checkout and pass
--session <pid> on every call.--json or script a poll: read json-recipes.md.cypress run, not tap.Read only the references required for the current task.
sessions: reachable sessions, project roots, testing types, and browsers; JSON adds support
and renderer health.status: lifecycle stage, selected spec, run identity, counts, build error, and active pin.specs: runnable project-relative spec paths for the session's testing type.run <spec>: dispatches a spec and returns immediately.reporter: spec overview and test ids; with --test-id, the complete test attempt.command: one command-log row with network data, snapshots, and console properties.pin: rewinds the app frame to a command snapshot.dom, aria, inspect: read the settled app or currently pinned snapshot.All commands accept --session <pid>, --json, and --timeout <ms>. On a confirmed supported
build, use npx cypress tap <command> --help for command-specific flags. Help is generated from
the live session contract — when help and this skill disagree, trust help.
run confirms dispatch, not execution, and returns before the new run starts. During that gap,
status and app reads can still return the previous run's plausible verdict and page.
For every explicit run:
startedAt.status --json response at a time.passed or failed for the expected spec with a non-empty, changed
startedAt. startedAt is null only when no run has ever started for that spec in the
session — a build failure on first selection. A build that fails on rerun or on a watcher
rebuild still advances startedAt, so it takes the normal path. Keep the null fallback
(a changed observable baseline, or a preceding loading/running observation) for the
first-selection case only.Saving the active spec triggers an automatic watcher run. After editing, either use that run or let it settle before taking a baseline and dispatching another. Never intentionally put two runs in flight.
Blank and partial payloads from a successful status call occur transiently. Treat missing
fields as "keep waiting," not as a state change. A nonzero status exit is a command failure,
not a partial read: stop polling and report it.
Only passed and failed are verdicts, but an exit-0 status: error (config or setup broke)
is a stop condition: stop polling, read status, and fix or restart rather than waiting out the
loop. A build failure is failed with the diagnostic in
status.error, possibly before any tests exist. status is the only surface that carries that
diagnostic — reporter renders a failed build as an empty spec.
sessions and pass --session <pid> on every call. Auto-selection can choose another
project or an unresponsive session. E2e and component testing use separate sessions: they can
share a projectRoot but expose different specs lists, and only status names which
session answered — other commands carry no pid in their output.npx resolution on every call. When the
project pins an older Cypress, run commands from a compatible checkout and pass
--session <pid>.1 and lists matches on stdout.Unknown command "tap" and usage text to stdout; redirecting it hides the cause.reporter --test-id --json and command --json can be
hundreds of kilobytes. Save them to a file and parse the file.dom and aria cap output. Narrow the
selector or raise the limit when (output truncated) appears.0. Confirm a
known app anchor. If the frame is blank, pin a snapshot from the last real command and read
that state instead.pin --clear; otherwise later app
reads continue to describe the pinned past. An exit-0 cleared:false result is a benign
no-op even if human output says FAILED TO CLEAR PIN.aria for current form-control values:
dom and inspect can show the initial HTML value attribute, and inspect may omit the
accessibility value. Use dom for exact live-region, toast, status, and label text because
aria may omit descendant text.;, not &&. For dom/aria/inspect, zero matches
exit 0 while ambiguity exits 1. A broad probe that enumerates matches is the useful
outcome; && drops every follow-up command after the first ambiguous selector.reporter --test-id and confirm
intercept match counts, stub usage, and that requests you care about were stubbed. See
reading-results.md and json-recipes.md.--json is for parsing and may contain much more data. Default
rendering is usually better for one-off debugging: it inlines code frames and interleaves network
events in log order.0 is not success of your goal. tap does not start Cypress. With no session,
status is not connected at exit 0; sessions prints guidance instead of JSON. Selector
misses, empty specs, and unknown --session pids can also exit 0. Branch on fields, not
silence.status exits 0 for known lifecycle stages, including not connected. Discovery,
compatibility, unsupported-browser, and renderer failures exit 1, sometimes with no stdout;
a poller must fail fast on that nonzero exit.dom, aria, and inspect require exactly one selected element. Ambiguity exits 1 with
candidate selectors. A miss is not a CLI failure: dom and inspect report found:false;
aria returns an empty tree both for a miss and for an element with no accessibility node.reporter --test-id read over one command call per row.sessions for rendererResponsive: false; restart a
wedged renderer instead of increasing --timeout.| Symptom | Read |
|---|---|
| Poll hangs or verdict may not be mine | session-lifecycle.md |
| Edited a file; unsure what reran | session-lifecycle.md (file watcher) |
| JSON key empty or guessed wrong | json-recipes.md |
Column / e row / test id meaning | reading-results.md |
Test count ≠ expected its | reading-results.md, recipes.md (component) |
| Failure triage or pin looks wrong | recipes.md, reading-the-app.md |
Exit 1 but output looked fine | troubleshooting.md |
references/json-recipes.md (opens in a new tab)references/reading-results.md (opens in a new tab)references/reading-the-app.md (opens in a new tab)references/recipes.md (opens in a new tab)references/session-launch-and-cleanup.md (opens in a new tab)references/session-lifecycle.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/cypress-authorCreates, updates, and fixes Cypress tests (E2E/end-to-end and component tests). Use when the user asks to create tests, add tests, write tests, update tests, test this file/component, new spec, or fix a failing or flaky test. Apply even when the user does not say 'Cypress' (e.g. 'create tests for this file'). Prefer cypress-explain when the user only wants to explain or review tests without changing code./cypress-cloud-cliRuns the cy-cloud CLI to inspect Cypress Cloud organizations, projects, runs, specs, tests, failure screenshots, and Test Replay data. Use when the user mentions Cypress Cloud, cy-cloud, cypress-cloud-cli, a Cloud run or test URL, failing or flaky Cypress tests, Test Replay, run triage, Cloud artifacts, or asks why a recorded test failed./cypress-npx claudepluginhub cypress-io/ai-toolkit --plugin cypressOther plugins' skills for the same job