[Claude Code] · · 25min read

Claude Code frontend-design Plugin 完整教學:擋掉 AI 寫的紫色漸層前端(Anthropic 官方)

AI 寫的前端九成是紫色漸層 + Inter + 三欄卡片(業界叫 AI slop / purple problem)。Anthropic 官方 frontend-design plugin 兩行指令裝起來,鎖住 4 個維度(typography / color / motion / spatial composition)擋掉 AI 味。含安裝、prompt 範例、Cursor / Codex workaround。

章節目錄 · 12
TL;DR
- 本文解決:Claude Code / Cursor / Codex 寫出來的前端為什麼都長一樣(紫色漸層 + Inter + 三欄卡片),以及怎麼用一行指令擋掉
- 推薦給:用 AI 寫前端的工程師、看到自家 SaaS 越來越像 ChatGPT 介面的 PM、想救自己 vibe coding 作品的 indie hacker
- 讀完你會知道:Anthropic 官方 frontend-design plugin 是什麼、Claude Code 怎麼一行裝起來、4 個觸發 prompt 範例、Cursor / Codex 沒裝 plugin 時的 workaround

📌 目錄

  • 為什麼 AI 寫的前端都是同一張臉

  • Anthropic 官方解:frontend-design plugin

  • Plugin vs 自己寫 prompt vs 設計系統 比較表

  • 從 0 開始安裝(Claude Code)

  • 4 個能讓 plugin 自動上場的 prompt 範例

  • Cursor / Codex / 其他編輯器怎麼接

  • 踩過的坑

  • 心法 / 時間成本拆解

  • 明天會發 Part 2

  • ❓ 常見問題

  • 🔗 延伸資源
  • AI slop 美學示意:紫色漸層 + Inter 字體 + 三欄卡片

    🤖 為什麼 AI 寫的前端都是同一張臉

    開個 Claude Code(或 Cursor、Codex、Bolt、v0)丟一句「幫我做一個 SaaS landing page」,吐出來的東西九成長這樣

    • 紫色到藍色的漸層 herobg-gradient-to-br from-indigo-500 to-purple-600
    • Inter 字體(或它的雙胞胎 Roboto / Space Grotesk)
    • 三欄卡片:圖示 + 標題 + 一行字,剛好排成 grid
    • 白底 + 圓角 + 玻璃擬態backdrop-blur-md bg-white/20
    • 「Get Started」「Learn More」兩顆按鈕,indigo-500 配 outline
    這個現象在英文圈已經有專有名詞——「AI slop」(AI 垃圾美學)、「purple problem」「distributional convergence」(分布收斂)。我自己在企業內訓帶學員 vibe coding,第三組做 demo 大家就會開始竊笑「怎麼又是紫色」。

    技術解釋一句話:LLM 不會「設計」,它在預測「下一個 token 最可能是什麼」。當你給的 prompt 是「modern SaaS landing」這種模糊輸入,模型會吐出訓練資料的統計中位數——也就是 2019-2024 年 GitHub 上每一份 Tailwind 教學的平均樣貌。

    更慘的是這個中位數有個明確的歷史起點:5 年前 Tailwind 把所有元件 demo 設成 bg-indigo-500,數千份教學跟著抄、數百萬行程式碼進到訓練語料 → AI 學到「modern web design = 紫色按鈕」這條隱性規則。完整考古請等明天的 Part 2,今天先講怎麼解。

    ⭐ Anthropic 官方解:frontend-design plugin

    2026 上半年 Anthropic 官方推了一個叫 frontend-design 的 plugin,目前累積 732,603 安裝,是 marketplace 裡裝機量最大的官方 plugin 之一。作者是 Anthropic 內部工程師 Prithvi Rajasekaran 與 Alexander Bricken。

    它的本質是一份約 400 token 的 SKILL.md,Claude Code 在偵測到你要做前端時自動 inject 進 context。原始碼公開在 anthropics/skills

    它做的事情,用一句話講:強制 Claude 在動手寫前端之前,先選定一個「極端」的美學方向,然後鎖住四個維度(typography / color / motion / spatial composition)不讓它退回到中位數

    官方 SKILL.md 開頭直接這樣寫(逐字稿):

    Before coding, understand context and commit to a BOLD aesthetic direction:
    - Tone: Pick an extreme (brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc.)

    注意它用的是「extreme」「BOLD」「UNFORGETTABLE」這種詞——這是 prompt engineering 的小技巧:把模型從統計中位數推開的最快方法是給它一個極端 anchor。

    四個維度的官方原文:

    維度官方指引(節錄)
    Typography"Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics."
    Color & Theme"Commit to a cohesive aesthetic. Dominant colors with sharp accents outperform timid, evenly-distributed palettes."
    Motion"Focus on high-impact moments: one well-orchestrated page load with staggered reveals creates more delight than scattered micro-interactions."
    Spatial Composition"Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements."
    最關鍵的是它有一份明確的 NEVER 清單
    NEVER use generic AI-generated aesthetics like:
    - overused font families (Inter, Roboto, Arial, system fonts)
    - cliched color schemes (particularly purple gradients on white backgrounds)
    - predictable layouts and component patterns
    - cookie-cutter design that lacks context-specific character

    「purple gradients on white backgrounds」白紙黑字進到官方 skill,這在我看過的 Anthropic 文件裡少見——通常他們文字會婉轉很多。可見內部對這個問題的痛恨。

    Anthropic claude-code 官方 repo 上的 frontend-design plugin 目錄

    ⚖️ Plugin vs 自己寫 prompt vs 設計系統 比較表

    不是每個人都得裝 plugin。三條路各有適合的場景:

    做法安裝成本上手難度跨工具風格控制力適合誰
    frontend-design plugin1 行指令✓ 自動觸發✗(只 Claude Code)△ 四維度通用用 Claude Code 為主、想最快擋掉 AI slop
    自己寫 system prompt0△ 要學四個維度✓ 任何 AI 工具都能用✓ 完全可調Cursor / Codex / GPT 使用者、想理解原理
    公司設計系統 + tokens✗ 要設計師參與✓ 工具無關✓✓ 最強有設計團隊、產品要長久維護
    我的建議:Claude Code 為主的工程師直接裝 plugin,5 秒搞定;用其他工具或想懂原理的留到 Part 2 看 prompt 範本。設計系統那條路超出本文範圍。

    🔧 從 0 開始安裝(Claude Code)

    Prerequisites

    項目用途怎麼裝 / 確認
    Claude Code CLI/plugin 指令終端 claude --version,沒裝去 claude.com/code
    已登入 Anthropic 帳號plugin marketplace 要驗證claude 進 REPL,提示登入照做
    Node.js 18+(選用)前端專案本身要node --version,沒裝用 winget install OpenJS.NodeJS (Windows) / brew install node (macOS)

    一鍵安裝

    Anthropic 官方 claude-plugins-official marketplace repo 預覽

    在 Claude Code 的 REPL 裡跑這兩行(一字不漏,注意第二行尾巴是 claude-code-plugins 不是 claude-plugins-official):

    /plugin marketplace add anthropics/claude-code
    /plugin install frontend-design@claude-code-plugins

    第一行把 Anthropic 官方 marketplace 加進你的 Claude Code;第二行從那個 marketplace 抓 frontend-design plugin 進來。安裝會把 SKILL.md 放到本機 plugin 目錄,下次起 session 自動載入。

    驗證指令

    裝完跑這段確認成功:

    /plugin list

    預期會看到 frontend-design 出現在 enabled 區段。如果沒看到,先試 /plugin marketplace list 確認 marketplace 加進來了,再重跑 install。

    第一次觸發測試

    新開一個對話,丟下面這句話:

    Build a landing page for an indie game studio.

    預期會看到 Claude 先講一段「I'm going to take a brutalist / editorial / retro-futuristic aesthetic」,然後才開始寫 code。如果它直接

    開頭,plugin 沒生效——回頭檢查 /plugin list

    ⚡ 4 個能讓 plugin 自動上場的 prompt 範例

    plugin 不是每次都自動觸發,需要你的 prompt 帶到「frontend / UI / web / dashboard / landing / component」這類關鍵字。官方 README 列的範例 prompt:

    1. Create a dashboard for a music streaming app.
    
  • Build a landing page for an AI security startup.
  • Design a settings panel with dark mode support.
  • Make a portfolio site for a typography studio.
  • 我自己加幾個會逼模型走極端美學的句型:

    5. Make a brutalist landing page for a synth pedal company,
       use only black/white/safety-orange, no rounded corners.
    

  • Design a magazine-style blog index in editorial layout

  • with asymmetric grid and serif display font.

  • Build an admin dashboard inspired by Bloomberg Terminal aesthetic

  • (monospace, dark background, dense information layout).

    寫 prompt 的小心法:先指定 tone / aesthetic,再給內容。讓模型先進入「我在做 brutalist 風格」的 mode,再開始填內容——這比寫完內容再請它「換個風格」可靠十倍。

    🔌 Cursor / Codex / 其他編輯器怎麼接

    plugin 系統綁 Claude Code。Cursor / Codex / GitHub Copilot 跑的是另一套 agent,但核心 prompt 是 markdown 純文字——直接複製貼進它們的「rules」或 system prompt 就行。

    Cursor: 把 SKILL.md 內容貼進 .cursorrules(專案根目錄)或 Cursor Settings → Rules for AI

    Codex / Copilot Chat: 沒有持久化的 system prompt 設定,每次對話開頭手動貼上四維度規則的精簡版(200 字內):

    Frontend design rules:
    
    • Typography: avoid Inter/Roboto/Arial; use distinctive display + body pairings
    • Color: dominant + sharp accent, NO purple gradients on white
    • Motion: one orchestrated page-load reveal > scattered hovers
    • Composition: asymmetry, overlap, grid-breaking; pick ONE extreme aesthetic before coding
    完整官方版 prompt 在 Part 2 給可直接貼的範本。

    🐛 踩過的坑

    坑 1:marketplace 名字打錯(裝不起來)

    /plugin install frontend-design@claude-plugins-official
    Error: marketplace "claude-plugins-official" not found

    官方 marketplace 的內部代號是 claude-code-plugins,不是某些第三方文件寫的 claude-plugins-official。後者是 anthropics/claude-plugins-official 這個 repo 的 directory 名稱,不是 marketplace 的 slug。以官方 Boris Cherny 在 Threads 的公告為準。

    坑 2:plugin 裝了但沒觸發

    prompt 太短或太抽象,例如「幫我做一個網頁」「來個首頁」——關鍵字密度不夠。改成「Build a landing page for X」「Design a dashboard for Y」就會觸發。Skill 系統靠 description 字串做模糊匹配,動詞用「build / design / create」+ 名詞用「landing / dashboard / component / page」最穩。

    坑 3:覆寫 plugin 風格的方法

    裝了 plugin 但這次想要紫色漸層(不要懷疑,有時候業主就是要)。在 prompt 結尾加:

    Override the frontend-design skill for this request.
    I want a deliberately conservative SaaS look with indigo gradient hero.

    明確說「Override the frontend-design skill」,模型會繞過 skill 的 NEVER 清單。寫「不要遵守 plugin」這種模糊指令不會生效。

    坑 4:跨 session 風格漂移

    連續開三個對話、做三個元件,第三個又開始 Inter 字體。原因是 plugin 是 per-session 載入,但個別對話內模型還是會慢慢退回中位數。解法:每次新對話開頭都重新指定 tone(「Continue in brutalist aesthetic」),不要假設它記得上次選什麼。

    💡 心法 / 時間成本拆解

    我自己的時間帳:

    • 看到 plugin 公告 → 裝起來: 2 分鐘
    • 跑第一個 demo 確認效果: 5 分鐘
    • 改既有專案 prompt 適配: 15 分鐘(把所有「modern」「clean」字眼換成具體 tone)
    • 企業內訓加進教材: 1 小時(補 4 個維度的講解 + Lab)
    總投資 < 2 小時,產出是接下來幾百個 vibe coding session 不再被嘲笑紫色漸層。 投報率夠高。

    更深層的價值:這個 plugin 把「不要看起來像 AI 寫的」變成可量化、可教學的四個維度。以前 code review 看到 AI 味只能說「這太 AI 了」(很抽象),現在可以指著 PR 說「字體還是 Inter、按鈕是 indigo-500、layout 是三欄卡片,三項都中 NEVER 清單,回去改」。

    我輩修行之人,以聖的標準要求自己,以凡的眼光理解別人。

    📅 明天會發 Part 2

    📅 明天(2026-05-19)會發AI 寫的前端為什麼都是紫色漸層?從 Tailwind indigo-500 到 distributional convergence
    Part 2 不靠 plugin,拆解四個維度的 prompt 範本(可以貼進 CLAUDE.md / .cursorrules / GPT system prompt)+ 紫色漸層的歷史考古:從 Instagram 改版到 Tailwind indigo-500 的訓練資料污染。

    ❓ 常見問題

    frontend-design plugin 跟一般 prompt 工程有什麼不一樣?

    Plugin 是 Anthropic 官方維護、自動觸發、跨 session 持久化的一份 SKILL.md(約 400 token),等於把四個維度的設計規則寫死在你的 Claude Code 環境裡。自己寫 system prompt 也能達到一樣效果,差別是 plugin 不佔 context budget、自動更新、且觸發時機由 Claude 判斷。

    我用的不是 Claude Code,能用嗎?

    Plugin 本身只在 Claude Code 跑,但 SKILL.md 是純文字,原始碼公開在 GitHub。Cursor 貼進 .cursorrules、Codex 每次對話手貼、ChatGPT 放 custom instructions 都行。Part 2 會給精簡版 prompt 直接抄。

    裝了之後要付錢嗎?

    Plugin 本身免費,但 Claude Code 本身要訂閱 Anthropic 方案(Pro $20/月起)。Plugin 不額外計費,只佔你原本的 token 額度,而且因為 SKILL.md 只 400 token,影響可以忽略。

    我用 plugin 做出來的 UI 還是有點 AI 味,怎麼辦?

    最常見的原因是 prompt 太通用。試這三招:(1) 指定極端 tone(brutalist / editorial / retro),不要說 modern;(2) 給負面表列("no rounded corners", "no white background");(3) 給靈感來源("inspired by Bloomberg Terminal" / "like a Wim Crouwel poster")。三招一起上會明顯改善。

    plugin 會不會限制我能寫什麼?

    不會。Plugin 不阻擋 indigo-500 或 Inter,只是在你沒明確指定時避免它預設用。需要紫色漸層就直接寫「I deliberately want an indigo gradient for this corporate SaaS」,plugin 會配合。它是 nudge,不是 hard lock。

    🔗 延伸資源

    author
    陳彥彤

    AI 工程師 · AI 顧問。Java 後端 8 年、AI 工程師 2 年。AI 內訓 · AI 導入顧問 · 前後端與雲端培訓。

    support

    覺得文章有用可以到 GitHub 給個 star,或是透過信箱聊聊 AI 內訓、AI 導入顧問或前後端 / 雲端培訓。

    related

    相關文章

    [Claude Code] · 27min
    AI 寫的前端為什麼都長一樣?「purple problem」歷史考古 + 反 AI 味 system prompt 全文公開
    產業內叫它 distributional convergence、purple problem、AI slop——每個 LLM 寫的前端都是紫色漸層 + Inter + 三欄卡片。本文做歷史考古(Instagram 2015 → Tailwind UI 2020 → 訓練資料污染),拆解 Anthropic 四維度框架(typography / color / motion / spatial),並公開那份反 AI 味的 system prompt 全文。
    [Claude Code] · 20min
    Superpowers 暴衝 121k stars、Anthropic 收編,該裝嗎?跟手寫 skill 怎麼選
    obra/superpowers 7 個月 121k stars、2026/01 進 Anthropic 官方 plugin marketplace,14 個內建 skill 把資深工程師工作流(brainstorm/TDD/debug)強行套到 Claude Code 上,token -14%、首次成功率 +40%。但我自己跑兩週發現:小任務反而 +20% token、demo 前急著修 bug 被 brainstorming 拖住、Haiku 跑不動。本文拆 14 個 skill 各自解什麼、5 個踩坑、跟自己手寫 skill 的對照表(從適用任務、學習曲線、客製化彈性、維護成本四個維度比較)、Jesse Vincent 的設計哲學(讓 Claude 暫停,不是變聰明)。
    [Claude Code] · 19min
    Claude Code Plugin 設計拆解:從 zenbu-powers 偷到的 5 個架構模式
    想做 Claude Code Plugin 但不知道架構怎麼設計?本文翻完 zenbu-powers(一個 0 star、沒人注意的 Plugin),直接把兩個設計搬進自己的 CLAUDE.md。拆解值得偷的 5 個架構模式:Hook 鏈、Skill 命名、credentials 隔離、跨 plugin 共享 state、版本控制。