Установка
SKILL.md
Design Prototype
One HTML file, double-click to open, fully interactive, rendered by the actual
design system (@lobehub/ui 5.x + antd 6 + antd-style tokens, exact versions from
this repo's node_modules) — while the source stays production-style React
(import { Block } from '@lobehub/ui', createStyles(({ css, token }) => …), hooks,
memo). Promotion to production is mostly "split into files", not "rewrite".
Prototype code may be quick-and-dirty (one file, no i18n, inline data) — but the interaction must be complete: states, transitions, and affordances are the point of a prototype, not its code style.
How it works
one-time (~2s, cached): scripts/build-runtime.sh → lobe-prototype-runtime.js (IIFE global)
+ vendored babel.min.js
per prototype (no build): single HTML = <script runtime> + babel-standalone
+ <script type="text/babel"> with production-style React
- The runtime bundles
react,react-dom/client,@lobehub/ui,@lobehub/ui/base-ui,antd(curated subset),antd-style,lucide-reactfrom the repo's ownnode_modules— so tokens/components/versions match production, and react/emotion/ theme-context are singletons by construction. - A 3-line
window.requireshim + babel'stransform-modules-commonjslets the prototype keep realimportstatements. ThemeProvider themeMode="auto"→ light/dark follow the OS.
⚠️ Don't re-attempt the pure-CDN route (esm.sh import maps). It was tried and rejected: esm.sh's CJS named-export analysis fails serially across antd's dep chain (
@ant-design/fast-color→@ant-design/colors→@rc-component/qrcode→ …), and?bundleleaks an unversionedreact-is404. Whack-a-mole, not a foundation.
Quickstart
-
Build the runtime into the prototype's directory (any dir works;
/tmpis fine):bash .agents/skills/design-prototype/scripts/build-runtime.sh /tmp/my-protoSkip if
lobe-prototype-runtime.js+babel.min.jsare already there and the design-system versions haven't bumped. -
Copy
references/template.htmlinto the same dir, rename, and replace the sampleAppwith the real surface. Keep the runtime shim block untouched. -
Open it (
open /tmp/my-proto/xxx.html) — no server, no build.
Verify before delivering
Headless-check it renders with zero console errors (the repo's e2e Playwright works):
// node /tmp/check.mjs — adjust paths
import { chromium } from '<repo>/e2e/node_modules/playwright/index.mjs';
const b = await chromium.launch();
const p = await b.newPage();
const errs = [];
p.on('pageerror', (e) => errs.push(String(e)));
await p.goto('file:///tmp/my-proto/xxx.html');
await p.waitForSelector('#root *', { timeout: 30000 });
await p.screenshot({ path: '/tmp/proto.png' }); // Read the screenshot yourself
console.log('errors:', errs);
await b.close();
Then Read the screenshot — a prototype is a visual deliverable; don't ship it
sight-unseen. Check light + dark (emulate prefers-color-scheme) and a narrow
viewport if the surface has a mobile story.
What's in the runtime (extend freely)
See assets/entry.mjs — the single source of truth. Currently:
@lobehub/ui: ActionIcon, Alert, Avatar, Block, Button, Center, Collapse, DraggablePanel, Drawer, DropdownMenu, Empty, Flexbox, Highlighter, Hotkey, Icon, Image, Input, InputNumber, Markdown, Modal, NeuralNetworkLoading, Popover, ScrollShadow, SearchBar, Segmented, Select, Skeleton, SortableList, Tabs, Tag, Text, TextArea, ThemeProvider, Tooltip@lobehub/ui/base-ui: full namespace (Select, Modal, DropdownMenu, Switch, Toast, FloatingSheet, …)antd: App, Badge, Checkbox, Divider, Dropdown, Progress, Radio, Slider, Space, Steps, Tableantd-style,lucide-react,react,react-dom/client: full namespaces
Missing a component → add to entry.mjs, rerun the build script (~2s). Sizes:
curated ≈ 16MB (fine from disk); a full export * from '@lobehub/ui' works too
(≈ 27MB) if you'd rather never curate.
Pitfalls
Switchlives in@lobehub/ui/base-ui, not the root package (as do the other base-ui primitives). Importing it from the root fails the runtime build.- Use
createStyles(runtime), notcreateStaticStyles— static extraction needs a build step. This is the one sanctioned deviation from production style; note it when handing the prototype to an implementer. - babel must stay the raw UMD file (unpkg/jsdelivr). esm.sh rewrites it to ESM
and a classic
<script src>chokes onexport. - The require shim throws with the module name when an import isn't in the runtime — that's the "add to entry.mjs and rebuild" signal, not a template bug.
Text typeaccepts onlysecondary|success|warning|danger|info;Tag colorhas noprimary(DESIGN.md "Applying tokens in components").
Design bar (same as production surfaces)
A prototype is a surface — the ux checklists apply to what it demonstrates:
- Show at least one non-happy-path state (empty / loading / error / in-progress), ideally behind a state-toggle strip like the template's. A happy-path-only prototype under-specifies the design and silently blesses missing states.
- Reuse the app's surface contracts: side panels are
DraggablePanel(collapse + drag-resize come free), loading is skeleton/NeuralNetworkLoading(never antdSpin), modals viacreateModal-style flows. - Don't paint affordances you don't wire (
cursor: zoom-inwith no zoom, keycap chips with no keys) — in an interactive prototype a dead affordance is a spec bug. - Walk the ux Quick review against the prototype before delivering; annotate anything deliberately out of scope in an HTML comment so the implementer knows it's a cut, not a decision.
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: design-prototype](https://darkplay.ru/ai/skills/lobehub-lobehub-design-prototype)
Описание
Создаёт интерактивный одностраничный HTML-прототип дизайна на реальной дизайн-системе LobeHub (@lobehub/ui + antd + токены antd-style) с React в продакшен-стиле — без шага сборки, открывается прямо в браузере. Используй, когда просят прототип дизайна / интерактивный макет / 交互原型 / 出个原型 / 设计稿 HTML для страницы или сценария, либо чтобы исследовать редизайн до начала реализации.
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
A11y Architectaffaan-m · Архитектор доступности, специализирующийся на соответствии WCAG 2.2 для веба и нативных…
Architectaffaan-m · Специалист по архитектуре ПО для проектирования систем, масштабируемости и принятия…
Code Architectaffaan-m · Проектирует архитектуру функций, анализируя существующие паттерны и соглашения кодовой…
Database Revieweraffaan-m · Специалист PostgreSQL: оптимизация запросов, схемы, безопасность, Supabase.
Gan Planneraffaan-m · GAN Harness — агент-планировщик: разворачивает промпт в полную спецификацию продукта.
Homelab Architectaffaan-m · Проектирует сети для дома и малой лаборатории с поэтапными изменениями и откатом.
Network Architectaffaan-m · Проектирует корпоративные и распределённые сети с маршрутизацией и автоматизацией.
Swift Revieweraffaan-m · Ревьюер Swift-кода: протокол-ориентированный дизайн, ARC, Swift Concurrency.
Type Design Analyzeraffaan-m · Анализ дизайна типов: инкапсуляция, инварианты, полезность, соблюдение.
example-skillsanthropics · Набор примеров навыков, демонстрирующих разные возможности: создание навыков, разработку…Лучшие ИИ-инструменты для генерации изображений
Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты
MagviMagvi
DALL-E 3OpenAI
SupaLabSupalab
Freestyling.aiFreestyling
ArtGeneration.meArtgeneration
BigjpgBigjpg
Художник от VKVK
Avato AI12ai
Virton AIVirtonЛучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-makerЛучшие ИИ-инструменты для генерации текста и копирайтинга
Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра
NeuroscribeNeuroscribe
GoGPTGogpt
НейроТекстерNeuro-texter
ChatGPTOpenAI
Cosmo ScribeCosmoscribe
Memo HelperCopilot33
LibraChatLibrachat