ux-test
Skill329 starsChanged 7 days agoMIT-0View on GitHub
Use for browser-driven UX testing of the web UI against a live stack (make ux-test): functional pass or fail per flow plus usability findings, optionally recorded.
In this repository42 other files it gives its agents.
- .claude/rules/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-modelSkill
- agent-capability-reviewSkill
- api-rbac-testSkill
- backend-lambdaSkill
- code-reviewSkill
- create-hf-dataset-prSkill
- curate-security-resultsSkill
- cut-release-changelogSkill
- dependabot-prsSkill
- documentationSkill
- extraction-pipelineSkill
- fix-single-issueSkill
- frontend-uiSkill
- full-test-batterySkill
- infrastructureSkill
- live-auth-checksSkill
- live-eval-and-costSkill
- prepare-changelogSkill
- prep-develop-for-releaseSkill
- product-demoSkill
- pr-review-ciSkill
- pr-reviewSkill
- releaseSkill
- release-validationSkill
- remove-classification-flat-keysSkill
- repo-quality-reviewSkill
- run-benchmarksSkill
- run-stack-testsSkill
- srt-security-scanSkill
- sync-pii-anonymizerSkill
- testing-qaSkill
- test-upgradeSkill
- transform-deploy-testSkill
- ui-i18nSkill
- update-solution-profileSkill
- ux-test-ciSkill
- ux-test-stories-ciSkill
- ux-test-storiesSkill
- work-the-backlog-hazardsSkill
- work-the-backlogSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this when the user wants the web UI looked at by a person's standards — "let's test the UI", "review the UX", "does the annotation flow …
- Distinctive: line 24
Drive the browser and look at screenshots: Never report on a screen you did not load.
- Distinctive: line 63
Verify before going further — this must return JSON, not 404 and not nothing:
- Very specific: line 81
If the port does not answer, the usual cause is a Chrome already holding it.
- Very specific: line 82
Check with lsof -nP -iTCP:9222 -sTCP:LISTEN, and never start a second Chrome on a port another Chrome holds — they split across IPv4 and …
- Very specific: line 118
If list_pages reports it cannot connect, re-check step 2 rather than trying other flags.
- Distinctive: line 194
Look for what only the French shows: English left on a French screen, text cut off by its layout, a placeholder shown raw, a term wrong for …
- Distinctive: line 201
Use this when the user wants a video of the review — "record the walkthrough", "make something the team can watch".
- Very specific: line 266
Write the report into <session>/review.md — the skeleton is there, in the format under Reporting — the same text you put in the transcript.
- Distinctive: line 341
Is the next action discoverable without documentation?: If you needed to already know where something was, that is a finding.
- Distinctive: line 384
Don't report a screen you didn't load: If the browser is unreachable the review is blocked — say so.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: UX review the web UI in a browser — GenAI IDP Accelerator
Use this when the user wants the web UI looked at by a person's standards — "let's test the UI", "review the UX", "does the annotation flow make sense", "suggest UI improvements", "walk the annotation flow".
This is the one gap in the project's test coverage. There is a lot of testing
already (make test, api-test, stacktest-*, SRT, ZAP, benchmarks) and none of
it opens a browser, so everything below the UI can be green while a button does
nothing or a mode is unexplained. That is not hypothetical: correcting a
document's classification in a test set shipped broken for several versions and
was found in the field.
This is primarily a visual review, not an acceptance-test suite. The deliverable is feedback a designer or engineer can act on, with functional breakage reported when you trip over it. Weight it that way: a flow that works but confuses everyone who tries it is the finding this exists to produce.
Drive the browser and look at screenshots. Never report on a screen you did not load.
Setup — one time, then never again
Assumes a disposable dev stack. Do not point this at anything in production uses: the review saves edits, re-extracts documents and can reset labels.
Nothing stops a review you drive yourself from doing that. The unattended MR review
(scripts/sdlc/ai_ux_test.py, in CI and through run_in_docker.py review) is
different: it runs on a shared stack, and every click, key and edit its session
makes passes the first-time-user stories' commit guard before it reaches the
browser, which refuses each control that would commit (see
ux-test-ci.md).
1. Install the browser MCP server (once)
claude mcp add chrome-devtools -- npx -y chrome-devtools-mcp@latest \
--browserUrl http://127.0.0.1:9222 --redactNetworkHeaders--redactNetworkHeaders matters: the session carries Cognito bearer tokens and
they would otherwise land in the transcript.
Then restart Claude Code — MCP servers load at session start, so the tools are absent until it restarts.
2. Launch a debug Chrome with its own profile (once)
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
--remote-debugging-port=9222 \
--user-data-dir="$HOME/.cache/chrome-idp-ux" \
--no-first-run --no-default-browser-check >/dev/null 2>&1 &Verify before going further — this must return JSON, not 404 and not nothing:
curl -s http://127.0.0.1:9222/json/versionThe dedicated --user-data-dir is mandatory, not a preference. Chrome ≥136
silently ignores --remote-debugging-port on the default profile: Chrome
starts normally, but the port never answers and nothing explains why. This is a
deliberate Chrome hardening — remote debugging on the everyday profile would
expose every signed-in cookie to any local process — so it is not going to come
back. Do not offer "reuse your normal profile" as an option; it does not work on
any current Chrome.
Consequence, worth stating to the user up front so it is not a surprise: the
reviewer signs into the stack once in this profile. The profile persists at
~/.cache/chrome-idp-ux, so it is a one-time cost, not per-run.
If the port does not answer, the usual cause is a Chrome already holding it.
Check with lsof -nP -iTCP:9222 -sTCP:LISTEN, and never start a second Chrome on
a port another Chrome holds — they split across IPv4 and IPv6 on the same number
and the browser can hang.
3. Get the stack URL and make sure they are signed in
AWS_PROFILE=default ./scripts/ux_test_session.py url <STACK_NAME> --region <region>AWS_PROFILE=default because the ambient sandbox credentials point at a
different account (see CLAUDE.md). A stack is invisible from the wrong region;
if the name is not found the script lists the IDP stacks it can see.
Then have the user open that URL in the debug Chrome and sign in as themselves. First run in a fresh profile means an actual sign-in; after that the profile remembers it.
Known bug on a cold sign-in: a fresh profile can land on a blank page after valid credentials (a credential-fetch race the app does not recover from). A reload fixes it. If it happens, that is not your review finding — it is already written up; just reload and carry on.
Gotchas, all of them measured rather than assumed
- Chrome ≥136 ignores
--remote-debugging-porton the default profile — silently, so it looks like the flag worked. A dedicated--user-data-diris required. See step 2. --remote-debugging-porthas no effect on an already-running Chrome either; a second launch hands off to the existing process and CDP stays off.chrome://inspect/#remote-debuggingdoes not work with this tool. It opens the port but serves no HTTP discovery endpoints (/json/version→ 404), and--autoConnectand--wsEndpointboth time out against it. The toggle is also transient — it switches itself off. Do not recommend it.- Never launch a second Chrome on a port another Chrome already holds. They split across IPv4 and IPv6 on the same port number and the browser can hang.
- If
list_pagesreports it cannot connect, re-check step 2 rather than trying other flags.
The exception: reviewing as an Annotator
An annotator sees different navigation and only their assigned test sets, and you cannot get there by reusing an Admin session. Only for that:
AWS_PROFILE=default ./scripts/ux_test_session.py setup <STACK> \
--group Annotator --region <region>
# ... review, then run the teardown command it printsThis creates a real Cognito user with a known password in a live pool, so
always run the teardown it prints — nothing else expires that account. The
stack's app client is not modified: admin-set-user-password --permanent is a
user-pool admin API and ignores the client's ExplicitAuthFlows, and the browser
signs in over SRP, which the UI client already allows. For every other persona,
skip this entirely — the reviewer's own account is fine on a disposable stack.
Where the use cases come from
Whatever the user asks for, first. "Look at the annotation flow", "review the config editor", "here are three things users struggled with" — take it and go. No file needs editing to review something new, and a use case someone brings today is worth more than one written down months ago.
scripts/ux_flows.yaml is the fallback and the memory, not the definition of
scope. It earns its place by holding the two things a runtime prompt cannot:
- Preconditions. Flow 6.1 needs a misclassified document and no shipped test set has one. A user asking for a classification review will not think to say that, and without it the review silently looks at the happy path only.
- Regression memory. The flows that broke before — class correction most of all — keep getting looked at even when nobody remembers to ask.
So: use the user's list when there is one, fall back to the file's p0 flows when
they just say "test the UI", and read the file's setup notes either way in case
the thing they asked about needs a fixture that does not exist yet.
Worth writing a recurring use case into the file after reviewing it, once you know what it actually needs. Adding it beforehand tends to encode a guess.
Running the review
scripts/ux_flows.yaml holds the fallback flows: id, persona, priority, steps,
and ux_watch prompts. Treat it as a list of things to go and look at, not a
checklist to tick. Start with p0.
Work one flow at a time: load the screen, take a screenshot, look at it, say what
you notice. Prefer take_snapshot for structure and take_screenshot when the
finding is visual (spacing, hierarchy, whether something reads as a button).
Some flows need a document that is wrong in a specific way — 6.1 and 11.1 need a misclassified document, and no shipped test set has one. The YAML says how to make one. If a precondition cannot be met, report the flow blocked with the reason, not passed and not failed.
Check what is actually deployed. These flows cover recent work; if a feature is only on an unmerged branch, the stack will not have it and the flow is blocked, not broken. Say which, so nobody chases a phantom bug.
Reviewing in French (Canada)
For a release, and for a change to translated screens, run the flows again in
fr-CA. Switch the signed-in UI the way signin.set_locale
(scripts/ux_runner/signin.py) switches it for the unattended reviews: with
evaluate_script, set the localStorage key idp-locale to fr-CA and reload,
then go on once <html lang> is fr-CA and the sidebar's stack name has left its
English label, which is when the catalog has arrived. A person does the same from
the language menu in the top navigation. The choice stays in the debug profile, so
switch back to en the same way when you finish.
Look for what only the French shows: English left on a French screen, text cut off by its layout, a placeholder shown raw, a term wrong for its place. Whether a message means what its English means is the catalog review's question (ui-i18n.md), not this one's.
Recording a review (optional)
Use this when the user wants a video of the review — "record the walkthrough",
"make something the team can watch". If they want a product demo — a video that
shows a feature to other people and ends on takeaways rather than findings — use
.claude/skills/product-demo/SKILL.md instead; it drives the same recorder with
--kind demo. The review is the same review; the recorder is a sidecar that captures the tab you are driving and turns your
narration into speech afterwards. Nothing about how you drive the browser changes.
Before you start
make ux-record-deps— ffmpeg, ffprobe, boto3 and Pillow must all be present.- The Chrome window must be visible, unminimized and not covered, with the
reviewed tab in front. macOS stops compositing an occluded window and the
screencast stops with it;
./scripts/ux_recorder.py statussaystab visible Falsewhen that happens. Do not resize the window mid-review, and keep DevTools closed in that tab. ./scripts/ux_recorder.py targetslists the debuggable tabs. The MCP'slist_pagesids are not these ids; pick the tab by a URL fragment (--url-contains cloudfront) or by the id this prints (--target).
The cadence
./scripts/ux_recorder.py start --stack <STACK> --persona Admin --flow 5.1 \
--url-contains cloudfront \
--say "We are looking at the annotation queue for a lending test set."
# before EACH group of browser actions:
./scripts/ux_recorder.py mark "Open the annotation queue" \
--say "We open the annotation queue from the test set's page."
# ... then do the MCP clicks / fills / snapshots for that step
./scripts/ux_recorder.py note "Spinner has no label" # something you noticed
./scripts/ux_recorder.py pause # before a long wait (re-extraction, sign-in)
./scripts/ux_recorder.py resume
./scripts/ux_recorder.py stop --say "That is the annotation flow as an admin sees it today."mark goes before the action, not after: the narration describes what is
about to happen, and the renderer holds the screen until the narrator has started
before the click lands. A mark without --say still starts a chapter.
The screenshots you take for your own judgement are not the video; the recorder captures what the tab shows, continuously, and every mark also takes a frame.
Every click is logged and drawn where it happened. The cursor overlay
reports each mousedown to the recorder with its coordinates, the element under
the pointer and whether that element was interactive; render prints a click
table and warns about any click that hit nothing interactive. A click made while
the recorder is paused is the exception: the recorder keeps only that it happened
and whether it hit anything interactive, so status counts it but the video and
the click table leave it out. In the video each
click is shown as a ring and pointer composited onto the last frame before the
click, held for --click-hold seconds (0.7) before the page changes — a
single-page app reacts within tens of milliseconds, so a marker drawn live would
land on the destination page instead. A marker away from the element you meant is
therefore not a drawing error — it is the automation missing, and the timeline
names what it hit. Seen
once so far: a wrapped table link whose centre was computed before two flash
messages shifted the table, so the click landed on the page header. If a click
does not do what you expected, check status (it counts clicks on nothing
interactive) before blaming the UI, and re-snapshot before clicking again.
After stop
- Write the report into
<session>/review.md— the skeleton is there, in the format under Reporting — the same text you put in the transcript. Its Findings entries become the end card. - Optionally edit
<session>/narration.md; only changed lines are re-synthesised. AWS_PROFILE=default ./scripts/ux_recorder.py render --voice Ruth. Run it with--dry-runfirst: it prints the pacing table, and a segment that is silent for more than a few seconds, or sits at the 3× speed ceiling, wants a better narration line or apausenext time.- Report the path of
review.mp4. Beside it:review.srt,segments.json(the chapter table, also written intoreview.md) andtimeline.json.
Narration style
First person plural, present tense, one or two sentences per mark. Say what the person is trying to do and what they see, not which element you clicked: "We correct the loan amount and save" rather than "click uid 14". No stack names, ids or selectors. Findings belong on the end card, not in the narration — the video shows the flow; the report judges it.
How the video is paced
The recorder receives a frame only when the screen changes, so your thinking time
between steps costs nothing. render clamps idle gaps, drops paused stretches,
holds each mark's frame while the voice starts, never fast-forwards past 3×, and
settles on the final state before the next chapter. Narration is Amazon Polly's
generative engine (Ruth by default; Matthew, Stephen, Danielle, Joanna, Salli,
Tiffany also work). Captions are embedded as an English subtitle track — toggled
in the player (QuickTime: View → Subtitles; VLC: Subtitle menu) — and written to
review.srt; --no-captions leaves the track out.
Privacy
A recording of a live stack shows real documents. Everything lands under
scratch/ux-recordings/ (gitignored); never commit it or attach it to a PR, and
say so when you hand over the path. The frames show the page exactly as it looked,
with nothing redacted: a password revealed by a show-password toggle is in the
video. Polly receives only the narration text you wrote; frames never leave the
machine.
Each click is also logged, with a label, in events.jsonl and timeline.json,
and render prints the same labels in its click table and quotes them in its
warnings. A click on a form field, an editable region (contenteditable, or a
textbox, searchbox or spinbutton role), a combobox or the Monaco code editor
is labelled by what names the field — its aria-label or aria-labelledby text,
its <label>, its placeholder, or its name, type or role, and never by text inside
the field — so a click on a filled password field is logged as the field's label,
not the password. A click on the code in Monaco logs as code, the role Monaco
gives the editor, for as long as nothing labels the editor element itself; Monaco
puts its own ariaLabel option on its hidden input instead. Any other click is
labelled by the page's own text, which can repeat what was typed or chosen: the
current choice on a dropdown's trigger button (Cloudscape's Select trigger is a
plain button), a date picker's calendar button, whose label names the selected
date, a token for a chosen option or filter, or an autosuggest option reading
Use: "…" with the typed value in it.
A click made while the recorder is paused is logged with no label and no position,
and render leaves it out of the video and the click table, so a pause around a
sign-in keeps what was clicked out of the click log as well as the video. The
session also records the tab's address, in session.json, timeline.json and
recorder.log, and its title, in session.json. Treat the session directory as
at least as sensitive as the video, and read render's click table and warnings
before copying any of it into review.md or anything you share.
What to look for
Beyond each flow's ux_watch notes. Each of these has already bitten this
product:
- Is the current mode obvious? A read-only field that looks like a greyed-out editable one is a real complaint about this UI.
- Is model output distinguishable from human-authored truth? They look alike here and mean opposite things. A machine draft styled as verified ground truth is the worst confusion available.
- Does a number explain itself? An accuracy figure with no sample size, or a metric named after the evaluator's internals, cannot be acted on.
- Is the next action discoverable without documentation? If you needed to already know where something was, that is a finding.
- Does an error say what to do? Stack traces, opaque codes and permanent spinners are all findings. Spinners especially — several bugs here presented as a UI that would not move.
- Is anything colour-only? Status by colour alone fails a colour-blind reviewer.
- Does the work feel finite? For a queue of hundreds of documents, can the reviewer see progress and stop cleanly?
Give a few specific, actionable observations rather than an exhaustive list. "The re-extract button doesn't say it discards confirmed labels until after you click it" is useful; "improve the information architecture" is not.
Reporting
Report every flow you opened, including the ones that were fine — a list of only problems is indistinguishable from a review that stopped after two screens.
🖱️ UX review — <stack>, <persona>, <date>
Looked at
✅ 5.1 Correct a field in the annotation queue works; 2 UX findings
❌ 6.2 Change a class and re-extract broken — <what happened>
⏭️ 11.1 Run-level classification errors blocked — not deployed
Findings (ranked; suggestion, not a demand)
5.1 <what you saw> → <what to change>
Functional breakage
6.2 <steps> → <observed> → <expected>
Not covered
<flows skipped, and why>State stack, persona and date: a UX review is a snapshot, and a stale one read as
current is worse than none. For a recorded review the same report also goes into
<session>/review.md, where render reads the Findings for the end card.
Don't
- Don't report a screen you didn't load. If the browser is unreachable the review is blocked — say so.
- Don't fix things mid-review. The report is the deliverable; fixing as you go means it describes code that no longer exists. Offer fixes afterwards.
- Don't restyle on a hunch. Cloudscape conventions and
.claude/skills/frontend-ui/SKILL.mdgovern; a suggestion that fights the design system is not an improvement. - Don't hide, minimize or resize the recorded tab while a recording is running, and don't record with DevTools or anything showing a bearer token in the frame.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

