frontend-design
在使用者要設計網站、Web App 或元件介面時使用。常見觸發像「做 landing page」「設計 dashboard」「規劃 component UI」。輸出可上線介面與設計系統;不取代產品策略或純品牌研究。
- License 许可
- MIT
- 所属仓库
- AllanYiin/Amon
- 最近更新
- 2026-03-29
- Stars
- ★ 2
- Forks
- 1
01 前言 Front Matter
- name
- frontend-design
- license
- MIT
- version
- 2026.3.26
- homepage
- https://github.com/AllanYiin/skills/tree/main/skills/frontend-design
- metadata
- { "author": "Allan Yiin", "category": "design", "language": "zh-TW", "short-description": "前端 UI 設計、視覺系統與可上線實作工作流程" }
- description
- 在使用者要設計網站、Web App 或元件介面時使用。常見觸發像「做 landing page」「設計 dashboard」「規劃 component UI」。輸出可上線介面與設計系統;不取代產品策略或純品牌研究。
02 资源文件 27
- 资产文件assets/evals/evals.json2.3 KB
- 资产文件assets/evals/regression_gates.json141 B
- 其他examples/css/components.css16.1 KB
- 其他examples/css/tokens.css16.3 KB
- 脚本examples/typescript/design-tokens.ts14.1 KB
- 其他examples/typescript/sample-components.tsx17.7 KB
- 其他examples/typescript/theme-provider.tsx11.4 KB
- 脚本examples/typescript/utils.ts8.6 KB
- 许可证LICENSE1.0 KB
- 参考文档references/accessibility-usability.md2.7 KB
- 参考文档references/advanced-techniques.md1.5 KB
- 参考文档references/common-pitfalls.md3.6 KB
- 参考文档references/core-principles.md4.9 KB
- 参考文档references/design-direction-templates.md1.8 KB
- 参考文档references/design-guideline-authoring.md3.0 KB
- 参考文档references/frontend-resources.md1.3 KB
- 参考文档references/implementation-workflow.md6.9 KB
- 参考文档references/information-priority-playbook.md5.3 KB
- 参考文档references/journey-flow-gestalt.md7.7 KB
- 参考文档references/prompting-playbook.md3.6 KB
- 参考文档references/quality_checklist.md2.8 KB
- 参考文档references/quality-checklist.md3.5 KB
- 参考文档references/responsive-typography.md561 B
- 参考文档references/web-design-principles.md1.7 KB
- 脚本scripts/audit_frontend_principles.py20.2 KB
- 其他templates/globals.css8.7 KB
- 脚本templates/tailwind.config.js8.3 KB
03 SKILL.md 正文
Frontend Design Skill
Purpose
這個 skill 用來把模糊的網站、Web App 或元件需求,轉成可上線的前端介面與設計系統實作。核心不是只把畫面做漂亮,而是先定義設計 tokens、互動狀態、流程可視化、資訊優先級與可重用規範,再落成前端程式碼。若是工作台型產品,嚴格禁止 stacked UI / stacked cards 疊首頁;必須先定義唯一主任務,並讓該功能盡量佔據最大、最中央、最先被看的畫面區域。
Scope
In scope
- 網站、Web App、dashboard、landing page、admin panel、component library 與 design system 的 UI 設計與實作。
- 從設計方向、tokens、components、page layout 到互動狀態與 accessibility 的整體規劃。
- 多步驟體驗中的 journey map、user flow、wireflow 與 Gestalt 原則落地。
- 以 React、Vue、Svelte、HTML/CSS/Tailwind 等常見 Web 技術完成前端交付。
Out of scope
- 純後端 API、演算法、資料處理或非視覺性的程式任務。
- 純品牌策略、產品定位或沒有 UI 輸出的設計討論。
- 只要求修單一小 bug、調一個 CSS 值且不涉及系統性 UI 改善的任務。
Primary Use Cases
-
從需求直接產出可上線頁面或元件。 Trigger examples: 「做 landing page」「設計 dashboard」「規劃 component UI」。 Expected result: 交付 tokens、components、page layout 與對應前端程式碼,而不是只給視覺形容詞。
-
建立或整理設計系統。 Trigger examples: 「整理一套 design system」「把元件規範化」「做可重用 UI guideline」。 Expected result: 交付 tokens、shared components、guideline docs 與 reusable patterns。
-
處理多步驟 UX 流程。 Trigger examples: 「設計 onboarding flow」「把 checkout 流程整理清楚」「規劃 setup wizard」。 Expected result: 先產出 journey map / user flow / wireflow,再進入高保真 UI 實作。
Workflow Overview
- 先定義任務目標、使用者、技術棧、美學方向,以及唯一 primary task。
- 建立設計 tokens 與狀態規範,避免任意硬編碼。
- 先做 task model、state model、資訊分類、資訊架構表與揭露策略,再規劃 components 與 page layouts;必要時先做 journey/flow。
- 補齊 loading、empty、error、focus、responsive、accessibility 與 visibility rules。
- 用 deterministic audit 與 anti-pattern checklist 自檢。
詳細流程看 references/implementation-workflow.md。
Routing Boundaries
- Neighboring skills / workflows:
spec-organizer: 需求還沒成形、需要先整理成可開發 spec。slide-content-planner/pptx-maker: 目標是簡報而不是 Web UI。technical-documentation-writer: 重點是文件,不是前端介面。
- Negative triggers:
- 「幫我修 backend API」
- 「只要演算法,不用管 UI」
- 「幫我寫品牌定位」
- Handoff rule: 若任務核心不是介面或前端實作,就不要硬用 UI 技巧包裝不相干問題。
Success Criteria
Quantitative
- 所有互動元件都有 default / hover / active / focus / disabled 狀態。
- 響應式至少覆蓋 mobile、tablet、desktop 三個 viewport。
- 如為多步驟流程,必有 journey map / user flow / wireflow 其中之一。
- 如為 workspace / dashboard / review tool,首屏必須有明確的 task model、state model、資訊架構表與 visibility plan。
Qualitative
- 輸出要能直接做,不是只剩風格形容詞。
- 視覺方向明確且不落入 generic AI slop。
- tokens、components、states 與 guideline 彼此一致。
- 若是 dashboard、workspace、viewer、editor、review tool 或 compare screen,必須只聚焦一個 primary task;禁止用 stacked UI 延後使用者接觸真正主功能。
- 首屏只保留完成當前任務所需的主要群組;reference、規則、補充說明與低頻控制項必須延後揭露。
Trigger Patterns
應觸發
- 「做 landing page」
- 「設計 dashboard」
- 「規劃 component UI」
- 「整理 design system」
- 「把這個 mockup 轉成前端頁面」
不應觸發
- 「幫我修 API timeout」
- 「幫我做資料清洗腳本」
- 「幫我寫品牌定位」
Testing Plan
Triggering tests
- Should trigger:
- "build a website/app/component"
- "create a dashboard/landing page"
- "design a UI for..."
- "make it modern/clean/premium"
- Should NOT trigger:
- "幫我修 API timeout"
- "幫我做資料清洗腳本"
- "幫我寫品牌定位"
Functional tests
- 若有 reusable UI,應同時交付 guideline docs。
- 若有 multi-step UX,必須先外顯化 flow artifact。
- 交付前要跑
audit_frontend_principles.py或等價檢查。
Non-Negotiables
- 先做 tokens,再做 components;不要直接硬編碼顏色、間距、陰影與圓角。
- 一個畫面先定義一個 primary task;嚴格禁止 stacked UI / stacked cards 疊首頁,主工作區必須佔據主舞台與最大化畫面區域。
- 在畫 layout 前,先產出 task model、state model、資訊分類、資訊架構表與 disclosure plan;沒有這些前置物就不要直接堆 card。
- 每個資訊項目都要標記為
action-critical、decision-supporting、status-feedback、reference、exception-handling或audit/history其中之一。 - task model 不能只寫功能名稱;至少拆成唯一主目標、次目標、低頻目標、罕見目標。
- state model 不能只列 state 名稱;至少要為每個 state 定義進入條件、必顯資訊、隱藏資訊、主 CTA 與離開條件。
- 先用資訊架構表決定 reveal / hide,再決定 layout;資訊架構表至少要有:資訊項目、使用頻率、是否首屏必須、所屬任務階段、顯示條件、建議容器、是否可收合。
- 依 state 決定可見性:reference 預設 on-demand、exception 只在對應狀態出現、右欄只在明確有助於當前任務時才常駐。
- 首屏預設只允許 1 個主操作區、1 個狀態區、1 個次要摘要;整體不得超過 2-3 個主要視覺群組,且只能有 1 個主 CTA。
- 相同任務流中的說明文字優先內嵌在元件旁,不要獨立做成大型說明卡。
- 多步驟 UX 必須先外顯化成 journey map、user flow 或 wireflow。
- Reusable UI 必須附 guideline docs,不可只交程式碼。
- Accessibility、loading、empty、error 與 focus state 都是交付內容,不是加分項。
- Tailwind 只能走 build-time integration,不要用 CDN 當正式方案。
- 交付前要做 anti-pattern scan 與 deterministic audit。
細節看:
references/core-principles.mdreferences/common-pitfalls.mdreferences/quality-checklist.md
Skill Architecture
SKILL.md- 路由邊界、核心規則摘要、交付標準與導航。
scripts/audit_frontend_principles.py- Journey/flow、Gestalt、guideline 與 task hierarchy 的 deterministic audit。
examples/css/tokens.css: 設計 token 系統。components.css: 可重用元件樣式範例。
examples/typescript/design-tokens.ts: type-safe token 定義。theme-provider.tsx: theme 管理。sample-components.tsx: 元件範例。utils.ts: 共用輔助。
templates/globals.css: 全域樣式模板。tailwind.config.js: Tailwind 設定模板。
Reference Navigation
只讀和當前任務直接相關的 reference,不要全部一起載入。
references/core-principles.md- tokens-first、Tailwind build-time、journey/flow、Gestalt、workbench hierarchy、單一主任務與反 stacked UI 規則、guideline artifacts。
references/information-priority-playbook.md- task model、state model、資訊分類、資訊架構表、progressive disclosure、首屏群組上限與 anti-stacked workbench 規則。
references/implementation-workflow.md- 從分析、token 定義、component/page 組裝到 QA 的完整 phase-by-phase 流程。
references/design-direction-templates.md- Minimal Premium SaaS、Bold Editorial、Soft & Organic、Dark Neon、Playful & Colorful 的方向模板。
references/prompting-playbook.md- master prompt、token/component/page/review prompts 與 quick-start example。
references/common-pitfalls.md- 常見前端設計失敗型態與修法。
references/quality-checklist.md- 輸出品質標準、驗收 checklist、tips for excellence。
references/advanced-techniques.md- fluid typography、advanced color systems、skeleton loading、motion patterns。
references/frontend-resources.md- 技能內建參考與外部資源索引。
既有深度參考:
references/web-design-principles.mdreferences/accessibility-usability.mdreferences/responsive-typography.mdreferences/journey-flow-gestalt.mdreferences/design-guideline-authoring.md
Delivery Rule
回覆或實作時,優先遵守:
- 用祈使句與可執行規格溝通,不要只給空泛審美詞。
- 能用現有 examples / templates / references 解決,就不要在
SKILL.md重新展開長篇教學。 - 若任務是工作台型 UI,先保護唯一主任務與主舞台,再處理裝飾、摘要卡片或次要資訊。
- 若任務包含很多功能,先做資訊架構收斂,把 feature inventory 壓成 visibility plan;不要把每個需求都停進一張卡片。
- 若任務只是局部小修,仍要保護設計系統一致性,但不要擅自重做整個頁面。
04 同仓库更多 Skills
web-search-strategy
當使用者要上網查資料、把模糊研究意圖拆成多輪搜尋查詢、限定網站或檔案類型、找官方來源,或改善 Google/Bing 搜尋品質時使用。將問題改寫成 2-5 組高辨識度查詢,結合 site、引號、排除詞、檔案類型、搜尋引擎切換、結果去重與二次搜尋,再整理可信來源、未解空缺與下一輪查詢方向。
vibe-coding-guidelines
在非程式開發者要用 vibe coding 與 coding agent 協作時使用。常見觸發像「幫我整理開發準則」「定義交付邊界」「規劃驗證方式」。輸出需求表達、邊界與風險控管準則;不直接取代實作。
spreadsheet-workflows
報表 xlsx(整理、公式、檢核)。當使用者需要建立、編輯或分析 Excel 試算表時使用。
spec-to-tasks
將一份需求規格拆成可執行任務(含驗收條件)。當使用者提供產品需求、功能規格或使用者故事時,將其分解成具體的開發任務。
spec-organizer
在使用者要把模糊想法整理成可開發 spec 時使用。常見觸發像「整理需求成 spec」「補驗收條件」「拆分階段開發計畫」。輸出技術規格、白話規格與可直接貼用於 Codex / Claude Code 的分階段 instructions;不直接代替正式文件發布。
slide-content-planner
當使用者要規劃投影片或簡報內容時使用。輸出逐頁大綱、關鍵訊息、證據需求、視覺重點與版面動線。