product-design
lobehub/lobehub · Agent Skill
Создает интерактивные HTML-прототипы с использованием реального стека UI LobeHub, фокусируясь на взаимодействии, а не на стиле кода.
Перейти к установке ↓Обзор
| Автор | |
|---|---|
| Репозиторий | lobehub/lobehub ↗ |
| Папка скилла | design-prototype |
| Звёзды | 82 305 |
| Файлы | 1 |
| Лицензия | не указана — уточните у автора |
| Обновлён | 6 сентября 2026 г. |
| Ссылки | Исходник скилла ↗ · Репозиторий ↗ |
Проверка Mozgi
Что мы нашли в файлах скилла. Подробности — по подписке.
Установка
Скилл — это папка с файлом SKILL.md. Выберите своего агента и скопируйте команды в терминал (macOS, Linux или Git Bash на Windows) в корне проекта.
Скопируйте промпт и вставьте в Claude, Codex или другого ассистента: он сам проверит скилл и подключит его.
Установи мне скилл «product-design» с mozgi.io (https://mozgi.io/skills/product-design/). 1. Скачай архив: https://mozgi.io/skills/product-design/download Если не скачивается — возьми папку скилла из исходника: https://github.com/lobehub/lobehub/tree/canary/.agents/skills/design-prototype 2. Прочитай SKILL.md и остальные файлы. Проверь, что скилл безопасен: нет скрытых команд, отправки данных наружу или скриптов, которые делают не то, что описано. Если что-то подозрительно — остановись и скажи мне. 3. Положи папку «product-design» в папку скиллов своего агента: .claude/skills/ для Claude Code, .agents/skills/ для Codex, .cursor/skills/ для Cursor, .gemini/skills/ для Gemini CLI. В проекте — внутри проекта, иначе в домашней папке (~/.claude/skills/ и т. п.). 4. Убедись, что получилось <папка скиллов>/product-design/SKILL.md. 5. Коротко расскажи, что умеет этот скилл, и предложи попробовать его на моей задаче. Если какой-то шаг не можешь сделать сам — подскажи, что нажать или ввести.
git clone --depth 1 --branch canary https://github.com/lobehub/lobehub.git /tmp/lobehub mkdir -p .claude/skills cp -r /tmp/lobehub/.agents/skills/design-prototype .claude/skills/design-prototype
Перезапустите Claude Code — скилл появится в списке, вызвать вручную: /product-design. Для всех проектов сразу — папка ~/.claude/skills.
git clone --depth 1 --branch canary https://github.com/lobehub/lobehub.git /tmp/lobehub mkdir -p .agents/skills cp -r /tmp/lobehub/.agents/skills/design-prototype .agents/skills/design-prototype
Codex ищет скиллы в .agents/skills от текущей папки до корня репозитория; вызвать вручную — /skills или $product-design. Для всех проектов — ~/.agents/skills.
git clone --depth 1 --branch canary https://github.com/lobehub/lobehub.git /tmp/lobehub mkdir -p .cursor/skills cp -r /tmp/lobehub/.agents/skills/design-prototype .cursor/skills/design-prototype
Cursor подхватит скилл при запуске; вызвать вручную — «/» в чате агента. Cursor также читает .claude/skills и .agents/skills. Для всех проектов — ~/.cursor/skills.
git clone --depth 1 --branch canary https://github.com/lobehub/lobehub.git /tmp/lobehub mkdir -p .gemini/skills cp -r /tmp/lobehub/.agents/skills/design-prototype .gemini/skills/design-prototype
Gemini CLI сам предложит включить скилл, когда задача подходит, — вы подтверждаете. Для всех проектов — ~/.gemini/skills.
Просмотрите SKILL.md и сопутствующие файлы перед установкой. Клик по файлу — предпросмотр.
Содержимое 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-react from the repo's own
node_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 real import statements.
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
> ?bundle leaks an unversioned react-is 404. Whack-a-mole, not a foundation.
Quickstart
1. Build the runtime into the prototype's directory (any dir works; /tmp is fine):
```bash
bash .agents/skills/design-prototype/scripts/build-runtime.sh /tmp/my-proto
```
Skip if lobe-prototype-runtime.js + babel.min.js are already there and the
design-system versions haven't bumped.
2. Copy references/template.html ↗ into the same dir,
rename, and replace the sample App with the real surface. Keep the runtime shim
block untouched.
3. 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, Table
antd-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 on export.
- 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
no primary (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 antd Spin), modals via createModal-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.
Вопросы и ответы
Что делает скилл product-design?
Создает интерактивные HTML-прототипы с использованием реального стека UI LobeHub, фокусируясь на взаимодействии, а не на стиле кода.
Как установить product-design?
Откройте блок «Установка» на этой странице и выберите своего агента — Claude Code, Codex, Cursor или Gemini CLI: там готовые команды, которые копируют папку скилла в нужное место. Либо скопируйте промпт из вкладки «Через ассистента» — ассистент сам проверит и подключит скилл.
С какими нейросетями работает product-design?
Скиллы — это обычные инструкции в Markdown (формат Agent Skills), поэтому product-design подходит любому агенту, который читает SKILL.md: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode и другие. Модель загружает инструкции только когда задача подходит под описание скилла.
Скилл product-design бесплатный?
Скилл опубликован автором lobehub в открытом доступе. Сам скилл ничего не стоит — вы платите только своему провайдеру нейросети за использованные токены. Лицензия в репозитории не указана — перед коммерческим использованием уточните условия у автора.
Безопасно ли устанавливать скиллы?
Скилл — это инструкции, которые агент будет выполнять, поэтому перед установкой прочитайте SKILL.md и сопутствующие файлы. Скрипты из папки скилла запускаются только если их запустит агент — следите за тем, что он делает, и не давайте лишних прав.
Чем скилл отличается от MCP-сервера или плагина?
MCP-сервер и плагин дают модели новые инструменты — код, который выполняется и возвращает результат. Скилл даёт знания и порядок действий: как подходить к задаче, какие шаги делать и как выглядит хороший результат. Ему не нужен сервер или ключ API.