Audit

educlopez/ui-craft/.opencode/skills/audit

作者 educlopezceecc8e1fb0c2befda73da996435900d6dd0c1ac无许可证375 个星标收录于 2026年10月9日更新于 2026年10月9日仓库5周前更新

Technical UI audit — a11y, performance, responsive. Produces a prioritized findings table. Invoke when the user asks for audit on their UI, or mentions 'audit' alongside design / UI / frontend work.

AI 生成的概览

对用户界面进行无障碍、性能和响应式审计,并生成按优先级排序的问题清单。

功能
该技能执行技术性 UI 审计,涵盖无障碍、渲染性能和响应式行为。它首先要求在桌面、平板和移动视口下进行视觉捕获,然后检查焦点可见性、键盘可达性、触摸目标尺寸、动画属性、图片尺寸和移动端断点等项目。发现的问题按优先级分为严重、高影响和快速改进,并以“修改前/修改后/原因”表格呈现,最后附上 Craft Report。它先报告问题,除非被要求否则不重写代码。
适用场景
当用户要求对其 UI 进行审计,或在设计、UI 或前端工作中提到审计时使用。适用于需要评估并排序无障碍、性能和响应式行为的现有界面评审。
运行要求
仅为说明性内容,不附带脚本。视觉捕获是强制步骤,需要浏览器自动化工具,例如 Playwright MCP 服务器、浏览器 DevTools 或其他浏览器自动化工具,或由用户提供截图。它会引用配套文件(accessibility.md、motion.md、responsive.md、review.md)以及更广泛的 ui-craft 技能。
<!-- HARNESS MIRROR — do not edit here. Canonical source: skills/ or commands/. After editing source, copy into cli/assets/<harness>/ and repo-root harness mirrors. -->

Context: this sub-skill is one lens of the broader ui-craft skill. If the ui-craft skill is also installed, read its SKILL.md first for Discovery + Anti-Slop + Craft Test, then apply the specific lens below.

Run a technical audit of the UI at $ARGUMENTS. Load the ui-craft skill and apply the audit lens.

Step 0: Visual capture (mandatory)

Code-only review is insufficient. Every audit/critique starts with the surface as the user sees it. Try the following in order; use the first one available:

  1. Playwright MCP — if playwright MCP server is available, use it. Capture full-page screenshots at three viewports: desktop (1280×800), tablet (768×1024), mobile (375×812). Capture dark mode if the app supports it.
  2. Browser DevTools / Chrome MCP — second choice; same viewport set.
  3. Other browser automation (agent-browser, cursor-ide-browser) — third choice.
  4. Ask the user — last resort. If no automation is available, request screenshots from the user before proceeding. Be specific:
    • "Visual review needs screenshots. Please provide:
      • Full-page at 1280px (desktop)
      • Full-page at 768px (tablet)
      • Full-page at 375px (mobile)
      • Dark mode of each, if supported."

Do not begin the review until visuals are captured or provided. State this explicitly to the user when no automation succeeds — don't silently fall back to code-only review.

If the user declines to provide screenshots, run a code-only pass and clearly mark the report [CODE-ONLY REVIEW — visual issues not assessed] at the top so the limitation is explicit.

Note: audit is knob-agnostic — accessibility and performance are not tunable.

Scope (non-negotiable checks):

  1. Accessibility — read references/accessibility.md:
    • Visible :focus-visible on every interactive element
    • Keyboard reachable, no focus traps
    • Touch targets ≥ 44px (mobile)
    • Color not the only signal for state
    • Form labels, error association, required indication
    • prefers-reduced-motion honored for all animations
  2. Performance — read references/motion.md Rendering Performance section:
    • Only transform / opacity animated (no width/top/height)
    • No transition: all
    • will-change scoped to active interaction, removed after
    • Images have width/height or aspect-ratio (CLS)
    • No layout thrash in scroll/resize handlers
  3. Responsive — read references/responsive.md:
    • Mobile-first breakpoints, no fixed-width components
    • env(safe-area-inset-*) respected on fixed elements
    • Touch zones don't overlap
    • No horizontal scroll at 320px

Output format — the Review Format table from SKILL.md:

BeforeAfterWhy

Group findings by priority: Critical (blocks usability/a11y) → High-impact (immediately noticeable) → Quick wins (polish).

Do NOT rewrite code unless asked. Report findings first; wait for approval before editing.

Close with a Craft Report (references/review.md → Craft Report), wrapping the findings table above — Checked states scope (a11y/perf/responsive, at which viewports), Passed carries anything inspected and found sound, Changed stays empty pre-approval, Verdict names the top priority. Produce it even on a clean audit — a11y/perf/responsive coming back clean is the finding.

Next step: /harden — turn the findings into real production coverage (rung 1).

来源与署名

来源:educlopez/ui-craft位于.opencode/skills/audit提交ceecc8e

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架