Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add zakariaf/Flutter-Skills --skill widget-golden-and-a11y-testinggit clone --depth 1 https://github.com/zakariaf/Flutter-SkillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/zakariaf/flutter-skills/widget-golden-and-a11y-testing)<a href="https://agentmods.dev/skills/zakariaf/flutter-skills/widget-golden-and-a11y-testing"><img src="https://agentmods.dev/badge/skills/zakariaf/flutter-skills/widget-golden-and-a11y-testing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/zakariaf/flutter-skills/widget-golden-and-a11y-testing"><img src="https://agentmods.dev/badge/skills/zakariaf/flutter-skills/widget-golden-and-a11y-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00223 | $0.03900 |
| Opus 5 | $0.00112 | $0.01950 |
| Sonnet 5 | $0.00045 | $0.00780 |
| Haiku 4.5 | $0.00022 | $0.00390 |
Grade A, and why
widget-golden-and-a11y-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 286 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Widget, golden and accessibility testing
One harness pins the surface; layout and accessibility are asserted by computed
geometry on the real widget tree, not by blessed pixels. Goldens are a narrow,
honest safety net for glyph shaping and mirroring — never the layout gate. This
skill covers the widget tier; for the pure-core / Drift / Notifier tiers see
testing-strategy.
Read the reference for the task at hand:
references/harness-and-mediaquery.md— pumpApp, Device presets, the four load-bearing lines, driving MediaQuery flags, finder policy.references/overflow-and-textscale.md— the two overflow classes, the three traps, the matrix, the fit assertion, and the four wrong fixes.references/a11y-guidelines-and-limits.md— the four built-in guidelines and their defects, the semantics/traversal gate, pure-Dart contrast, and what automation genuinely cannot cover.references/golden-two-lanes.md— the golden-refusal argument, the Ahem-vs-real-font lanes, RTL goldens, and blocking accidental blessing.
Run scripts/check-test-hygiene.sh before a PR.
Non-negotiable rules
- Pin the device on every layout/geometry test. The default widget surface
is 800x600 logical — wider than any phone. Unpinned, content is ~2x too
wide, everything fits, the suite is green, and the shipped phone is broken.
useDevice(...)first,pumpApp(...)second. physicalSizeis in PHYSICAL pixels — always multiply by DPR.view.physicalSize = Size(320, 640)at the default DPR 3.0 is a 107x213 logical surface, not a phone. SetdevicePixelRatioandphysicalSize = logical * dpr, thenaddTearDown(view.reset)— a leaked size poisons every later test in the file.- Layer
MediaQueryABOVEMaterialApp, built from.copyWith.MaterialAppinserts no MediaQuery of its own; the one frompumpWidget'sViewis nearest. A bareMediaQueryData()zeroes the view-derived size the device just pinned — the test then measures a 0x0 screen and passes. pump(), neverpumpAndSettle()as an animation wait.pumpAndSettlecarries a 10-minute timeout and truncates its stack trace, and hangs forever on an infinite splash/shimmer/spinner. Usepump()for state changes andpump(duration)/fakeAsyncfor timer-driven async —pump()does not advance the fake clock.- Never suppress overflow. A
RenderFlexoverflow already fails a widget test (it routes throughFlutterError.reportErrorand the binding rethrows at test end). Never calltakeException()to swallow it, never assignFlutterError.onError, never copyignoreOverflowErrors, and nevertakeException()in a globaltearDown— each disarms the whole net. - One
testWidgetsper (device, scale, bold) tuple — never a loop inside a test. Overflow is reported once per RenderObject (the flag resets only onreassemble()), so looping scales inside one test silently under-reports every scale after the first. Loop around thetestWidgetscall. - Assert the fit, not just absence of overflow. A clipped
Textreports nothing —RenderParagraphhas no overflow indicator.takeException(), isNullis necessary but not sufficient; add agetSize/getRectassertion that the label fits inside its computed cell. - Prefer computed geometry over goldens for layout. Assert cells in a row
share a
topand cells in a column share aleft(moreOrLessEquals,epsilon: 0.5); assert tap targets with agetSizeloop. These fail with a sentence a human can act on. Goldens cannot assert anything — a blessed screen of clipped, unreadable text passes forever. - Assert contrast on colour VALUES in pure Dart, never on pixels.
meetsGuideline(textContrastGuideline)screenshots and histograms the layer — white text on#FAFAFApasses (an open Flutter defect). A pure-Dart WCAG + APCA test on the theme's colours cannot false-pass. For a state pair distinguished only by chroma (selected vs surface at equal luminance), assertwcag(theme.selected, theme.surface)directly — a grayscale-mode user perceives exactly that luminance gap, so no separate grayscale channel is needed. await expectLater(...)formeetsGuideline— it returns anAsyncMatcher. A plainexpect()looks right and asserts nothing. Keep the four built-in guidelines only as advisory tripwires; the geometry and pure-Dart contrast tests are the gate.- Two golden lanes, both
loadAppFonts(); block accidental--update-goldens. Ahem squares are byte-stable cross-OS and prove geometry/mirroring but not glyph shaping; one narrow real-font lane on a pinned OS proves script joining and numeral glyphs. Tag every golden@Tags(['golden'])and generate blessed files in one pinned environment only. - Never clamp
TextScaler.withClampedTextScaling,textScaleFactor, andFittedBoxdefeat the matrix while contrast and tap-target stay green, and override the user's own OS setting. Fix the layout, not the text.
What ships with it
8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/a11y_test.dart 5.2 KB
- examples/harness.dart 3.8 KB
- examples/overflow_matrix_test.dart 5.2 KB
- references/a11y-guidelines-and-limits.md 11 KB
- references/golden-two-lanes.md 5.2 KB
- references/harness-and-mediaquery.md 6.2 KB
- references/overflow-and-textscale.md 8.6 KB
- scripts/check-test-hygiene.sh 4.5 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 286 lines · 223 tokens per session scan A ee8df72098ca
widget-golden-and-a11y-testing is a skill published in the GitHub repository zakariaf/Flutter-Skills (2 stars, last pushed 13d ago), licensed MIT. It adds 223 tokens to every session and 3,900 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
e2e-testing
Guide for running end-to-end tests of the Qwen Code CLI, including headless mode, MCP server testing, and API traffic inspection. Use this skill whenever you need to verify CLI behavior with real model calls, reproduce user-reported bugs end-to-end, test MCP tool integrations, or inspect raw API request/response…
terminal-capture
Automates terminal UI screenshot testing for CLI commands. Applies when reviewing PRs that affect CLI output, testing slash commands (/about, /context, /auth, /export), generating visual documentation, or when 'terminal screenshot', 'CLI test', 'visual test', or 'terminal-capture' is mentioned.
agent-reproduce-align
Use after a Codex or Claude Code feature has been implemented in Qwen Code to run the selected reference agent and Qwen Code under the same scenario, capture HTTP and terminal traces, compare request bodies, tool/function schemas, outputs, and iterate until the reproduced behavior is close enough.
cw-gates
Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.
codew-release-qa-sweep
Use before claiming Codewhale release work is done: run the full gate sweep and list the manual QA targets.
verify
Exercise the real app/API/CLI and collect observable evidence; tests alone do not count as end-to-end verification.