Communitygithub.com

designing-ui-with-research

Use before you edit a .tsx, .jsx or .css file, when a design page, plan or brief will show a user-facing screen, panel, editor, card or flow, and when the user asks for good, polished, "Apple-like" or professional UX. Holds the user's five UI rules. Use before the design reaches the user, before you commit a visible UI change, and again before the UI ships.

designing-ui-with-research とは?

designing-ui-with-research is a Cursor agent skill that use before you edit a .tsx, .jsx or .css file, when a design page, plan or brief will show a user-facing screen, panel, editor, card or flow, and when the user asks for good, polished, "Apple-like" or professional UX. Holds the user's five UI rules. Use before the design reaches the user, before you commit a visible UI change, and again before the UI ships.

対応~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/ValachPatrik/claude-code-config/tree/HEAD/skills/designing-ui-with-research

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Designing UI with research

The five UI rules

Every control, panel, menu and card you build or change follows these. Check each one before you commit a visible change, and name the rule in the commit when a change follows it.

  1. The most common actions come first; the rest fold under "Advanced", closed by default.
  2. Hide a control that cannot work; do not show it disabled. A short busy state where hiding would leave a one-option toggle may stay disabled, with a hint that says why.
  3. A tuned value has a mouse control (stepper, slider, presets, drag). What the mouse can do, the mouse may do; a bare number field is never the only way.
  4. A choice shows its current pick and opens its options on demand. Show as little as possible, as much as needed. A two-option toggle is fine; three or more options get a select or a menu.
  5. Things that are alike look alike. One look per kind of section, field, button, badge and row, in the new UI and in the app's existing panels.

Overview

A good UI design rests on four inputs that an agent skips under time pressure: what the best editors already do, what the repo already has, what accessibility demands, and what the real build looks like. Gather all four. Each one becomes a section of the design page.

Recipe: the UX section of the design page

The UX section holds these parts, in this order. A part that does not apply says so in one line.

  1. Where it lives. The screen it replaces or opens beside, and why. Name the repo panel it follows (for example the export panel).
  2. Mockups built from the repo's own components. HTML/CSS mockups that use the repo's tokens and primitive names, not grey wireframes. One per state: normal, empty start, locked or busy, error.
  3. Direct manipulation with an alternative for every drag. For each pointer action, the keyboard path and the field or button path (WCAG 2.5.7). Target size 24 px or more (2.5.8). Key map with the exact steps (1 px, Shift 10 px).
  4. State, undo and versions. Named undo items. Autosave rule. What the user sees while an agent or another user changes the same thing, and how they undo a whole agent turn.
  5. Empty start and first use. The choices on an empty screen, and one hint, not a tour.
  6. Look, language and access. Tokens, primitives, icon set, locales, live regions, focus return, reduced motion.
  7. Libraries: researched, and my call. A table of the options with their exact license and last release date, read from the repo or registry, and the verdict for each.

Research to do before writing the section

Run these in parallel subagents and keep only their conclusions:

InputWhat to collect
Outside practiceApple HIG (panels, toolbars, undo, drag and drop, feedback, keyboard), the closest Apple app (Pages, Keynote, Maps), WCAG 2.2 criteria that apply, human-and-AI editing patterns (Figma, Docs suggestions, Cursor). A source URL for each claim.
LibrariesOpen-source candidates with exact license, last release, fit, size. Mark anything unverified.
The repo's design languageTokens and where they live, UI primitives, the closest existing panel and its open/close, progress and error states, keyboard and drag code, locale files, accessibility patterns and tests. File:line for each.

Checks

  • Before the user sees the design: the design review reads the UX section as well.
  • Before the UI ships: an accessibility review of the built diff (the ecc:a11y-architect agent), then a browser run of each state with screenshots. When the feature copies or replaces an existing artifact (a form, a page), put the built output and the reference side by side in one image and compare them item by item.
  • Keep a state that a screen reader must hear. When you set a role or aria-label, remove visible text that carried a state (off, current, why), or wrap a control, keep the state for assistive technology. Use a native element or role, aria-disabled on a focusable control, or aria-describedby to hidden text. Test it with getByRole and toHaveAccessibleDescription. (3 confirmed misses: <button role="listitem">, a count in a labelled button, a grey span.)
  • Text that says what happens holds for every branch the code checks. When a role, a kind or another choice changes the behaviour, the text and the button label change with it. Test one case per branch. (2 confirmed: "sees all of its data" for a read-only member; "saves it right away" when a draft mode stops the save.)
  • A write reads again every query that shows what it changed: the detail, the list, the steps or history. Copy the full set from a precedent mutation of the same row. When the write starts background work, read again when that work ends, not at once. (2 confirmed: a settings Save missed the project list and the history; the list read came before the save ended.)
  • jsdom cannot show focus after rich-text editing, scroll position, overlap or clipping. Check those in the browser.
  • Before you commit a visible UI change, look at it in the branch build next to its mockup. A jsdom test does not show layout: two controls that pass their tests can still sit apart, at another height or outside their track.

Common mistakes

MistakeFix
"No time for web research"The research runs in a background subagent while the page is drafted.
Wireframes in grey boxesMockups in the repo's tokens show what the user will really see.
Drag onlyEvery drag also has keys and fields.
Tests green, so the UI is doneRender it, screenshot it, compare it with the reference.
A library chosen by popularityCheck the license file and the last release first.

関連スキル