prototype

作者: emilkowalski

为你描述的UI组件构建多个真正不同的版本,渲染在可视化选择器后方,便于你实时切换浏览并提升最合适的一个。仅在显式调用时运行;不会自行触发。

npx skills add https://github.com/emilkowalski/skills --skill prototype

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

  1. 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.
  2. 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.
  3. 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".
  4. 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.
  5. 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, verbatim — load it now and build exactly that. Beyond the picker itself, the harness must render one variant at a time, full size, in realistic surrounding context — a toast needs a page behind it, a card needs siblings, a button needs a form. Side-by-side thumbnails distort spacing and scale; never judge UI at postage-stamp size. Switching is instant — flipping is a 100+/session action; by the frequency rule the variant swap gets no animation.

Phase 5 — Verify and hand off

Run the harness. Confirm every variant renders, every interaction responds, and the console is clean — flip through all of them yourself before showing the user. If browser tooling is available, screenshot each variant.

Then present the set and stop — the choice belongs to the user:

#VariantAxisWhen it's the right choiceIts cost
1QuietMinimal motion, borders over shadowsThe product is a daily-use toolLeast memorable
2EditorialLarge type, generous whitespaceThe moment deserves weightEats vertical space

Close with where the picker is running (URL or file path) and the keys to flip.

Completion criterion: every variant is reachable from the picker and behaves correctly; no console errors; the table names each variant's tradeoff honestly.

Phase 6 — Promote on selection

When the user picks: integrate that variant where it belongs, following the project's existing conventions (file layout, naming, token usage), then delete the prototype surface per Hard Rule 5. If the user instead wants another round, keep the harness and run Phase 3 again, diverging around the direction they gravitated to.

Invocation Variants

InvocationBehavior
<description>Full workflow: scope → recon → 3 variants → picker → wait for choice
<description> x5Same, with that many variants (capped at 5)
riff <variant>New round: keep the harness, generate a fresh set diverging around the named variant's direction
keep <variant>Promote that variant into the codebase and delete the prototype surface
keep <variant>, leave the pickerPromote, but keep the prototype surface around

Tone

Sell each variant honestly — one line on when it wins, one on what it costs. Never pre-pick a favorite in the table; if the user asks which you'd choose, answer with a reason rooted in the product's personality and frequency of use, not aesthetics alone. If two variants converged while you built them, cut one and say so: a picker with two truly distinct directions beats one padded to three.

来自 emilkowalski 的更多技能

find-animation-opportunities
emilkowalski
搜索代码库或UI中未添加动画但应当添加动画的位置,并排除所有不应添加动画的内容。只读操作;它提出带有精确数值的动效方案,但不负责实现。当用户询问“这里可以添加什么动画?”或希望“让这个更有活力”时使用。如需修复现有动画,请改用improve-animations或review-animations。
developmentdesigncreative
animate
emilkowalski
从零开始构建动画,按顺序做出决定,以判断动画是否合适——是否应该动画化,目的为何,使用哪种工具,哪些属性,哪种曲线和时长,如何被打断,如何退出。编写实现代码。当被要求为某物添加动画、增加动态效果、让组件有生命力,或构建过渡效果时使用。若要批评现有动态效果,使用review-animations;若要审计整个代码库,使用improve-animations。
pick-ui-library
emilkowalski
从前端任务的精选列表中选择合适的库——数字输入、OTP输入、图表、命令菜单、虚拟化、拖放、提示通知、状态管理、样式等。仅在明确调用时运行,不会自行触发。
ask-sonner
emilkowalski
Sonner(React 弹窗通知库)使用指南——安装并接入 Toaster、选择合适的 toast() 调用、处理 promise 和加载状态的 toast、更新、关闭和持久化 toast、样式、主题和图标、定位以及多个 Toaster。适用于使用 Sonner 或排查相关问题的情况——例如 toast 不显示、重复显示、样式丢失、忽略 Tailwind 类、被模态框遮挡,或不跟随深色模式。
emil-design-eng
emilkowalski
该技能编码了Emil Kowalski关于UI打磨、组件设计、动画决策以及那些让软件体验出色的隐形细节的设计哲学。
designdevelopmentcreative
review-animations
emilkowalski
根据Emil Kowalski的设计工程哲学,对动画和动效代码进行高工艺标准审查。默认标记问题,需争取通过。
animation-vocabulary
emilkowalski
反向查找词汇表,将关于网页动画或运动效果的模糊描述转化为精确术语(例如:“弹出窗口打开时的弹跳效果” → 弹入;“iOS的橡皮筋滚动” → 橡皮筋回弹)。当用户问“那个叫什么来着……”,或描述一个运动效果但
creativedesignresearch
improve-animations
emilkowalski
以资深动效顾问的身份审查代码库中的动画与动效代码,生成一份优先级排序的审计报告及自包含的实现方案,供其他智能体(或更经济的模型)执行。仅对源代码进行只读操作——它规划改进方案,但不实际应用。适用于用户提出“改进动画效果”、“审计动效”、“让这个应用体验更好”,或希望获得动画修复路线图而非单一差异审查的场景。