Communitygithub.com

LIKELION-CAPSULE/Landing_Page

在臨時頁面上渲染您選擇的任何元件,並對其進行壓力測試,呈現所有可達情境的視覺報告。

Landing_Page 是什麼?

此技能旨在幫助開發者對特定 UI 元件進行精準的壓力測試與視覺回歸檢查。它會從專案中選定一個元件,在一個獨立的路由頁面上,根據該元件的 props、狀態與資料輸入,自動推斷並生成所有可能的極端情境(例如超長文字、零資料、特殊狀態等)。每個情境都會被實際渲染在單一頁面上,開發者僅需一次載入、一次瀏覽,即可快速找出元件在「最壞情況」下是否會出現視覺破損(例如文字溢出、區域空白等),並將這些破損對應到負責的領域技能(如 better-typography)。此工具支援 Next.js 等現代框架,並強調直接匯入專案中的真實元件,而非重建模擬版本,以確保測試的真實性。其核心價值在於極速回饋(分鐘級別)、不依賴瀏覽器除錯工具、以及生成一份可直接閱讀的視覺報告頁面作為交付成果。

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

在你喜歡的 AI 中提問

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

說明文件

破損測試

此技能選取一個元件,並在一個全新的頁面上,於每個實際上可觸及該元件的情境中進行渲染。該頁面即為交付成果:一份使用者可滾動瀏覽的視覺報告,每個情境並列呈現,並標記出破損處。

它只觀察,不評斷。這裡的「發現」是指頁面上可見的破損,並以負責修復的領域技能詞彙來命名。根據標準審查程式碼是 interface-review 與 better-interface;探索設計替代方案是 variant;逐一處理元件的產品狀態是 state-machine。

不同於 variant 堅持使用真實頁面,此技能刻意隔離元件。你不是在評判元件在上下文中的外觀。你是在檢查當內容處於最壞情況時,它是否能自我保護。

整個流程是:建置、瀏覽一次、回報:只需幾分鐘,而非一個工作階段。過程中不需要儀器化、瀏覽器除錯或二次檢查。

1. 限定一個元件

每次執行只針對一個元件。「設定頁面」不是一個元件;設定檔表單中的文字輸入框才是。如果請求涵蓋多個元件,列出所有候選項並詢問要測試哪一個。

用一句話重新說明該元件是什麼:它接受什麼、渲染什麼,以及它將存在於何處。

2. 從元件推斷情境

只對會變化的部分進行壓力測試。當元件接受的內容在生產環境中可能呈現某種形狀時,該情境就獲得一個位置。因此,首先要閱讀元件:它的 props、插槽、狀態以及它所渲染的資料。

scenarios.md 包含了各個軸線、每個軸線上的數值,以及一個提示,說明該軸線是否適用。根據元件來比對,只保留提示相符的軸線。一個文字輸入框會獲得內容長度與狀態的軸線,但永遠不會有項目數量。一個帶有固定標籤的靜態圖示按鈕會獲得容器與環境的軸線,但永遠不會有長文字。

在開始建置之前,將保留的情境逐條寫下來。然後用一行說明你捨棄了哪些軸線及其原因,這樣即使推斷錯誤,也很容易修正。

3. 建置承載頁面

一個一次性頁面,每個情境渲染一次該元件,排列成單一欄位,每個實例上方附有簡短文字標籤。

應用程式內的一個暫存路由用來容納真實的元件,該元件直接從專案匯入且保持不變。該路由會自動繼承應用程式的佈局、字型、全域樣式和提供者。

當框架區分伺服器元件與用戶端元件時,該頁面需為用戶端程式碼,在 Next.js 中使用 "use client"。否則,測試資料可能會在跨越邊界時靜默消失,導致頁面渲染為空白。

標籤、容器寬度和測試 props 是頁面新增的所有內容。不能有自訂字型或樣式,不能有模擬的主題或 token 交換,也不能有任何探測器。在這些條件下觀察到的任何元件,都已經是不同的元件了。

將情境作為 props 和測試資料傳入。承載頁面永遠不匯入生產狀態,永遠不連接即時資料,而生產環境也永遠不從承載頁面匯入任何東西。

4. 瀏覽一次

在現有的瀏覽器中載入頁面一次,從上到下快速掃描每個情境,並記錄下任何明顯破損之處。例如「文字超出欄位右邊界」,而不是「間距感覺太緊」。預測的失敗不算發現。

如果手邊沒有瀏覽器,請說明情況並將 URL 交給使用者自行檢查。啟動瀏覽器、視窗操作或除錯瀏覽器不在預算之內。當你跳過瀏覽時,報告應包含 URL 和情境列表,沒有發現表格和頁面註記。

然後,在你確實看到的每個破損處,於該情境標籤下方用一行文字標記,並透過一次編輯完成。頁面本身必須能獨立作為一份報告。

5. 回報破損並停止

將發現結果以表格形式回報,優先列出破損的情境:

情境觀察結果負責技能
一個無法斷行的 60 字元字串溢出卡片,無換行也無截斷better-typography
零個項目空白區域,無任何訊息better-writing

此技能本身不擁有任何領域規則,也不會做出裁決。

「一切正常」是一份完整且有價值的報告。請說明頁面上有哪些情境以及在哪裡執行,讓使用者能親自查看所有情境。報告至此結束,不要添加個人偏好來撐場面。

除非被要求,否則不要修復任何東西。如果收到修復請求,請遵循負責技能的規則,然後重新渲染失敗的情境以確認修復。

6. 保留頁面,並在使用者要求時刪除

該頁面是報告的一半,因此它的壽命應長於發現表格。讓它保持執行狀態。只有當使用者明確表示不再需要它時,才刪除該頁面及其測試資料。然後搜尋該路由和測試資料名稱,並檢查 diff,確保沒有任何承載頁面的殘留。

完成之前

常見錯誤修正方式
對每個元件都執行所有軸線只保留提示相符的軸線,並說明你捨棄了哪些
將預測的失敗報告為觀察結果實際渲染它,否則就不要列入
某個情境缺少它被餵入的內容承載頁面有問題,而非元件本身;將頁面設為用戶端程式碼並重新載入一次
在承載頁面中重建了看起來相似的元件從專案中匯入真實的元件
承載頁面重新定義了元件的樣式或主題使用應用程式現有的佈局、字型和 token;標籤和寬度是頁面唯一新增的內容
為每個情境啟動、除錯或截圖瀏覽器一次載入、一次瀏覽,否則就交出 URL 並跳過瀏覽
將發現結果表述為個人喜好報告在頁面上實際看到的東西,或什麼都不報告
回報破損卻未指定負責技能說明哪個領域技能的規則能診斷此問題
一切正常卻添加了建議「一切正常」加上情境列表就是完整的報告
逐個情境調整視窗大小寬度是頁面上的固定容器;一次載入即可顯示所有情境
表格中有破損但頁面上未標記在該情境標籤下方註記;頁面本身應能獨立作為報告
與報告同時刪除頁面頁面是報告的一半;只有在使用者同意時才刪除

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

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

Builds UI from a Figma file or a design image so it matches the design, using your project's existing tokens and components.

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.

相關技能