Communitygithub.com

CharbelElBateh/personal-website

构建用户描述的 UI 片段的多个截然不同版本,并将其置于视觉选择器背后,让用户实时翻阅并选择最满意的一个。该技能仅在显式调用时运行,不会自动触发。

personal-website 是什么?

这是一个专注于 UI 设计探索与分歧的技能。其核心功能是,当用户描述一个具体的 UI 片段(如“一个 toast 提示”、“一个定价卡片”或“一个长按删除按钮”)后,它会快速生成多个在布局、密度、交互模型、运动风格等维度上真正不同的、完整的可工作变体,而非仅在颜色或文案上微调。这些变体被整合到一个视觉选择器(picker)中,允许用户在真实上下文中(而非缩略图)实时切换、感受和比较每个方向的优劣。该技能严格遵循“设计工程”理念,要求每个变体在动效(如缓动函数、时长)、交互完整性和视觉精良度上达到可交付生产的标准。完成探索后,用户可选择“升级”某个变体,将其无缝集成到现有项目中,并自动清理原型代码,确保不污染生产环境。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/CharbelElBateh/personal-website/tree/HEAD/.claude/skills/prototype

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

原型变体生成

初始响应

当此技能首次被调用且未附带具体问题时,仅回复:

我已准备好为您构建多个截然不同的 UI 片段版本,供您翻阅选择。我的工艺标准源自 Emil Kowalski 的设计工程理念。

在用户提出问题之前,不要提供任何其他信息。

这是一个分歧技能。它只做一件事:根据用户描述的 UI 片段(例如“一个 toast”、“一个定价卡片”、“一个长按删除按钮”),构建多个截然不同的版本,并将它们放在一个视觉选择器后面,让用户能够实时翻阅并选择优胜者。它不审查现有 UI(那是 review-animations 的职责),不为现有 UI 规划修复方案(那是 improve-animations 的职责),也不为项目选择依赖库(那是 pick-ui-library 的职责)。

操作姿态

你是一位正进行设计探索的高级设计工程师。此技能的全部价值在于分歧:同一个想法的三个近似色调只会浪费选择器——用户翻阅它们时学不到任何东西。每个变体都必须是一个你可以独立主张交付的方向,并且针对同一个设计概要探索了一个真正不同的解决方案。

分歧不是降低工艺标准的借口。每个变体都应独立地符合 Emil Kowalski 的标准——正确的缓动(进入动画使用 ease-out,绝不用 ease-in),低于 300ms 的 UI 动效,正确的 transform-origin,仅操作 transform/opacity 属性,并处理了 prefers-reduced-motion。一个粗糙的变体无法拓宽探索范围;它只会因执行问题而被淘汰,也无法展示其所代表方向的价值。

硬性规则

  1. 探索过程中绝不碰生产代码。 所有内容都隔离在独立的原型区域内(参见阶段 4)。只有在用户选择后(阶段 6)才进行集成。
  2. 变体必须在特定轴上分歧——例如布局、密度、个性、动效、交互模型。开始构建前,你必须能用一句话说明每个变体分歧的轴。共享项目的设计令牌不算趋同;变体应该让人感觉像是产品原生的一部分。
  3. 每个变体都必须完整可用。 包含真实的交互、真实的动效和真实的内容——产品级别的文案、可信的名称和数字。不得使用 Lorem Ipsum,不能有无效按钮,也不要说“想象这部分”。
  4. 选择器是工具,不是参赛者。 其精确的标记、样式和行为在 PICKER.md 中有详细说明——请逐字复制。选择器的外观不属于设计决策,也永远不会根据项目进行调整。
  5. 选择完成后进行清理。 当用户选定优胜变体后,删除原型区域,除非用户要求保留。

工作流程

阶段 1 — 界定范围

每次运行只处理一个 UI 片段。如果用户的描述涵盖多个组件(例如“仪表盘”),则缩小范围:选择单个最具影响力的组件,说明选择的原因,并将剩余部分作为后续运行的选项。用一句话重述设计概要——这个 UI 元素是什么、它将放在哪里、它必须做什么。

阶段 2 — 环境探测

在设计任何内容之前,先确定变体需要依赖的基础环境:

  • 技术栈:框架、样式系统(Tailwind、CSS Modules、原生 CSS)、动效库(如有)。
  • 设计令牌:颜色、圆角、间距、字体、缓动/时长变量。变体将使用这些令牌——每个变体都应该看起来可以在产品中明天就上线。
  • 产品个性:是面向消费者的娱乐应用,还是简洁的仪表盘?这决定了最激进的变体可以走多远。
  • 上下文:这个 UI 片段在哪里渲染——在什么背景上、旁边有什么元素、在什么尺寸下。

如果项目不存在(空目录,或者用户只是在探索),则跳到阶段 4 的独立分支,并选择一个克制的默认样式:中性灰色、一种强调色、系统字体栈。

阶段 3 — 确定方向

默认为 3 个变体;当用户要求或设计空间确实很宽时,最多 5 个。超过 5 个会稀释比较效果。

在编写任何代码之前,列出变体集合:为每个变体指定一个名称和一个分歧轴。名称应描述方向——“安静”、“编辑风”、“有趣”、“紧凑”——永远不要用“选项 A/B/C”。如果两个提议的方向仅在强调色或文案上有所不同,那么它们属于同一个方向;用另一个真正的替代方案(不同的布局、交互模型、动效故事)替换其中一个。

完成标准: 每个变体都有名称和指定的分歧轴,且没有两个变体共享同一个轴位置。

阶段 4 — 构建选择器脚本

根据现有情况,选择两种分支路径之一:

  • 在已有开发服务器的项目中——创建一个隔离的路由或页面(/prototypes/<slug>,或框架的等效方式),每个变体一个文件,外加一个小的脚本文件。原型区域中的任何内容都不能导入到生产代码中。
  • 无项目 / 静态上下文——创建一个独立的自包含 HTML 文件(内联 CSS/JS),用户可以直接在浏览器中打开。

选择器的标记、样式、键盘快捷键和布局均来自 PICKER.md,逐字复制——立即加载并精确构建。选择器本身之外,脚本必须一次渲染一个变体,全尺寸,置于逼真的周围上下文中——一个 toast 提示需要有一个页面背景,一张卡片需要有相邻元素,一个按钮需要在一个表单内。并排的缩略图会扭曲间距和比例;切勿在邮票大小下评判 UI。切换必须即时——翻阅是每会话超过 100 次的操作;根据频率规则,变体切换不得有动画。

阶段 5 — 验证与交付

运行脚本。确认每个变体都能正确渲染,每个交互都有响应,并且控制台没有错误——在展示给用户之前,亲自翻阅所有变体。如果浏览器开发者工具可用,为每个变体截图。

然后展示变体集合并停止——选择权属于用户:

#变体分歧轴何时是最佳选择其代价
1安静最小动效,较少阴影,更多边框产品是日常使用工具最不令人印象深刻
2编辑风大号字体、充足留白该场景值得被重视占用更多垂直空间

最后告知选择器的运行位置(URL 或文件路径)以及用于切换的按键。

完成标准: 每个变体都能从选择器访问且行为正确;无控制台错误;表格诚实地列出了每个变体的权衡。

阶段 6 — 选择后集成

当用户做出选择后:将该变体集成到其所属位置,遵循项目现有约定(文件结构、命名、令牌使用),然后根据硬性规则 5 删除原型区域。如果用户希望进行新一轮探索,则保留脚本并重新运行阶段 3,在用户倾向的方向周围进行分歧。

调用方式

调用方式行为
<描述>完整工作流:界定范围 → 环境探测 → 3 个变体 → 选择器 → 等待用户选择
<描述> x5同上,但生成指定数量的变体(上限 5 个)
riff <变体名>新一轮:保留脚本,在指定变体的方向周围生成一组全新的分歧变体
keep <变体名>将指定变体集成到代码库并删除原型区域
keep <变体名>, leave the picker集成变体,但保留原型区域

语气

诚实地推销每个变体——一句话说明它何时胜出,一句话说明它付出了什么代价。绝不在表格中预先选出偏好;如果用户询问你会选择哪一个,回答时需要基于产品个性与使用频率的理由,而不仅仅是美学。如果你在构建过程中发现两个变体趋同,坦白说明并删除其中一个:一个包含两个真正不同方向的挑选器,好过一个为了凑足三个而塞入的平庸变体。

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

CharbelElBateh/personal-website

Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use `animate`.

CharbelElBateh/personal-website

Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations.

CharbelElBateh/personal-website

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

CharbelElBateh/personal-website

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

CharbelElBateh/personal-website

Guide to Sonner, the React toast library — install and wire up the Toaster, pick the right toast() call, promise and loading toasts, updating, dismissing and persisting toasts, styling, theming and icons, positioning and multiple toasters. Use when working with Sonner or troubleshooting it — toasts that don't appear, appear twice, lose their styles, ignore Tailwind classes, sit behind a modal, or don't follow dark mode.

CharbelElBateh/personal-website

Try to break a piece of UI by feeding it worst-case data — long names, unbreakable emails, one-letter names, missing fields, huge counts, zero items, long labels, non-Latin text, emoji, extreme numbers — then render it behind a "Demo data / Worst case" toggle and report everything that broke, with the fix for each. Use when the user asks to stress-test, break, or find edge cases in a component or screen, or to "try the worst case". For visual design critique use emil-design-eng; for motion use review-animations.

CharbelElBateh/personal-website

This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.

CharbelElBateh/personal-website

Search a codebase or UI for places that don't animate but should, and reject everything that shouldn't. Read-only; it proposes motion with exact values, it does not implement it. Use when the user asks "what could be animated here?" or wants to "make this feel more alive". For fixing existing animations, use improve-animations or review-animations instead.

CharbelElBateh/personal-website

Survey a codebase's animation and motion code as a senior motion advisor, then produce a prioritized audit and self-contained implementation plans for other agents (or cheaper models) to execute. Read-only on source code — it plans improvements, it does not apply them. Use when the user asks to "improve the animations", "audit the motion", "make this app feel better", or wants a roadmap of animation fixes rather than a review of a single diff.

CharbelElBateh/personal-website

Make a web app feel native on a phone — the small CSS and meta-tag fixes that separate "a website in a browser" from something that feels installed. Covers sticky hover states, tap highlight flashes, the 100vh bug, inputs that zoom the page, laggy taps, pull-to-refresh hijacking scroll, content under the notch, long-press selecting button text, carousels that scroll the wrong way, mismatched status bars, and the rule that you test on real hardware. Use when a web app is being built for or reviewed on mobile, when something "works in Chrome but feels wrong on my phone", when building a PWA, a bottom sheet, a carousel, a full-screen layout, or any touch interaction. For motion itself use animate; for React Native use animate-expo.

CharbelElBateh/personal-website

Pick the right library for a given frontend task from a curated, opinionated list — numbers, OTP inputs, charts, command menus, virtualization, drag and drop, toasts, state, styling, and more. Only runs when explicitly invoked; it does not trigger on its own.

CharbelElBateh/personal-website

Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.

CharbelElBateh/personal-website

How to write modern Swift well — modeling with value types, Swift 6 data-race safety and approachable concurrency (@concurrent, main-actor-by-default, actors, task groups), protocols and generics (some vs any), API design, performance and ARC, Swift Testing, macros, and the modern language features agents don't know about yet. Use when writing, reviewing, or migrating Swift, or when a concurrency error, a hang, a data race, a retain cycle, or a performance problem needs fixing.

相关技能