Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

design-qe

БесплатноЗапускает вложенные скриптыНе проверен

Design QA for a web page against its design system. Measures, in a real browser, whether rendered colours, type and spacing match the design tokens…

benciumот bencium★ 508 звёзд на GitHub

Об этом скилле

design-qe

Five checks. Four are measured in the browser; one is opinion. The report keeps them apart, and any check that could not run says NOT measured and why. Never fill a gap with a guess, and never report a NOT measured check as a pass.

# Check Kind
1 Token conformance: rendered colour, font size, family, weight, spacing, radius vs the tokens Measured
2 Breakpoints: sideways scroll, text cut off or spilling, chart labels past the edge Measured
3 Screenshot baselines: pixel diff against approved screenshots Measured
4 Accessibility: axe-core rules plus measured text contrast Measured
5 Judgement pass: screenshots compared with what DESIGN.md asks for Opinion

All commands below run from the project being tested. $DQE means node <this skill folder>/scripts/dqe.mjs. Needs Node 20 or newer; no install step.

Browser

Use the browser the host gives you. The skill needs four abilities: run JavaScript in the page and get the result back, save a screenshot of the visible window to a file, resize the window, and move the pointer. How each host provides them is in references/browser-adapters.md. If the host lacks one, the checks that depend on it are NOT measured; say so in the report.

Run

  1. Do not ask the user for files. init finds the design sources itself: DESIGN.md (root, docs/, design/; YAML-frontmatter and table styles), token JSON (tokens.json, design-tokens.json, tokens/*.json; W3C or Tokens Studio format) and light-theme CSS variables in the usual global stylesheets (app/globals.css, src/index.css, ...). It also reads the dev server's port from package.json. Only if a Figma MCP server is connected and the user mentions Figma: call its variable tool (e.g. get_variable_defs) on the relevant frame, save the output as tokens/figma.json, and it will be picked up. Before starting a dev server, check the project's CLAUDE.md or PROJECT_STATE.md for rules about which database it may reach.

  2. Start the run from the project root:

    $DQE init [--path /pricing] [--widths 375,768,1280] [--mask ".clock,.avatar"] [--browser "<host browser name>"]
    

    Defaults: the home page, widths 375, 768 and 1280. If no dev server is answering, init says how to start it. --url, --design and --tokens override discovery when the user names something specific. Read the printed summary back to the user: which sources were used, and any kind with 0 values (e.g. no spacing tokens), which will be NOT measured. Conflicts between sources are listed too. Leave out --include-text unless the user asks: it copies page text into the findings, and pages can hold personal or patient data.

  3. Start the local server in the background: $DQE serve (port 8787; change with --port, on both init and serve). It serves the in-page script, saves results, and hosts the comparison page.

  4. Prepare the browser.

    • Resize the window to 1440x900 (or at least the largest width + 40px). Use the same size every run; baselines only compare against captures taken at the same window size.
    • Open the page in a new tab.
    • Load the checks. On a localhost page run:
      await new Promise((resolve, reject) => { const s = document.createElement('script'); s.src = 'http://localhost:8787/inject.js'; s.onload = resolve; s.onerror = () => reject(new Error('blocked')); document.head.appendChild(s); }); window.__dqe.info()
      
      If that is blocked, or the page is not on localhost, read <run folder>/inject.js and pass its whole content as the JavaScript to run. The result shows the run id and token counts.
    • Public (non-localhost) pages only: run window.__dqe.connect(), take a screenshot, and click the "Connect design-qe" button it shows, once per run. That opens a local receiver tab, so results save straight to the run folder instead of passing through the conversation. Browsers only allow that tab after a real click. Then switch back to the page's tab.
  5. For each width, in this order:

    1. await window.__dqe.openFrame(<width>). It returns ok, captureArgs and where to park the pointer. If ok is false, see "When a step fails" below.
    2. await window.__dqe.audit() then await window.__dqe.accessibility(). When saving works (localhost page, or a connected receiver) only a summary comes back. Otherwise the full JSON comes back with a saveNote; write it to the run folder as the file named there.
    3. Take a screenshot as its own call (this refreshes the pointer coordinates), then move the pointer to the bottom-right corner of the window as its own call.
    4. Take the capture: a screenshot saved to disk at full scale (in Claude in Chrome: save_to_disk: true, scale: 1). Smaller scales shrink the saved file and br
Полный SKILL.md на GitHub

Установить design-qe в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/browser-adapters.mdreferences/judgement-template.mdscripts/compare/compare.htmlscripts/compare/compare.jsscripts/compare/receive.htmlscripts/dqe.mjsscripts/inpage/00-core.jsscripts/inpage/10-tokens.jsscripts/inpage/20-layout.jsscripts/inpage/30-frame.jsscripts/inpage/40-axe.jsscripts/inpage/90-api.jsscripts/lib/bundle.mjsscripts/lib/design-md.mjsscripts/lib/discover.mjsscripts/lib/report.mjsscripts/lib/run-folder.mjsscripts/lib/server.mjsscripts/lib/token-files.mjsscripts/lib/token-kinds.mjsscripts/lib/tokens.mjsscripts/lib/yaml-lite.mjsscripts/package.json

FAQ

Что делает скилл design-qe?

Design QA for a web page against its design system. Measures, in a real browser, whether rendered colours, type and spacing match the design tokens (DESIGN.md, W3C/Tokens Studio JSON, Figma variables, CSS variables); finds overflow, clipped text and sideways scrolling at each screen width; compares screenshots with approved baselines; runs axe-core accessibility and contrast checks; then adds a clearly labelled opinion pass against DESIGN.md. Use when asked to check a UI against its design, run visual or design QA, check breakpoints, compare screenshots, or audit a page against DESIGN.md or Figma tokens.

Как установить скилл design-qe?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл design-qe запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить design-qe с