prototype
它能做什么
这个技能通过创建几个不同的设计,并让你在它们之间切换,来探索一个界面构想。适合希望在确定方向之前进行比较的设计师和开发者。
适用场景
- ✓当你想为按钮、卡片、消息提示或其他界面组件探索几种方向时。
- ✓当你难以在多种设计方案之间做选择,并想并排查看时。
- ✓当你想把选中的变体引入真实代码库时。
技能链接
https://github.com/spree/spree/blob/main/.agents/skills/prototype/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我们的定价卡片制作三个不同的方向原型,让我在它们之间切换,以便选择一个。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会针对同一份需求,把每个变体构建为真正不同的方案,在探索期间不改动生产代码。它会在选择器后面展示这些变体,只有在你批准后,才会把选中的变体移入代码库。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Prototyping Variants
A divergence skill. It does ONE thing: take a described piece of UI ("a toast", "the pricing card", "a hold-to-delete button"), build several genuinely different versions of it, and put them behind a visual picker so the user can flip through them live and choose a winner. It does not review existing UI (that's review-animations), plan fixes for it (that's improve-animations), or choose dependencies (that's pick-ui-library).
Operating Posture
You are a senior design engineer running a design exploration. The entire value of this skill is divergence: three tints of the same idea waste the picker — the user learns nothing by flipping between them. Each variant must be a direction you could defend shipping on its own, exploring a genuinely different answer to the same brief.
Divergence is not an excuse to drop the craft bar. Every variant individually meets Emil Kowalski's standards — right easing (ease-out on entrances, never ease-in), sub-300ms UI motion, correct transform-origin, transform/opacity only, reduced-motion handled. A sloppy variant doesn't widen the exploration; it just loses on execution and teaches nothing about the direction it represents.
Hard Rules
- Never touch production code during exploration. Everything lives in an isolated prototype surface (see Phase 4). Integration happens only in Phase 6, only for the variant the user picked.
- Variants diverge on a named axis — layout, density, personality, motion, interaction model. Before building, you must be able to state each variant's axis in a phrase. Sharing the project's tokens is not convergence; variants should feel native to the product.
- Every variant fully works. Real interactions, real motion, realistic content — actual product-shaped copy, plausible names and numbers. No lorem ipsum, no dead buttons, no "imagine this part".
- The picker is chrome, not a contestant. Its exact markup, styles, and behavior are specified in PICKER.md — copy them verbatim. Its look is not a design decision and never adapts to the project.
- Clean up after the choice. When a winner is promoted, delete the prototype surface unless the user asks to keep it.
Workflow
Phase 1 — Scope
One thing per run. If the description spans multiple components ("the dashboard"), narrow it: pick the single highest-leverage piece, say which and why, and offer the rest as follow-up runs. Restate the brief in one sentence — what the thing is, where it will live, what it must do.
Phase 2 — Recon
Before designing anything, map the ground the variants must stand on:
- Stack: framework, styling system (Tailwind, CSS modules, vanilla), motion library if any.
- Tokens: colors, radii, spacing, fonts, easing/duration variables. Variants use these — every variant should look like it could ship in this product tomorrow.
- Personality: playful consumer app or crisp dashboard? This bounds how far the boldest variant may go.
- Context: where the piece renders — against what background, beside what neighbors, at what sizes.
If there is no project (empty directory, or the user is just exploring), skip to the standalone branch in Phase 4 and choose a restrained default look: neutral grays, one accent, system font stack.
Phase 3 — Choose directions
Default 3 variants; up to 5 when the user asks or the design space is genuinely wide. More than 5 dilutes the comparison.
Before writing any code, list the set: a name and an axis for each. Names describe the direction — "Quiet", "Editorial", "Playful", "Dense" — never "Option A/B/C". If two proposed directions would differ only in accent color or copy, they are one direction; replace one with a real alternative (different layout, different interaction model, different motion story).
Completion criterion: every variant has a name and a stated axis, and no two variants share an axis position.
Phase 4 — Build the picker harness
Two branches, by what exists:
- In a project with a dev server — an isolated route or page (
/prototypes/<slug>, or the framework's equivalent), one file per variant plus a small harness file. Nothing imports from the prototype surface into production code. - No project / static context — a single self-contained HTML file (inline CSS/JS) the user can open directly in a browser.
The picker's markup, styles, keyboard wiring, and placement come from PICKER.md, verbat
常见问题
探索期间它会改动我的生产代码吗?
不会。在你选定之前,变体都保存在独立的原型区域中。
为什么变体必须真正不同?
细微的调整会浪费选择器的作用,因为在几乎相同的版本之间切换,你学不到任何东西。
每个变体都达到相同的质量标准吗?
是的。每个变体都要符合相同的动效标准,包括对减少动态效果的处理。
详情
作者的原始描述
Build multiple genuinely different versions of a UI piece you describe, rendered behind a visual picker so you can flip through them live and promote the one that feels right. Only runs when explicitly invoked; it does not trigger on its own.
repo: spree/spree
热度
- GitHub 星标
- 16k
- 排名
- #10878
- 许可证
- BSD-3-Clause
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
animate
16k从零开始构建动画,先判断是否应该产生动效,再在编写代码之前确定其目的、时长和曲线。
animation-vocabulary
16k把对某个动画或动效的模糊描述,转换为其准确的技术名称,让你知道该问什么。
apple-design
16k把 Apple 的流畅设计理念带到网页上,涵盖响应式手势、弹簧动效、可中断的过渡和减少动态效果。
find-animation-opportunities
16k在界面中搜索最适合添加动效的地方,并排除其余部分。给出一份简短的精确动画建议清单,且不改动代码。