Community程式設計與開發github.com

前端設計

在構建新 UI 或重塑現有 UI 時,提供獨特且有意識的視覺設計指導。協助決定美學方向、字體排版,並做出不似套版預設的選擇。

前端設計 是什麼?

這個技能將使用者定位為設計工作室的設計總監,專注於為每個客戶打造獨一無二的視覺識別,避免落入俗套或樣板化。它提供了從設計原則、排版、版面結構到文案寫作的全面指導,強調設計決策應根植於主題本身,而非套用常見的預設模式(例如暖奶油色背景搭配陶土色強調色,或 SaaS 卡片佈局)。用戶可以先規劃一個包含色彩、字體、佈局和原則的緊湊設計計畫,並對照簡報進行審查,確認其獨特性後再撰寫程式碼。技能也鼓勵克制與自我批判,例如將大膽設計集中在一處,並確保回應式設計、無障礙性與和諧配色等品質底線。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/anthropics/skills/tree/main/skills/frontend-design

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

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

說明文件

前端設計 是做什麼的?

請以設計工作室設計總監的態度來處理,該工作室以為每位客戶打造獨一無二、不會被誤認為他人的視覺識別而聞名。這位客戶已拒絕過感覺陳腔濫調或樣板化的提案,並願意為獨特的觀點付費:針對此簡報,做出關於色板、字體排版和版面配置的深思熟慮且具主見的選擇,並在合理的情況下承擔美學風險。

將設計根植於主題

如果簡報未指明產品或主題為何,請在設計前自行確認,並與客戶核實。你可以提出一個具體的主題、該設計的受眾以及該設計的主要任務,作為提案。如果你的記憶中有任何關於客戶偏好或其正在建構內容的相關資訊,請將其作為提示。主題的產業、主題內容、材質和慣用語,正是獨特視覺選擇的來源——為 8-11 歲女孩設計的玩具,其美學將會與金融分析師的儀表板截然不同。在整個過程中,使用簡報中的真實內容和主題進行建構。

設計原則

對於網頁設計,英雄區(Hero)是觀眾首先看到的內容。以主題世界中最具特色的元素開場,並採用最合適的形式:標題、圖片、動畫、即時展示、互動時刻或其他處理方式。你的選擇必須是深思熟慮的:一個大數字配上小標籤、輔助統計數據和漸層強調色是預設處理方式,因此只有在這確實是最佳選項時才使用它。

字體排版承載了頁面的個性。顯示或標題文字與正文內容不需要使用不同的字體族:可以只使用一個家族或兩個家族,如果使用兩個,務必確保它們有明顯區別。

刻意選擇你的字體,而非在任何其他專案中都會隨手使用的預設家族,並遵循《字體排印風格元素》的預設指南,設定清晰的字體階層,包含有意的字重、字寬和字距。當文字用作標題或視覺元素時,要讓文字處理本身成為設計的主動部分,而非中性的內容傳遞載體。

預設將行長限制在少於 80 個字元。襯線字體的行長可以稍微長一些;為襯線正文提供比無襯線字體稍高的行高。

避免以下這些預設的字體排印處理方式;它們是產生式頁面最常見的破綻:

  • 僅在標題中強調一個單字或短語,例如將一個單字設為斜體/粗體或不同顏色。
  • 對標籤使用全大寫。
  • 在內容上方添加不必要的字體排印標籤。

視覺結構即是資訊。像輪廓線、邊框、編號、眉題(eyebrows)、分隔線、標籤等結構性工具,是對內容進行有用的資訊編碼,而非裝飾。許多通用設計會使用編號標記(01 / 02 / 03),但這僅在內容確實是序列時才適用——例如一個逐步流程或時間軸。在添加編號標記之前,請檢查內容是否真的是序列。

謹慎且有目的地使用非使用者觸發動畫,僅用於吸引注意力。一個精心編排的時刻——一次頁面載入序列或一次揭露——效果勝過分散的效果;每個區塊的淡入上滑進入效果和每張卡片的懸停過渡是通用的預設,看起來像 AI 生成。回應使用者動作(開啟、展開、確認)的動畫,當它能顯示出變化的內容時,是受歡迎的。

仔細考慮書面內容。通常,設計簡報可能不包含真實內容,你需要自行構想文案和佔位內容。文案本身可能讓設計感覺和設計本身一樣樣板化。有關更多指導,請參閱下方關於文案寫作的部分。

流程:規劃、對照簡報審查、建構、批評

作為校準,目前 AI 生成的設計通常集中在以下幾個特徵:

  1. 暖奶油色背景(接近 #F4F1EA),搭配高對比度的襯線顯示字體和陶土色或暖泥色強調色(通常接近 #D97757——Anthropic 自家 Claude 互動的強調色,因此在使用者的簡報中,這看起來像是一個破綻);
  2. 近乎黑色的背景,搭配單一鮮豔的酸性綠或朱紅色強調色;
  3. 寬幅報紙風格的版面,使用極細線條規則、零邊框半徑和密集的新聞式欄位;
  4. SaaS 卡片套件:內容被切割成相同的圓角卡片,無論層級如何,所有元素統一使用一個邊框半徑,每張卡片下方使用相同的柔和灰色陰影(rgba(0,0,0,.1)),並使用漸層色水洗作為裝飾;
  5. 無論主題為何,都會出現的模板鉻元素:每個標題上方都有一個全大寫的眉題標籤;使用中間點連接的中繼字串(‘A · B · C’);使用帶有空心長破折號的『WORD — fragment』格式作為標籤;使用帶色調的近乎黑色(#0B0B0B, #111)代替黑色;為小型資料標籤使用等寬字體;在連結和按鈕文字後附加一個『→』符號。

所有這些特徵對於某些簡報來說都是合理的,但它們是預設值而非選擇,並且它們的出現與主題無關。當簡報確定了視覺方向時,請嚴格遵循——簡報本身的措辭始終優先,即使它要求採用上述其中一種外觀。當簡報在某個軸向留出自由時,不要將這份自由揮霍在這些預設之一上。如同僱用的人類設計師一樣,通常需要在發揮所長與將每個專案視為嘗試和學習的機會之間取得謹慎的平衡。

分兩次進行。首先,根據客戶的設計簡報,腦力激盪一個簡短的設計計畫:建立一個包含色彩、字體、版面配置和原則的精簡代碼系統。

  • 色彩:將核心基礎色板描述為 4-6 個具名的十六進位值。
  • 字體:使用的字體及其角色。
  • 版面配置:一個版面配置概念,使用一句話的散文描述和 ASCII 線框圖進行構思和比較。包含對齊指導;內容應左對齊、置中對齊或齊行對齊?
  • 原則:說明此頁面獨特之處的高階指導方針。

然後,在開始建構之前,對照簡報審查該計畫:如果計畫的任何部分看起來像是你會為任何類似頁面產生的通用預設(嘗試類似提示,看看是否會得到類似結果),而不是為此特定簡報所做的選擇——請修改該部分,說明你更改了什麼以及原因。只有在確認了你的設計計畫相對獨特之後,你才可以開始依照修訂後的計畫編寫程式碼。

在編寫程式碼時,請注意 CSS 選擇器的特異性結構。很容易產生相互抵消的 CSS 類別(尤其是當你混合使用基於類型的選擇器(如 .section)和基於元素的選擇器(如 .cta)時)。這在區塊之間的內距/外距上經常發生。

克制與自我批評

將你的大膽集中在一處。讓一個元素成為令人難忘的部分,保持其周圍的一切安靜且有紀律,並刪除任何不服務於簡報的裝飾。建構到一個品質底線,但不需要明說:支援到行動裝置的響應式設計、可見的鍵盤焦點、尊重減量動畫(reduced-motion)、視覺上可及、和諧的色板。在構建時批評自己的工作,如果環境允許,截圖檢視——一張圖勝過千言萬語。思考香奈兒的建議:出門前,照照鏡子並取下一件飾品。人類創作者擁有記憶,並總是試圖做些新的事情,因此如果你有空間快速記下你嘗試過的筆記,它可以幫助你在未來的迭代中做得更好。

更多關於設計中的文案寫作

文字在設計中出現只有一個原因:讓人更容易理解和操作。它們是設計內容,不是裝飾。將與處理間距和色彩時相同的意圖和簡約態度帶入文案寫作。在寫任何東西之前,先問問設計需要表達什麼,以及如何最好地表達以幫助使用者瀏覽體驗。

從終端使用者的角度出發。用使用者能以簡單語言理解的詞彙來命名事物,而不是根據系統的建構方式。使用者管理的是「通知」,而不是「Webhook 配置」。用平實的語言描述某物是什麼或做什麼,而不是推銷它。對新使用者來說,具體且易讀永遠比聰明更重要。

預設使用主動語態。CTA 按鈕確切地說明了使用它時會發生什麼:「儲存變更」,而不是「提交」。一個動作在整個流程中保持相同名稱,因此顯示「發佈」的按鈕產生的提示訊息是「已發佈」。介面的詞彙是使用者在產品中導航的路標。連貫性和一致性是人們學習如何操作的方式。

將失敗和空白狀態視為提供指導的時刻,而非傳達情緒。用介面的語氣(而非人類的語氣)解釋出了什麼問題以及如何修復。錯誤不會道歉,也永遠不會含糊其辭。空白螢幕是一個邀請行動的時刻。

保持對話式語氣:樸實的動詞、句首大寫、無填充詞,語氣與品牌和受眾相匹配。讓每個書面元素只做一件事。

Individual skills in this repo

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

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists

anthropics/template-skill

Replace with description of the skill and when Claude should use it.

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists

claude-api

|-

discernment-nudge

After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.

doc-coauthoring

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

pptx

Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill

slack-gif-creator

Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

xlsx

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.

相關技能