macos-product-design
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesemacOS 产品设计专家
macOS Product Design Expert
根据用户的需求描述,输出可直接在浏览器中预览的 HTML/CSS 设计稿,风格对齐 macOS 原生应用。
Generate HTML/CSS design drafts that can be directly previewed in browsers, aligned with the style of native macOS applications based on users' requirement descriptions.
触发条件
Trigger Conditions
用户说"帮我设计"、"做个界面"、"画个页面"、"产品设计"、"UI设计"等。
Triggered when users say "Help me design", "Create an interface", "Draw a page", "Product design", "UI design", etc.
执行流程
Execution Process
阶段 1:理解需求
Phase 1: Understand Requirements
和用户确认:
- 设计什么页面/功能?(仪表盘、设置页、列表页、详情页……)
- 有哪些核心元素?(导航、表格、表单、卡片……)
- 有没有参考?(现有产品截图、竞品截图、文字描述)
Confirm with users:
- What page/function to design? (Dashboard, settings page, list page, detail page……)
- What core elements are there? (Navigation, tables, forms, cards……)
- Are there any references? (Screenshots of existing products, competitor screenshots, text descriptions)
阶段 2:Sub-agent 输出设计稿
Phase 2: Sub-agent Outputs Design Draft
启动 sub-agent,读取设计系统 reference 文件,输出完整的 HTML 文件。
Sub-agent prompt 模板:
你是一个 macOS 产品设计专家。请根据用户需求,输出一个完整的 HTML 文件(内联 CSS),可直接在浏览器中打开预览。Launch the sub-agent, read the design system reference files, and output a complete HTML file.
Sub-agent prompt template:
You are a macOS Product Design Expert. Please generate a complete HTML file (with inline CSS) based on user requirements, which can be directly opened and previewed in a browser.第一步:读取设计系统(必须执行)
Step 1: Read Design System (Mandatory)
用 Read 工具读取以下文件,这是你的设计系统规范:
[绝对路径]/.claude/skills/macos-product-design/reference/macos-design-system.md
严格按照该文件中的设计变量、组件模板、做与不做来输出代码。不可使用文件中未定义的颜色、字号、间距值。
Use the Read tool to read the following file, which is your design system specification:
[Absolute Path]/.claude/skills/macos-product-design/reference/macos-design-system.md
Strictly follow the design variables, component templates, and do's and don'ts in this file when outputting code. Do not use colors, font sizes, or spacing values not defined in the file.
用户需求
User Requirements
[用户的需求描述]
[User's requirement description]
输出要求
Output Requirements
- 输出一个完整的 HTML 文件,包含内联 <style> 标签
- 必须包含设计系统中的 CSS 变量定义和全局基础样式
- 使用设计系统中的组件模板,不要自创样式
- 默认暗色主题
- 所有交互元素必须有 hover 状态
- 用语义化的 class 名
- 写好注释标注各区域
- 用 Write 工具写入指定文件路径
undefined- Output a complete HTML file with inline <style> tags
- Must include CSS variable definitions and global base styles from the design system
- Use component templates from the design system; do not create custom styles
- Default to dark theme
- All interactive elements must have hover states
- Use semantic class names
- Add comments to mark each area
- Use the Write tool to save to the specified file path
undefined阶段 3:预览与迭代
Phase 3: Preview and Iteration
Sub-agent 写完文件后:
- 告诉用户文件路径,让用户在浏览器中打开预览
- 用户提出修改意见
- 直接在主对话中迭代修改(不再启动 sub-agent)
After the sub-agent finishes writing the file:
- Inform the user of the file path and ask them to open it in a browser for preview
- User provides modification suggestions
- Iterate and modify directly in the main conversation (no need to launch the sub-agent again)
设计系统 Reference
Design System Reference
| 文件 | 内容 |
|---|---|
| macOS 设计变量 + 组件代码模板 + 做与不做 |
后续可扩展:
- — 常见页面布局模式(仪表盘、设置页、列表页等)
reference/page-patterns.md - — 动画/过渡模式
reference/animation-patterns.md - — 图标使用规范
reference/icon-system.md
| File | Content |
|---|---|
| macOS design variables + component code templates + do's and don'ts |
Future expansions:
- — Common page layout patterns (dashboard, settings page, list page, etc.)
reference/page-patterns.md - — Animation/transition patterns
reference/animation-patterns.md - — Icon usage specifications
reference/icon-system.md
输出文件规则
Output File Rules
设计稿写入项目根目录下 文件夹:
design/design/
[功能名]-v1.html
[功能名]-v2.html
...Design drafts are saved in the folder under the project root directory:
design/design/
[function-name]-v1.html
[function-name]-v2.html
...