Responsive QA
Measure a UI change at phone, tablet and desktop widths and in WebKit before calling it fixed.
- Version
- 1.0.0
- Last updated
- Category
- QA
- Works in
- Claude Code, Codex, Cursor, T3 Code
- Requires
- node>=20, playwright (optional, for run.mjs and WebKit)
- Repository
- dxbh0517/skill-responsive-qa
Install
npx skills add dxbh0517/skill-responsive-qaFinds the skill folder in the repo and installs it for the agents it detects.
Say this
- check it on mobile
- it's overflowing
- cut off on mobile
- still broken on Safari
- responsive QA
Or call it by name where your agent has slash commands: /responsive-qa.
SKILL.md
name | responsive-qa |
|---|---|
description | Prove a web UI change works on phone, tablet, and desktop and in Safari/WebKit before calling it fixed — measures horizontal overflow, clipped or off-screen content, modals taller than the viewport, unwrapped long text, sticky/fixed bars, tap-target size, and WebKit-only breaks such as backdrop-filter, with screenshots per width, and checks the change reuses the project's own components. Use after any web UI change, and when the user reports "overflowing", "not fully visible", "cut off", "covering", "doesn't extend to the top", "broken on mobile", "check it on mobile/tablet", or "still showing on Safari". Not for redesigning or restyling a page (design-pass), testing whether features work end to end (feature-audit), performance or Lighthouse audits, native iOS/Android app screens, or unit tests. |
Responsive QA
"Fixed" means measured, not eyeballed at one width. Run this before telling the user a layout bug is fixed or a UI change is done.
Harness notes
| Need | T3 Code | Claude Code / Codex / Cursor / other |
|---|---|---|
| Open, resize, measure | preview_open, preview_resize, preview_evaluate with layout-check.js | node scripts/run.mjs <url>… (Playwright) does every width, check, and screenshot in one go |
| Screenshot | preview_snapshot / screenshot tool | saved by run.mjs |
| WebKit | Playwright (below) | run.mjs --webkit |
Output folder: the harness scratchpad if it has one, else
${TMPDIR:-/tmp}/responsive-qa/<repo>-<YYYYmmdd-HHMM>/. Write into the repo
only when the user asks.
1. Targets
- The pages the change touches (and the page the user reported, by URL).
- Widths: 390×844 (phone), 768×1024 (tablet), 1440×900 (desktop). Add 360 when the user reported a mobile bug.
- Engines: Chromium plus WebKit whenever the user mentioned Safari or
iOS, or the change touches
backdrop-filter,position: sticky, viewport units,mask, or scroll snapping. - States that matter: open modal/sheet, long content (longest real title in the data), empty state, logged-in vs. logged-out if both render the page.
2. Measure in the browser
Outside T3, run the script (needs playwright resolvable from the project or
the current folder; it says how to install it if not):
node <skill>/scripts/run.mjs http://localhost:3000/ http://localhost:3000/cart \
[--mobile-bug] [--webkit] [--out <dir>]It writes <page>-<engine>-<width>.png, report.json, and report.md;
exit 0 = all pass, 1 = issues. States behind a click (open modal) still need
a manual pass: open the state, then evaluate
scripts/layout-check.js (paste the file's contents
as the expression).
In T3: for each page × width, preview_open, preview_resize, wait for
content, preview_evaluate the file's contents. For sticky bars, scroll one
screen and evaluate again (sticky bars only stick once scrolled).
The check returns JSON:
overflowX— page wider than the viewport, and the elements causing it.offscreen— visible elements cut off by the viewport edge.clipped— elements whose content is cut off byoverflow: hidden(truncated text, cropped images) without an ellipsis.tallDialogs— dialogs/sheets taller than the viewport with no scrolling.smallTargets— buttons and links under 44 px in either dimension on touch widths (inline text links exempt). Advisory: does not failpass.stickyGaps— sticky/fixed bars that do not reach the edge they stick to.
Take a screenshot at each width as evidence. Read the screenshot too: the script misses overlap and z-index problems a look catches immediately.
3. WebKit check
run.mjs --webkit, or by hand:
npx playwright install webkit # once
npx playwright screenshot --browser=webkit --viewport-size="390,844" --full-page <url> "$OUT/<page>-webkit-390.png"$OUT is the output folder above. Compare with the Chromium shot. If WebKit
cannot run on this machine, say so and review the CSS for the known breaks in
references/webkit.md instead. Never claim Safari is
fixed without either a WebKit screenshot or that review.
4. Component and token check
On the diff (git diff <base>...HEAD -- '*.tsx' '*.jsx' '*.vue' '*.svelte' '*.astro' '*.css'):
- New modal, dialog, sheet, button, input, select, table, chart, or toast
markup where the project already has one in
components/ui/(shadcn) or its shared kit → replace it with the existing component. - Hard-coded colors, radii, or shadows where tokens exist → use the tokens.
5. Fix loop
Fix what the checks found, then re-run only the failing page × width. Common
fixes: min-width: 0 on flex/grid children, overflow-wrap: anywhere on
user titles, max-height: 100dvh plus internal scroll on dialogs,
object-fit: contain when the whole image must show, removing a fixed width.
6. Report
A small table: page × width × engine → pass, or the issue and the fix
(report.md from run.mjs is this table). Attach the after screenshots for
the pages the user reported. State plainly anything you could not test (for
example WebKit unavailable).
Files
Changelog
[1.0.0] - 2026-11-28
Added
scripts/run.mjs: Playwright runner that opens each URL at 390×844, 768×1024, 1440×900 (+360 with--mobile-bug) in Chromium and optionally WebKit (--webkit), injectslayout-check.js, saves full-page screenshots, and writesreport.json+report.md. Replaces the manual paste-into-evaluate step outside T3 Code.- Harness notes: T3 Code
preview_*tools, Playwright everywhere else. - Node tests for the layout rules and the runner; optional e2e CI job on static fixtures.
skill.json, trigger evals, CI, README.
Changed
- Moved the skill to
skills/responsive-qa/. - Screenshots and reports go to the scratchpad or
${TMPDIR:-/tmp}/responsive-qa/<repo>-<stamp>/, not/tmpdirectly. layout-check.jskeeps working as one browser expression but exposes its pure rules when evaluated outside a browser.
Fixed
clipped: judged per axis. An element withoverflow-x: hiddenwhose content scrolls vertically is no longer reported as clipped.clipped: an image or video that has not loaded (0×0 natural size) no longer counts as a hard crop.smallTargets: a target under 44 px in either dimension is flagged (a 200×20 button was missed); inline text links are exempt.stickyGaps: an unscrolled sticky header that sits below other content is no longer a false gap; sticky bars are judged after scrolling. Fixed bars pinned tobottom: 0are now checked too.tallDialogs: a dialog inside a scrolling overlay counts as scrollable.overflowX.culpritsprefers elements outside horizontal scrollers (carousels are no longer listed as the cause).