Community编程与开发github.com

前端设计

构建新 UI 或重塑现有界面时,提供独特、有意的视觉设计指导。帮助确定美学方向、排版方案,并做出不流于模板化的设计选择。

前端设计 是什么?

这是一个针对 AI 代理(如 Claude Code)的前端设计技能,旨在帮助代理在构建 UI 时产出具有独特视觉风格的设计,避免千篇一律的模板化外观。该技能的核心方法论是:以具体主题为锚点进行设计,通过系统的设计原则(如排版、视觉结构、动效)取代默认选择,并要求代理在编写任何代码前先制定并评审设计计划。技能覆盖了 web UI 设计的完整流程:从分析主题、定义调色板与字体系统,到使用 ASCII 线框图规划布局,再到最终代码编写与自我批评。此外,它还提供了详细的“特征陷阱”列表(如暖奶油色背景、SaaS 卡片风格等),帮助代理识别并避开 AI 生成设计中常见的刻板印象。该技能不局限于特定平台,但核心应用场景是前端代码生成,通过强化设计意图与视觉独特性,使代理产出更接近资深人类设计师水平的 UI。

兼容平台✓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 个字符。衬线字体可以稍微采用更长的行长;给衬线正文文本的行高应略大于无衬线字体。

避免以下这些默认的排版处理方式,它们是生成页面最常见特征的标志:

  • 仅在标题中强调某个单词或短语,例如将某个词设为斜体/粗体或使用不同颜色。
  • 对标签使用全大写。
  • 在内容上方添加不必要的排版标签。

视觉结构就是信息。轮廓、边框、编号、眉题、分割线、标签等结构元素,用于编码关于内容的有用信息,而不是装饰它们。许多通用设计使用编号标记(01 / 02 / 03),但这仅在内容确实是一个序列时才合适——例如一个分步流程或时间线。在添加编号标记之前,请检查内容是否真的是一个序列。

谨慎且有目的地使用非用户触发的动效,仅用于吸引注意力。单一精心编排的时刻——一次页面加载序列或一次揭示——比分散的效果更好;每个部分的淡入上滑入场和每个卡片上的悬停过渡是通用的默认设置,看起来像是 AI 生成的。回应用户操作(打开、展开、确认)的动效是受欢迎的,它能显示出发生了什么变化。

仔细斟酌文字内容。设计简报中通常可能不包含真实内容,需要你来编写文案和占位内容。文案本身可能让设计感觉和设计本身一样模板化。有关撰写的更多指导,请参阅下面的章节。

流程:规划、对照简报评审、构建、批评

作为校准,当前 AI 生成的设计集中在一些特征周围:

  1. 暖奶油色背景(接近 #F4F1EA),配以高对比度的衬线显示字体和陶土色或暖粘土色强调色(通常接近 #D97757——Anthropic 自家的 Claude 交互强调色,因此在用户的简报中显得很标志性);
  2. 接近黑色的背景配以单一的亮酸性绿或朱红色强调色;
  3. 大报风格的布局,配有发丝线规则、零圆角和密集的报纸式列;
  4. SaaS 卡片套件:内容被切割成相同的圆角卡片,无论层次高低,所有内容都使用相同的圆角半径,每张卡片下方都有相同的柔和灰色阴影(rgba(0,0,0,.1)),并以渐变冲洗作为装饰;
  5. 无论主题如何都会出现的模板化装饰:每个标题上方的跟踪显示全大写眉题标签;用中间点连接的元数据字符串('A · B · C');构建为'WORD — 片段'形式并带间隔长破折号的标签;使用微染色的近黑色(#0B0B0B, #111)代替黑色;小型数据标签使用等宽字体;链接和按钮文本后附加'→'。

所有特征对于某些简报来说都是合理的,但它们是默认设置而非选择,并且它们会无视主题出现。当简报明确规定了视觉方向时,请完全遵循它——简报自身的措辞始终优先,包括当它要求使用上述某种外观时。当简报在某些方面留有余地时,不要将这种自由浪费在这些默认设置上。就像雇佣的人类设计师一样,通常需要在做你擅长的事情和将每个项目视为实验和学习的机会之间取得谨慎的平衡。

分两步进行。首先,基于客户的设计简报集思广益,制定一个简短的设计计划:创建一个包含颜色、字体、布局和原则的紧凑 token 系统。

  • 颜色:将核心基础调色板描述为 4-6 个命名的十六进制值。
  • 字体:使用的字体系列及其角色。
  • 布局:一个布局概念,使用一句话的散文描述和 ASCII 线框图来进行构思和比较。包括对齐指导;内容应该左对齐、居中还是两端对齐?
  • 原则:关于是什么让这个页面独一无二的高级指导。

然后在构建之前对照简报评审该计划:如果计划的任何部分看起来像是你为任何类似页面生成的通用默认设置(通过处理类似提示来检查你是否会得出相似的结果),而不是为这个特定简报做出的选择——请修改该部分,说明你更改了什么以及原因。只有在确认了你的设计计划相对独特之后,才应开始编写代码,并遵循修改后的计划。

在编写代码时,要注意组织 CSS 选择器的特异性。很容易生成相互抵消的 CSS 类(尤其是像 .section 这样的基于类型的选择器与像 .cta 这样的基于元素的选择器一起使用时)。这在各部分之间的内边距/外边距上经常发生。

克制与自我批评

将你的大胆用在一个地方。让一个元素成为令人难忘的东西,保持其周围一切元素的安静和纪律性,并删减任何不为简报服务的装饰。以不张扬的方式达到质量底线:响应式直到移动端、可见的键盘焦点、尊重减少动效偏好、视觉无障碍、和谐的调色板。在构建过程中批评自己的工作,如果你的环境支持,截图进行审查——一张图片胜过一千个 token。回想香奈儿的建议:出门前,照照镜子,摘掉一件配饰。人类创意人员有记忆并且总是尝试做一些新的事情,所以如果你有空间快速记下你尝试过的东西,它可以在未来的工作中帮助你。

关于设计中的写作

文字出现在设计中的唯一原因是:使理解和使用的过程更容易。它们是设计内容,而不是装饰。在文案写作中要投入与间距和颜色相同的意向性和极简主义。在写任何东西之前,要问设计需要传达什么,以及如何最好地表达它来帮助用户浏览体验。

从最终用户的角度写作。用用户能用简单语言理解的方式来命名事物,而不是根据系统的构建方式。用户管理“通知”,而不是“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

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 \

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 \

相关技能