Skip to content

JimLiu/baocut / skills/baocut/built-in-skills/design-system

design-system

Verified

用户要建立或修改设计系统时用:品牌的颜色、文字样式、间距与圆角 tokens,给智能体看的品牌手册 README,bundle 与预览,标志、图标与字体。在工作目录写一个设计系统目录(design-system.json 加 tokens.json、README.md、components/、assets/、fonts/),可以从代码仓库或设计工具里的真实来源整理;图片、视频与 PDF 导入设计系统的素材库,校验通过后线程里出现设计系统卡片,用户在功能区预览与编辑;做好的设计系统可以装进设计稿。

FileKindSize
.baocut-meta.jsonconfig2.0 KB
SKILL.mdskill md16.4 KB
references/cover.mdmarkdown6.8 KB
references/craft.mdmarkdown8.6 KB
references/demo.jsonconfig161.1 KB
references/format.mdmarkdown18.4 KB
references/from-code.mdmarkdown11.3 KB
references/from-design-tool.mdmarkdown16.0 KB
references/sample-seazar-tokens.jsonconfig11.0 KB

references/cover.md

View on GitHub
# 封面:components/Cover/preview.html

每个设计系统都有一个封面。它是一份和组件预览完全一样的预览文档——第 1 行是 marker(`<!-- @dsCard height=288 -->`;240–360),同样的 preview frame、预加载(tokens.css、字体、bundle.css、bundle.js)、上限和 theme 传递——Overview 把它显示在品牌手册上方,这样设计系统一打开就有一张门面。目录要保持**干净**:旁边放一个 README.md 或 Cover.d.ts,或者 bundle 头部里出现 `Cover`,都会让它变成普通组件,设计系统就没有封面了。**最后**写它,依据你已经做好的内容。

## 方向:配色与图案

封面展示人们记住一个设计系统所凭的两样东西——它的颜色和它的形状——并以名字为主体。三个部分,每次都要有:

1. **色块。** 把配色做成大块的实色区域,而不是 chip:三到五个色块,用设计系统的 identity 色,取**十足**的色值——品牌、accent 和信号色相,一种深的 ink 或深色 surface,再加一个 tint 用来透气——合起来占封面的四分之一到一半。按 identity 分配分量,而不是按界面里的使用频率:人们认得这个品牌的那些颜色占大色块,即使界面里很少用它们(以中性色为主的设计系统,打头的是它那一两种色相);只用来表示某个 state 的颜色(错误红)保持小块。从 scale 里裁出它们:边长取间距级或其倍数,圆角取圆角 token(方正的设计系统就用直角;pill 或圆形把 `rx` 设为短边的一半——SVG 里 `rx` 为 9999px 画出来的是椭圆,不是 pill)。按品牌自己的构图方式排列——齐平的模块化 grid、错落的堆叠、一块高板加几块卫星、一条由宽窄不一的色带拼成的长条、从上边或右边出血的色块。绝不排一行等大的方块:那是 swatch table。
2. **一种图案**,叠在色块上或夹在色块之间,用色块的颜色(或在色块上镂出底色),依据设计系统对自己的描述来选——README 里的原则和 tokens 的 `usage` 说明:
   - 柔和、友好、大圆角 → 取自圆角 scale 的圆、pill、半圆
   - 精确、技术感、等宽字体、4px grid → 以一个间距级为步距的点状或加号 grid
   - 编辑出版风、衬线、「用边框,不用阴影」 → **几条**发丝线(用设计系统的发丝线 token,保持它本来的强度)或横穿色块的 baseline grid——绝不铺满一片线,绝不只有线没有色块
   - 张扬、粗重、海报式字体 → 以一个间距为节距的条纹、人字纹或棋盘格
   - 几何、模块化、密集的界面 → 用圆角 token 切出的 tile,其中一些像组件那样合并成两格宽
   - 具象母题(镜头、波浪、叶子、票券、火花)→ 由圆角构成的弧、四分之一圆或那个剪影
   - 有特色的 display 字体或数字字体 → 一个超大的字形或数字当作形状用,被色块裁切

   是形状,不是图画:不要人脸、吉祥物、图标或场景。选最能体现**这个**品牌的那一行,并在推导里说明原因;如果一个普通的设计系统也会落到同一行**并且**同样的排列,就换个排列。几何取自 scale(节距、间隙、圆角都是 token);tile、圆点或 pill 用十二到六十个单元,线用三到六条——绝不上百。
3. **名字**用 display 字体(只有一个 family 的设计系统:用正文 family 的 display 字重),最大 120px,leading .9–.95(两行时 .95 或更大),放在左下角的**底色**上,用 ink,下面一行标语,13–14px,用 muted(用 README 里的,或者用设计系统的口吻写一句话),两者放在一个最宽 440px 的文本块里。不要别的字。名字与 README 里的写法完全一致——同样的词、同样的大小写——只能在它本来就有的空格或连字符处断行(绝不在单词中间断),最多两行。给它划区:从 120px 往下到 64px 里选一个字号,让它最长的一行 ≤ 440px(fallback 字体最多宽出五分之一:无衬线按每个字母 0.6em 算,衬线 0.55,等宽 0.62);行数 × 字号 + 标语 + 两个间距级还必须放得进高度。如果到 64px 仍宽于 440px,就用顶部色带 skeleton(见「规则」)。否则每个色块和图案单元都放在 x = 480 的右边:没有任何东西压过名字或标语,发丝线也不行。

规则:
- **一个内联 SVG 加两个文本元素,铺在底色上**;每个 fill、stroke 和 `rx` 都是绑定到 token 的 class(`.brand{fill:var(--brand)}`、`.tile{rx:var(--radius-lg)}`;pill 和圆形:短边的一半)。不用图片,不用 tokens 没定义的渐变或阴影。
- **两个 theme 是同一个文件。** 渲染 dark 并**看一看**:和底色只差几个百分点的色块在那里会消失——把它绑定到另一个 token,而不是给它描边。
- **一种 layout,960 × 高度。** Overview 按 960px 宽排布封面,在较窄的页面上把整张图等比缩小,所以在任何宽度下看起来都一样。不写任何响应式:不用宽度查询(容器查询或媒体查询),不用 `cqw`/`vw` 尺寸,不做窄屏 layout。色块和图案放在从 x = 480 到右边缘的一个框里。唯一的另一种 skeleton:一条由色块和图案组成的色带横贯顶部全宽(高 96–120px,约为高度的三分之一,与名字的 cap line 隔开一个间距级),名字在它下面,字号按第 3 条定;因为太宽才落到这里的名字,取 ≤ 64px 里能让最长一行放进 960px 减去文本块左右内边距的最大字号。品牌习惯用水平条带构图时用它,名字对它的区域来说太宽时也一律用它。
- **不要动效。**
- **眯眼看:**先读到名字,再是颜色,再是图案;如果图案抢了戏,把它的数量减半。**拇指盖住名字:**光凭色块和图案就该看得出这是哪个品牌;如果它们放在谁身上都行,那就是颜色或那一行选错了。
- **先写推导**——四行,作为注释保留在 SVG 顶部:色块(token × 尺寸)、排列、图案那一行以及选中它的那句话、用到的间距级和圆角。色块、图案或 scale 那一行里如果没有 token,就从头再来。

避免:条形码(一片细竖线朝某条边越来越密)、swatch table、彩纸屑(超过五种颜色或两种图案)、海报(图案比名字还抢眼)、色块上写字。名字、配色、display 字体或 scale 变了时重新生成,较小的改动不重新生成。用户靠提要求来改它——在聊天里或评论里(「安静一点」、「多点绿色」、「用波浪」):修改这个文件,除非要求改变了推导,否则保留推导,存为一个修订版本。它不在页面里编辑。
canvas-designanthropics/skillsCreate 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' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse 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.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse 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.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse 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.Stars: 198kUpdated Claude CodeCodexVerifiedInstall