replica-design
它能做什么
这项技能为新应用搭建视觉系统,包括颜色、字体、间距,以及带有各种状态的组件。它适合希望界面一致且易于访问的设计师和开发者,并基于开放的图标集和字体。
适用场景
- ✓当你需要为新应用制作包含颜色角色、字号和间距的设计系统时。
- ✓当你希望把按钮、表单等每个组件及其状态都定义清楚的时候。
- ✓当你需要检查文字颜色是否达到无障碍对比度标准时。
技能链接
https://github.com/Jakeschincariol/replica-skill/blob/main/replica-design/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我为我的应用搭建设计系统,包括颜色角色、字号和组件,并检查文字的 WCAG 对比度。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会从参考截图中归纳样式规律,并将其转换为颜色、字体、间距和圆角的设计令牌。接着它会写出组件规格,并对每一组文字配色运行对比度检查。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
replica-design
Reads replica/recon.md and the screenshots in replica/screens/. Writes
replica/design/tokens.json (template in this folder), tokens.css, the
Tailwind mapping, and replica/design/components.md.
python3 contrast.py replica/design/tokens.json # every text pair, WCAG ratio
The rules
What you rebuild is the system: the roles, the scale, the patterns, the way a form or a modal behaves. Those are not ownable, and users expect them. What you never take:
- Logos, icons, illustrations, photos, sounds. Use an open icon set (Lucide, Phosphor, Heroicons, Tabler, all MIT or similar) and make or commission your own illustrations. Do not trace theirs.
- Licensed fonts. If the original uses a paid or proprietary font, pick an open one with the same job: Inter, Geist, IBM Plex, Manrope, Source Serif.
- Their copy. Every label and empty state gets written fresh.
- Their brand colour. Record it as a role (
accent), use a neutral placeholder now, and replica-brand gives you your own. The signature colour plus the signature layout is trade dress, and it changes before launch.
Step 1: measure, do not guess
From the screenshots (zoom in, use a colour picker on the user's machine):
- Colour roles, not colours: bg, surface, border, border-input, text, text-muted, accent, on-accent, danger, success, warning. Count how many greys the app really uses. Usually 5 to 7.
- Type scale: sizes, line heights, weights. Snap to a scale (12, 14, 16, 20, 28, 40 is common). Note the font category, not the font file.
- Spacing: measure gaps between elements. It is almost always a 4 or 8 base. Write the scale.
- Radius, shadow, motion: two or three of each.
- Layout: max content width, grid, breakpoints, sidebar width, header height.
Step 2: write the tokens
Fill tokens.json. Keep the role names. replica-brand only changes values.
Generate tokens.css as custom properties and map them into Tailwind's theme
so components use bg-surface text-muted, never raw hex.
Add a pairs list for every text and background combination the app uses,
then:
python3 contrast.py replica/design/tokens.json
AA is the floor: 4.5:1 for body text, 3:1 for large text and for input borders and focus rings. It exits 1 on a failure. Fix it in the tokens, not per component.
Step 3: component specs
For every component in the recon list, one block in components.md:
Button
variants primary, secondary, ghost, danger
sizes sm 32px, md 40px, lg 48px
states default, hover, active, focus-visible (2px ring, accent), disabled, loading
tokens bg accent, text on-accent, radius md, font sm/600
a11y real <button>, visible focus, loading keeps the label for screen readers
used on S02, S07, S09
Every state the recon saw, plus the ones it should have: focus, disabled, loading, error, empty. Keyboard and screen reader behaviour is part of the spec.
Step 4: build the primitives
Build the components in code once, in isolation (a /design route or
Storybook), before any screen. Use an accessible base if the stack has one
(Radix, shadcn/ui, React Aria). Screenshot the page. That is the design system
check.
Output
tokens.json, tokens.css, the Tailwind config, components.md, the
primitives built, and a contrast report with zero AA failures. Next:
/replica-build.
常见问题
它会复制标志或字体吗?
不会。该技能要求使用开放的图标集和开放字体,并自己绘制插图。
对比度检查器是做什么的?
它是一个脚本,用于计算设计令牌中每组文字颜色的 WCAG 对比度比值。
原有的品牌颜色会保留吗?
不会。该技能会把原品牌颜色记录为一个角色,并在你设定自己的品牌之前使用中性的占位颜色。
详情
作者的原始描述
Rebuilds an app's design system for a clone: colour roles, type scale, spacing, radius, shadows and every component with its states, as design tokens plus component specs, with original assets instead of the target's logos, icons, illustrations or licensed fonts. Includes a WCAG contrast checker. Use when the user says "match the design", "rebuild the design system", "get the colours and fonts", "make it look like X", "design tokens for my clone", or after /replica-architect.
热度
- GitHub 星标
- 7.1k
- 排名
- #13580
- 许可证
- MIT
- 更新时间
- 2026/10/3
评论
- …
同一仓库的更多技能
replica-architect
7.1k帮你的智能体根据功能地图,为新应用规划技术栈、数据库和 API,并先从一个可工作的薄切片开始安排构建顺序。
replica-backend
7.1k帮你的智能体使用官方 API 构建应用的服务端,包括登录、数据库规则、Stripe 支付、邮件以及后台任务。
replica-brand
7.1k帮你的智能体为应用命名并重新塑造品牌,使其与众不同,包括需要进行的名称检查、新的配色、标识简报,以及对残留名称的全面扫描。
replica-build
7.1k帮你的智能体根据功能地图,从外壳开始、再到核心流程,逐屏构建新应用,所有内容都重新编写。