No slash command · from TSH Product Engineering
Collects UI verification evidence using Playwright CLI: captures actual.png, computed-styles.json, and a11y-snapshot.yml from a running app. Optionally exports Figma reference images when a URL is supplied. Does not judge results.
Ships in TSH Product Engineering. 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.
The capture side of UI verification: mechanical evidence collection with the
Playwright CLI, plus preparing the shared design reference when the caller supplies
one. The three ACTUAL artifacts come purely from the running application, so capture
runs with or without a design reference — the Figma export is a conditional extra
step, not a prerequisite. Capture never judges whether the UI matches the design —
that is the ui-reviewer agent, applying the verifying-ui
standard it preloads.
Local repository rules outrank this skill. If playwright-cli is not on PATH, use
npx playwright cli (the playwright package's cli subcommand — never
npx playwright-cli, which fetches a deprecated package); if neither works, that is a blocker to escalate (the fix is
npm install -g @playwright/cli@latest), never a reason to improvise another
capture method.
| Severity | Rule |
|---|---|
| MUST | Use only the caller-provided, user-confirmed full URL for the current pass, unchanged. A delegation without that URL is an immediate blocker. |
| NEVER | Discover, infer, normalize, or replace the URL: no port swaps, no config inspection to pick another URL, no launching or switching to another local app or server. |
| MUST | Write every artifact into the caller-provided iteration directory with an explicit path. playwright-cli defaults to .playwright-cli/ — that location is WRONG for these artifacts; never rely on default output locations. |
| MUST | Run every command from the repository root, so the CLI's own .playwright-cli/ scratch directory stays at the repo root where it is git-ignored. A .playwright-cli/ directory appearing under specifications/** means the working directory was wrong: move the real artifacts to their explicit paths and delete the stray directory. |
| NEVER | Write a Figma export anywhere other than the verification root. The shared figma-expected.png is the reference; when the pinned node covers more than the component under verification, a cropped figma-expected-<region>.png may sit beside it, exported once and reused. Never place a design image inside iteration-<N>/, which holds this pass's ACTUAL evidence only. |
| MUST | Collect all three ACTUAL artifacts — actual.png, computed-styles.json, a11y-snapshot.yml — and confirm they exist in the iteration directory. Even one missing artifact makes the verification invalid. |
| MUST | Capture actual.png as the FULL page (fullPage: true), never the viewport. The resize height only sizes the window; a screenshot clipped at the viewport hides everything below the fold and invalidates the pass. Verify the image height against the page's scrollHeight before reporting success. |
| MUST | Shape computed-styles.json as a JSON object, never a JSON string containing JSON, and never split across companion files. Every entry carries a label, the selector used, a textSample of the element's text, its rect, and the computed values. Missing coverage is fixed by re-measuring, not by writing a second measurements file beside it. |
| MUST | Resolve the component root first and prove it before measuring anything: try whatever stable hooks this project actually offers — test attributes, ids, ARIA landmarks, whatever the page and the plan's Technical Context show it uses — then assert the element contains text the component is known to render. Never assume a hook convention such as data-testid; when none exists, the smallest element containing that text is a valid root. No proof, no measurement. |
| NEVER | Ship an entry that is null or carries an error such as "Element not found". A failed lookup means the selector is wrong, not that the element is absent from the design: fix the selector and re-measure, or return the capture as incomplete with that element named. A file full of nulls passes the file-exists check and then wastes a reviewer round. An optional field inside an otherwise measured entry may legitimately be null — a control that genuinely has no label, for instance — as long as the entry itself carries real measurements. |
| NEVER | Use a selector engine the browser does not have. document.querySelector takes CSS only — :contains() and other jQuery-isms silently match nothing. Match on text in JavaScript instead: filter elements by textContent. |
| MUST | Confirm each measured element IS the element its label claims, before writing the file. Scope every selector to the component under verification — derive it from the component's own root, heading text, or test id — never take the first match of a generic pattern like [class*="card"], which on a real page is as likely to be the page banner as the target card. When a label and the measured element disagree, fix the selector and re-measure rather than shipping the mismatch. |
| MUST | Make computed-styles.json actually cover every container and control under verification, and list the measured elements in the capture summary. A file that exists but measures none of the verified elements is an incomplete capture — report it as such rather than returning success. |
| MUST | Capture the locale, language and text direction the caller pinned, selecting it the way the caller specified. Record what was actually captured in the summary; when the page renders in a different language than requested, that is a blocker, not a detail to mention in passing. |
| MUST | When the caller provides a Figma URL and shared verification root, export or ensure the shared figma-expected.png via the Figma MCP BEFORE browser capture begins, so auth or page blockers cannot prevent EXPECTED preparation. |
| NEVER | Fetch a design through the browser: no figma.com navigation, no saving a browser, login, or error screenshot as figma-expected.png. Figma MCP unavailable → escalate the blocker. |
| MUST | Reuse the project's own authentication path before proposing one: a documented auth recipe, an existing E2E auth setup (global.setup, storage state, auth fixture), existing .env vars that match the login form, or a seeded development account — in that order. Deriving TSH_UI_LOGIN_* names and asking the user to add them is the last rung, not the first: a project that already stores test credentials should never be asked to duplicate them under our prefix. Report which mechanism was used. |
| NEVER | Bypass, fake, seed, or inject authentication state (cookies, tokens, localStorage, sessionStorage) or assume an identity to get past a login or access gate — even when the gate looks trivially circumventable. A genuine login through the app's real sign-in UI, with user-provided inputs, is allowed; bypass never is. Read ./references/authenticated-capture.md the moment a login redirect appears. |
| MUST | Escalate every blocker (missing URL, unreachable page, login redirect, unexpected content, missing target component, failed command) back to the caller immediately with exact details. Never stop silently, and never ask the user directly from a subagent. |
| MUST | Report a trivially bypassable access gate as a potential security vulnerability in the escalation notes — flag it, never exploit it. |
| NEVER | Judge visual correctness, modify UI code, tests, or design artifacts. |
Define and create the artifact directory FIRST:
UI_VERIFICATION_DIR="specifications/<task-id>/ui-verification" # or specifications/<page-slug>/... when no task id exists
ARTIFACT_DIR="$UI_VERIFICATION_DIR/iteration-<N>"
FIGMA_EXPECTED="$UI_VERIFICATION_DIR/figma-expected.png"
mkdir -p "$ARTIFACT_DIR"
Keep any state-save file outside specifications/**, in a git-ignored temp path.
Ensure the shared Figma reference when the caller provided a Figma URL:
reuse a valid existing $FIGMA_EXPECTED (Figma URL/node unchanged), otherwise
export it now via the Figma MCP node-image export. Export failure → stop and
escalate before opening the app page.
Open a named session — playwright-cli open -s <session-name>.
Resize to the Figma frame width — playwright-cli resize <figma-width> 1080 -s <session-name>.
The height here sizes the browser window, nothing more — it is NOT the boundary
of the evidence. When the page scrolls past it, the screenshot must still show
everything (step 6).
Navigate to the full pinned URL including query params —
playwright-cli goto <full-url> -s <session-name>.
Stabilize the render —
playwright-cli run-code -s <session-name> "async page => { await page.emulateMedia({ reducedMotion: 'reduce' }); await page.waitForLoadState('networkidle'); }".
Add route mocks only when the task explicitly requires deterministic data; mask
known dynamic regions (timestamps, avatars, ads) when unavoidable.
Screenshot — full page, mandatory, verified. Use
playwright-cli run-code -s <session-name> "async page => { await page.screenshot({ path: '$ARTIFACT_DIR/actual.png', fullPage: true }); }"
as the primary command — the plain screenshot subcommand captures the viewport,
and a viewport shot of a scrolling page is clipped evidence that fails review.
Then PROVE it is full-page: compare the PNG's pixel height against the page's
document.documentElement.scrollHeight; when the page scrolls beyond the
viewport and the image is not taller than the window, the capture is invalid —
retake it, never ship it.
Accessibility snapshot — playwright-cli --raw snapshot -s <session-name> > "$ARTIFACT_DIR/a11y-snapshot.yml".
Computed styles — playwright-cli --raw eval -s <session-name> "JSON.stringify(...)" > "$ARTIFACT_DIR/computed-styles.json".
The payload covers every major container and control under verification: bounding
boxes, computed width/height, max-width, min-height, padding, margin, gap,
alignment-relevant properties, and targeted style values needed to explain
differences. Measure the VISIBLE rendered box — the element that paints the
border and background — never only an inner input or text node. A component
library commonly wraps the real control, so find the box by asking which ancestor
paints a border or background rather than by hard-coding any library's class
names, and capture both that box and the inner control, labeled so the reviewer
knows which is which; the design is compared against the box.
Confirm artifacts landed — ls -la "$ARTIFACT_DIR": all three files present
there, and $FIGMA_EXPECTED present at the shared root. Anything in
.playwright-cli/ or the working directory → move it or re-run with the explicit
path. Missing figma-expected.png → go back to step 1 and export it.
Clean up — playwright-cli close -s <session-name>, also after aborts.
Exception: when the caller says the verification loop continues, leave the named
session open and report its name — the next iteration reuses the browser and its
login instead of paying for both again. The caller owns closing it when the item
ends.
open or goto non-zero → escalate immediately; never continue silently../references/authenticated-capture.md;
without prepared inputs, return the exact derived env var names to the caller.These are pre-verification blockers: the pass result is VERIFICATION NOT RUN, it
consumes no iteration budget, and capture reruns after the blocker is resolved.
| Reference | Load when | Covers |
|---|---|---|
| playwright-cli commands | Before running any playwright-cli command, or when a command's exact syntax or fallback is needed | Install and npx fallback, sessions, navigation, snapshots, --raw, eval, screenshots, run-code, route mocking, state save/load |
| Authenticated capture | The page redirects to login, auth inputs were provided, or an access gate blocks capture | The TSH_UI_LOGIN_* env contract, field-key derivation, .env reload, storage-state reuse, non-standard auth fallbacks, secret handling |
verifying-ui — the judging standard these artifacts
feed; preloaded by ui-reviewer, not model-invocable.reviewing-ui — orchestrates capture plus judgment as one pass.What SKILL.md sets; muted values are Claude Code's defaults
Trigger on: collecting ACTUAL evidence from a running app for UI verification, running playwright-cli capture commands, exporting the shared Figma reference image, or resolving a capture blocker such as a login redirect. Judging the artifacts is the ui-reviewer agent's job; running a full capture-and-judge pass is reviewing-ui.
npx claudepluginhub thesoftwarehouse/agentic-collections --plugin tsh-product-engineering8 skills in this plugin
/creating-implementation-plansWrites TSH's implementation plan as a committed file at specifications/<task-id>/<task-name>.plan.md: phased tasks that each name their files and a verifiable Definition of Done, technical context persisted for implementers, explicit parallel groups. Use when a plan, spec, or task breakdown is asked for — a plan kept outside the repository cannot be committed, reviewed in a PR, or read by an implementer subagent./debugging-codeFinds and fixes the root cause of a bug: pins the symptom, reproduces it, secures a failing test — existing, corrected or new — narrows to the cause with evidence rather than plausibility, measures how far the fix reaches before applying it minimally, and keeps the test as a regression guard. Use when code behaves wrongly and the cause is not yet known — load it before reading, searching, or editing the code, because locating the cause is this skill's own first step, not something to do before it./discovering-technical-contextEstablishes which conventions a change must follow before it is written, in priority order: the plan's persisted technical context, then project instructions (CLAUDE.md, .claude/rules, decision records), then existing codebase patterns, then external documentation. Use to answer 'how does this project do X' or to fill a plan's Technical Context section./orchestrating-feature-implementationImplements a feature, ticket, or plan end to end from the main conversation: confirms a plan file exists, delegates each task to implementer subagents — in parallel where the plan allows — gates on their reports, then closes with the plan's final verification phase: code review and functional verification in parallel. Use for any feature request or multi-file change, before the first file is edited./reviewing-codeTSH's pre-merge review of a delivered change set — a pasted diff, a task, or a PR: reads the plan and requirements first, compares the implementation against what was agreed, judges test coverage per layer, runs the project's tests, linters and build when they are available, then checks high-risk anti-patterns, security, and scalability. Use when a change must be judged for merge readiness, whether it arrives as a pasted diff or a branch, against its plan or acceptance criteria when those exist./reviewing-uiRuns one UI verification pass against Figma: delegates fresh Playwright-CLI capture of the running app to ui-capture-worker, then the design comparison to ui-reviewer, and returns PASS, FAIL, or VERIFICATION NOT RUN with a complete difference table. Read-only — it never fixes code. Use when asked to verify implemented UI against a Figma design or check whether a page matches its design.Other plugins' skills for the same job