用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill web-design-guidelines命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | web-design-guidelines |
| description | > Use when this capability is needed. |
A comprehensive UI code review skill that audits frontend files against established Web Interface Guidelines. Covers accessibility, performance, typography, animation, forms, theming, and interaction patterns.
Compatible with: Claude, Claude Code, VS Code agent extensions, Cursor, Windsurf, and any agent that supports the Agent Skills standard.
file:line format defined in the Output Format section.✓ pass — never skip it silently.Always fetch the authoritative, up-to-date rules before reviewing:
https://raw.githubusercontent.com/vercel-labs/web-interface-guidelines/main/command.md
Use a WebFetch or equivalent tool to retrieve this file fresh on every invocation. The fetched content is the source of truth. Rules below are a local reference and may lag behind the canonical source.
aria-label<label> or aria-labelonKeyDown / onKeyUp)<button> for actions, <a> / <Link> for navigation — not <div onClick>alt; decorative images use alt=""aria-hidden="true"aria-live="polite"<h1>–<h6>; include a skip link for main contentscroll-margin-topfocus-visible:ring-* or equivalent)outline-none / outline: none without a replacement focus style:focus-visible over :focus to avoid showing ring on mouse click:focus-within for compound controlsautocomplete and a meaningful name attributetype (email, tel, url, number) and inputmodeonPaste + preventDefault)htmlFor or by wrapping the controlspellCheck={false})… and show an example patternautocomplete="off" on non-auth fields to avoid password manager conflictsbeforeunload or router guard)prefers-reduced-motion — provide a reduced variant or disable animation entirelytransform and opacity (compositor-friendly properties)transition: all — list properties explicitlytransform-origin correctly<g> wrapper with transform-box: fill-box; transform-origin: center… (ellipsis character), not three periods ..." ", not straight quotes "10 MB, ⌘ K, brand names…: "Loading…", "Saving…"font-variant-numeric: tabular-nums to number columns and comparisonstext-wrap: balance or text-pretty on headings to prevent widowstruncate, line-clamp-*, or break-wordsmin-w-0 to allow text truncation<img> requires explicit width and height to prevent Cumulative Layout Shift (CLS)loading="lazy"priority or fetchpriority="high"virtua, content-visibility: auto)getBoundingClientRect, offsetHeight, offsetWidth, scrollTop)<link rel="preconnect"> for CDN and asset domains<link rel="preload" as="font"> with font-display: swap<a> / <Link> to support Cmd/Ctrl+click and middle-clickuseState, consider URL sync via nuqs or similartouch-action: manipulation to prevent double-tap zoom delay-webkit-tap-highlight-color intentionallyoverscroll-behavior: contain in modals, drawers, and sheetsinert on dragged elementsautoFocus sparingly — desktop only, single primary input; avoid on mobileenv(safe-area-inset-*) for notch/island handlingoverflow-x-hidden on containers; fix content overflowcolor-scheme: dark to <html> for dark themes (fixes scrollbars and native inputs)<meta name="theme-color"> must match the page background colour<select>: set explicit background-color and color (required for Windows dark mode)Intl.DateTimeFormat — no hardcoded format stringsIntl.NumberFormat — no hardcoded format stringsAccept-Language / navigator.languages, not by IP addressvalue require onChange (or use defaultValue for uncontrolled)suppressHydrationWarning only where it is genuinely necessary and document whyhover: state for visual feedback& over "and" where space is constrained| Anti-Pattern | Reason |
|---|---|
user-scalable=no or maximum-scale=1 | Disables user zoom — accessibility violation |
onPaste + preventDefault | Prevents users from pasting — never acceptable |
transition: all | Causes unintended transitions and performance issues |
outline-none without focus-visible replacement | Removes all keyboard focus visibility |
Inline onClick navigation without <a> | Breaks Cmd/Ctrl+click, middle-click, and right-click |
<div> or <span> with click handlers | Must be <button> or <a> |
<img> without width and height | Causes layout shift (CLS) |
Large arrays .map() without virtualization | Freezes the browser on large data sets |
| Form inputs without labels | Screen readers cannot identify the field |
Icon buttons without aria-label | Screen readers announce nothing meaningful |
| Hardcoded date or number formats | Breaks for non-English locales |
autoFocus without justification | Disruptive on mobile; confusing for screen reader users |
Group findings by file. Use file:line format (clickable in VS Code and compatible editors).
Be terse — state the issue and location. Skip explanation unless the fix is non-obvious.
No preamble. No summary paragraph. Start directly with the first file heading.
## src/components/Button.tsx
src/components/Button.tsx:42 icon button missing aria-label
src/components/Button.tsx:18 input lacks label association
src/components/Button.tsx:55 animation missing prefers-reduced-motion guard
src/components/Button.tsx:67 transition: all → list properties explicitly
## src/components/Modal.tsx
src/components/Modal.tsx:12 missing overscroll-behavior: contain
src/components/Modal.tsx:34 "..." → "…" (ellipsis character)
src/components/Modal.tsx:89 <div onClick> → <button>
## src/components/Card.tsx
✓ pass
User: "Review src/components/LoginForm.tsx"
Agent: Fetches guidelines, reads the file, outputs findings grouped under ## src/components/LoginForm.tsx.
User: "Audit all components in src/components/" Agent: Fetches guidelines, reads all matched files, outputs findings grouped by file.
User: "Check my UI for accessibility issues only" Agent: Asks for the file or pattern, fetches guidelines, then applies only the Accessibility and Focus States rule categories.
User: "Review my UI"
Agent: Responds — "Which files or patterns would you like me to review? For example: src/components/*.tsx or src/app/page.tsx"
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
基于 SOC 职业分类