Communitygithub.com

LIKELION-CAPSULE/Landing_Page

根據 Figma 設計稿或設計圖片建立 UI,使其與設計完全一致,並使用專案中既有的設計標記(tokens)與元件。

Landing_Page 是什麼?

這項技能會從 Figma 檔案或設計截圖讀取設計規格,然後根據專案中已有的設計標記(tokens)和元件庫來建立對應的程式碼。它強調忠實還原設計,所有尺寸、顏色、間距等數值都必須來自設計檔,不加入個人偏好或猜測。支援 Figma MCP 工具取得精確數值,若無 Figma 連結則使用截圖估算比例,並會要求使用者提供 Figma 連結以提高準確度。此技能會將設計對應到專案中的 tokens,若無對應 token 則會提議捨入或中斷詢問;只建立設計中出現的畫面(frames)、斷點(breakpoints)與狀態,不自行補上設計未繪製的互動或內容。最後,它會將成果與設計截圖進行逐元素比對,產生一份詳細的差異報告,列出偏差、未接線的區塊、缺失狀態與領域衝突等事項。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/LIKELION-CAPSULE/Landing_Page/tree/HEAD/.agents/skills/build-design

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

建立設計

此技能能將設計轉換為與其完全相符的程式碼。它從源頭讀取設計,利用專案中既有的資源進行建置,然後在完成前將結果與設計進行比對。

設計說了算。數值必須來自設計檔,絕不能來自你的品味或你在別處看過的模式。設計中未顯示的變更即為偏差,而偏差只能由使用者決定。

此技能不擁有任何領域規則。若設計違反了某項規則,請照設計建置,並將衝突回報給該規則的擁有者。對比度在 better-accessibility 中是必要條件,在 better-colors 中則是測量項目。焦點與語意屬於 better-accessibility,字型屬於 better-typography,間距與結構屬於 better-layout。調色板屬於 better-colors,文案屬於 better-writing,而表面、圖示與動畫屬於 better-ui。審查已完成的工作屬於 interface-review,探索替代方案屬於 variant,對元件進行壓力測試則屬於 break。

1. 從源頭讀取設計

Figma 連結表示應使用 Figma MCP。請先在可用與延遲工具中搜尋 figma,不要直接斷言其不可用,因為伺服器常會以你預料之外的名稱存在。若伺服器僅列出一個 authenticate 工具,表示已連線但未登出,請要求使用者進行身分驗證。若完全沒有 Figma 工具,則請使用者連接一個,在此期間不要憑記憶或猜測建置。figma.md 記錄了應呼叫哪些工具以及每個工具的回傳內容。

截圖或匯出的圖片沒有可供讀取的數值。尺寸是相對於截圖的比例,因此請說明你假設的比例,並將所有測量值視為估計值。若有 Figma 連結,請索取該連結,因為它可以完全取代估計值。

將執行範圍限定於指定的幀(frames)。在不同寬度下顯示相同內容的幀,應視為一個元件在不同斷點(breakpoints)下的呈現,而非不同的元件。

此步驟完成時,你應持有每個範圍內幀的截圖,以及其間距、尺寸、圓角、顏色、字型與使用元件的數值。若來自 Figma 檔案,這些數值應是精確的;若來自圖片,則是你所聲明比例下的估計值。

2. 將設計對應到專案

在編寫任何程式碼之前,請先閱讀專案的設計標記(tokens)與元件庫。然後將每個設計數值對應到既有的項目:

設計中程式碼中
已綁定的變數或樣式名稱或數值相同的 token
與 token 相等的原始數值該 token
沒有對應 token 的原始數值最接近的現有 token,在報告中標示為已捨入
元件實例專案中同名且符合設計顯示的變體之元件
無專案對應項目的元件實例使用純標記(plain markup)替代,列為偏差,並詢問是否需要建立元件
一次性圖層群組使用純標記替代,不建立新元件

切勿為了達到某個數值而新增 token、元件變體或任意數值。當捨入會明顯改變設計時,請停下來詢問該怎麼做。所謂明顯改變,意指間距或尺寸超過 2px,或顏色落在不同的階層上。

檢查設計所需的資料,並將其連接到既有的資料來源。若部分功能所需的後端不存在,則將該部分建置為透過 props 傳遞資料的 UI,並在報告中將其標示為「未接線(unwired)」。

3. 只建立設計中顯示的內容

實作幀、幀所定義的斷點,以及檔案中繪製的狀態,例如 hover、empty 或 error。檔案中未繪製的狀態不是由你設計的,請保留既有元件的預設值,並將其列為缺失。

保留元件周圍的一切原狀。不要編輯相鄰的文案、不要更換圖示、不要做任何「順手」清理。產生的 diff 超出設計範圍是此技能最常見的錯誤。

4. 與設計進行比對

在每個幀的寬度下,將建置結果的截圖與設計截圖並排,並逐元素仔細比對。比較「從源頭讀取設計」步驟中收集的屬性。「間距為 12px,設計為 16px」是發現。「感覺有點緊」則不是。

若有瀏覽器可用,請為每個寬度截圖並進行比對。若無瀏覽器,則提供本地 URL 及需要檢查的寬度,並聲明比對結果未經驗證。請不要回報你未曾實際查看的相符結果。

修正你所造成的所有不匹配之處,然後再次比對。此步驟完成時,所有剩餘的差異應僅為捨入或待確認的問題。

5. 報告並停止

元素設計建置結果狀態
卡片內邊距20pxp-5相符
標題大小15pxtext-sm, 14px已捨入至 token
徽章填充藥丸形文字標籤偏差,已詢問:無徽章元件存在

然後逐項列出(若清單為空則省略):

  • 未接線(Unwired)。 在後端存在之前,哪些部分是透過 props 渲染的。
  • 缺失狀態(Missing states)。 設計中未繪製的狀態。
  • 領域衝突(Domain conflicts)。 設計違反規則之處,需附上擁有該規則的技能名稱。

最後,說明建置結果正在何處執行,以及你是在哪些寬度下進行比對的。

完成之前

你注意到的問題修正方式
在搜尋任何工具之前就先寫下「Figma 未連線」先搜尋工具中的 figma
程式碼中的數值未出現在任何 Figma 回應中,僅在截圖中出現從設計上下文中讀取這些數值
diff 中出現任意工具類別(如 w-[343px])或原始 hex 色碼將其對應到 token,或詢問捨入是否明顯
在元件目錄下為一個非元件的幀建立了新檔案將其內聯為純標記
設計中從未繪製的載入或錯誤分支移除它們,保留預設值並列為缺失
diff 中出現未被任何幀觸及的檔案還原它們
設計中未顯示的對比度或焦點變更還原為設計狀態,並將衝突回報給擁有者
宣稱已比對,但無建置結果的截圖為每個幀寬度渲染截圖,或聲明其未經驗證
報告中未提及的硬編碼範例資料將其列在「未接線(Unwired)」項目下

Individual skills in this repo

This repo contains 14 individual skills — each has its own dedicated page.

LIKELION-CAPSULE/Landing_Page

Reviews and fixes keyboard and focus behavior, ARIA, accessible names, forms, screen-reader announcements, motion and zoom in your project against WCAG 2.2.

LIKELION-CAPSULE/Landing_Page

Helps you build and check a color system for your project. It generates palettes, names semantic tokens, converts between formats and measures contrast.

LIKELION-CAPSULE/Landing_Page

Combines all of the `better-*` skills into a single review across accessibility, layout, writing, typography, color and UI polish.

LIKELION-CAPSULE/Landing_Page

Helps with grouping, alignment, reading order, responsive structure and room for translated text, so a layout holds up when it is resized, translated or mirrored.

LIKELION-CAPSULE/Landing_Page

Sets and reviews how text renders in your product, from the type scale and spacing to font features, wrapping, truncation and punctuation.

LIKELION-CAPSULE/Landing_Page

Polishes the surfaces, icons and motion in your project with exact values for border radius, optical alignment, shadows, icon states and animation.

LIKELION-CAPSULE/Landing_Page

Writes and reviews your interface copy, from labels and errors to empty states and confirmations, so it matches your product's voice and tells people what to do next.

LIKELION-CAPSULE/Landing_Page

Renders a component you choose under every scenario that can reach it on a temporary page and stress tests it.

LIKELION-CAPSULE/Landing_Page

Try to break a piece of UI by feeding it worst-case data — long names, unbreakable emails, one-letter names, missing fields, huge counts, zero items, long labels, non-Latin text, emoji, extreme numbers — then render it behind a "Demo data / Worst case" toggle and report everything that broke, with the fix for each. Use when the user asks to stress-test, break, or find edge cases in a component or screen, or to "try the worst case". For visual design critique use emil-design-eng; for motion use review-animations.

LIKELION-CAPSULE/Landing_Page

Explains how a website, a visual effect or an animation was built, from a live URL or a screenshot.

LIKELION-CAPSULE/Landing_Page

Reviews a branch, pull request or uncommitted change for the interface problems it introduced or regressed, across accessibility, layout, writing, typography, color and UI.

LIKELION-CAPSULE/Landing_Page

Make a web app feel native on a phone — the small CSS and meta-tag fixes that separate "a website in a browser" from something that feels installed. Covers sticky hover states, tap highlight flashes, the 100vh bug, inputs that zoom the page, laggy taps, pull-to-refresh hijacking scroll, content under the notch, long-press selecting button text, carousels that scroll the wrong way, mismatched status bars, and the rule that you test on real hardware. Use when a web app is being built for or reviewed on mobile, when something "works in Chrome but feels wrong on my phone", when building a PWA, a bottom sheet, a carousel, a full-screen layout, or any touch interaction. For motion itself use animate; for React Native use animate-expo.

LIKELION-CAPSULE/Landing_Page

Renders every state of a component you choose on a throwaway page, with mock data and a switcher, so you can work on each state.

LIKELION-CAPSULE/Landing_Page

Builds multiple variants of a component you're working on and helps you iterate and pick one.

相關技能