alirezarezvani/claude-skills / product-team/design-qa/skills/design-qa
design-qa
VerifiedUse when a UI screen, page or component is about to be called done, handed off or shipped, or when generated UI looks generic or half-finished. Gates the rendered result, not the design file - finds controls that do nothing, placeholder copy, removed focus rings, missing loading/empty/error states, low contrast, small targets, hidden focus and broken reflow measured in the real browser, and flags template defaults without blocking on taste.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.5 KB |
| assets/capture_snapshot.mjs | script | 3.4 KB |
| assets/collect_snapshot.js | script | 9.6 KB |
| assets/finish_signoff.md | markdown | 1.8 KB |
| assets/snapshot.example.json | config | 3.1 KB |
| assets/states.example.csv | other | 1.2 KB |
| assets/waivers.example.csv | other | 263 B |
| references/generic_ui_defaults.md | markdown | 6.4 KB |
| references/interaction_states.md | markdown | 5.9 KB |
| references/rendered_checks_wcag22.md | markdown | 6.7 KB |
| scripts/finish_lint.py | script | 17.8 KB |
| scripts/rendered_audit.py | script | 16.9 KB |
| scripts/state_matrix_checker.py | script | 11.8 KB |
assets/capture_snapshot.mjs
View on GitHub// design-qa: capture a rendered snapshot with a real keyboard focus pass.
//
// Needs Node 18+ and Playwright in the project you run it from
// (npm i -D playwright && npx playwright install chromium). Runs locally against
// the URL you give it; sends nothing anywhere else.
//
// node capture_snapshot.mjs <url> [--width 1440] [--height 900] [--tabs 200] [--out snapshot.json]
//
// Run it at least twice: once at --width 320 (reflow, WCAG 1.4.10) and once at
// your main desktop width. Then: python scripts/rendered_audit.py --snapshot snapshot.json
import { readFileSync, writeFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { createRequire } from 'node:module';
// Resolve Playwright from the project you run this in (this file usually lives in
// a plugin cache with no node_modules of its own).
const req = createRequire(join(process.cwd(), 'noop.js'));
let chromium;
for (const mod of ['playwright', '@playwright/test', 'playwright-core']) {
try { ({ chromium } = req(mod)); break; } catch { /* try the next one */ }
}
if (!chromium) {
console.error('Playwright not found from ' + process.cwd() + '. Run: npm i -D playwright && npx playwright install chromium');
process.exit(3);
}
const args = process.argv.slice(2);
const url = args.find(a => !a.startsWith('--'));
const opt = (name, dflt) => { const i = args.indexOf('--' + name); return i >= 0 ? args[i + 1] : dflt; };
if (!url) { console.error('usage: node capture_snapshot.mjs <url> [--width N] [--height N] [--tabs N] [--out FILE]'); process.exit(3); }
const width = Number(opt('width', 1440)); const height = Number(opt('height', 900));
const tabs = Number(opt('tabs', 200)); const outFile = opt('out', `snapshot-${width}.json`);
const collector = readFileSync(join(dirname(fileURLToPath(import.meta.url)), 'collect_snapshot.js'), 'utf8');
const browser = await chromium.launch();
try {
const page = await browser.newPage({ viewport: { width, height } });
await page.goto(url, { waitUntil: 'networkidle' });
await page.addScriptTag({ content: collector });
const snap = await page.evaluate(() => window.designQaSnapshot({ focus: false }));
const byId = new Map(snap.elements.map(e => [e.id, e]));
const PROPS = ['outlineStyle', 'outlineWidth', 'outlineColor', 'boxShadow', 'borderColor', 'backgroundColor', 'textDecorationLine', 'color'];
const seen = new Set(); let wrapped = false;
await page.mouse.move(0, 0);
for (let i = 0; i < tabs; i++) {
await page.keyboard.press('Tab');
const probe = await page.evaluate(() => window.designQaFocusProbe());
if (!probe) continue;
if (seen.has(probe.id)) { wrapped = true; break; } // wrapped around
seen.add(probe.id);
const el = byId.get(probe.id);
if (!el) continue;
const changed = el.rest ? PROPS.filter(k => el.rest[k] !== probe.styles[k]) : [];
el.focus = { indicator: probe.outlineOn || probe.shadowOn || changed.length > 0, obscured: probe.obscured, how: 'keyboard', changed };
}
for (const e of snap.elements) if (e.interactive && !e.disabled && !e.focus) e.focus = { indicator: null, obscured: null, how: 'not reached by Tab' };
snap.keyboard_pass = { reached: seen.size, wrapped };
writeFileSync(outFile, JSON.stringify(snap, null, 1));
console.log(`wrote ${outFile}: ${snap.elements.length} elements, ${seen.size} reached by Tab`);
} finally {
await browser.close();
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |