UI设计
diegosouzapw2026-10-28查看 484复制 1526
使用受 Vercel 启发的白色主题、强无障碍默认值和仓库组件约定,应用一致的渲染器 UI/UX 实现模式。
📘如何使用这个技能
- 1复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
- 2打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
- 3粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
- 4直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景
💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。
SKILL.md3828 chars
---
name: ui-design
description: Applies consistent renderer UI/UX implementation patterns using a Vercel-inspired white theme, strong accessibility defaults, and repository component conventions.
license: MIT
opencode:
compatibility: opencode
metadata:
author: nabby27
version: 1.0
copilot:
user-invokable: true
---
# Skill: UI Design
This skill defines how to implement or review renderer UI so it looks unified with the existing app and follows a high-quality product design baseline.
Primary sources:
- `docs/frontend/components.md`
- `docs/guidelines/code-standards.md`
## Scope
### Use when
- Implementing or refining renderer UI components, pages, or visual states.
- Harmonizing new UI with existing app layout, spacing, typography, and interaction patterns.
- Validating design consistency before final review.
### Do NOT use when
- Working on main/preload architecture without renderer UI impact.
- Defining test-suite routing or coverage strategy.
## Design baseline
1. Vercel-inspired white theme direction
- Bright base surfaces and subtle neutral layers.
- Clean borders and restrained shadows.
- High text contrast and clear hierarchy.
2. Repository-first consistency
- Reuse existing Tailwind and shadcn patterns.
- Respect established component behavior and spacing rhythm.
- Prefer extending current primitives over introducing custom one-off controls.
3. UX quality requirements
- Clear information hierarchy and predictable navigation.
- Visible interactive states (hover, focus, active, disabled).
- Keyboard-friendly flows for primary actions.
4. Accessibility defaults
- Sufficient contrast in text and controls.
- Focus states are always visible.
- Meaning is not conveyed by color alone.
5. Responsive behavior
- UI must remain usable on desktop and mobile for touched flows.
- Avoid layout breakpoints that cause clipped content or inaccessible actions.
## Implementation rules
- Use Tailwind classes and shadcn primitives as primary styling stack.
- Keep style tokens coherent: spacing, radius, border, and typography should match nearby screens.
- Prefer minimal purposeful motion; avoid decorative animation noise.
- Avoid inline styles for regular component styling.
- Do not introduce new visual language in isolated pages without explicit feature requirement.
## Consistency checklist
For each changed UI file, verify:
1. Visual alignment
- Matches surrounding pages and shared components.
2. Typography and spacing
- Preserves hierarchy and spacing cadence.
3. Interaction quality
- States are visible and behavior is predictable.
4. Accessibility
- Focus, contrast, and keyboard path remain valid.
5. Responsive stability
- Main flow remains functional on mobile and desktop.
## Anti-patterns (blocker)
- New UI that ignores existing app visual language.
- Hard-to-read text or missing focus states.
- One-off style overrides that conflict with shared component patterns.
- Large decorative changes without product requirement.
## Definition of done
- Changed UI is visually consistent with the app and follows white-theme baseline.
- Accessibility and responsive checks pass for touched behavior.
- Design adjustments are minimal, intentional, and scope-bounded.
## Output contract
Return a structured YAML report including:
- `status`: `ok` | `needs_clarification` | `error`
- `summary`: short UI consistency and UX quality assessment
- `scope`: task IDs, files reviewed, assumptions
- `decisions`: key design decisions and rationale
- `consistency_checks`: checklist results by file or module
- `findings`: issues with severity, evidence, and minimal fix
- `verdict`: `ready` | `ready_with_changes` | `not_ready`
- `next_actions`: minimal action list
- `warnings`: unresolved risks or assumptions