product-design
lobehub/lobehub · Agent Skill
Crea prototipi HTML interattivi utilizzando lo stack UI reale di LobeHub, concentrandosi sull'interazione piuttosto che sullo stile del codice.
Vai all'installazione ↓Panoramica
| Autore | |
|---|---|
| Repository | lobehub/lobehub ↗ |
| Cartella dello skill | design-prototype |
| Stelle | 82.305 |
| File inclusi | 1 |
| Licenza | non indicata — verifica con l'autore |
| Aggiornato | 6 settembre 2026 |
| Link | Sorgente dello skill ↗ · Repository ↗ |
Verifica Mozgi
Cosa abbiamo trovato nei file dello skill. I dettagli con l’abbonamento.
Installazione
Uno skill è una cartella con un file SKILL.md. Scegli il tuo agente ed esegui i comandi in un terminale (macOS, Linux o Git Bash su Windows) dalla radice del progetto.
Incolla il prompt in Claude, Codex o un altro assistente: controllerà lo skill e lo installerà.
Install the “product-design” skill from mozgi.io (https://mozgi.io/skills/product-design/) for me. 1. Download the archive: https://mozgi.io/skills/product-design/download If it fails, take the skill folder from the source: https://github.com/lobehub/lobehub/tree/canary/.agents/skills/design-prototype 2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me. 3. Put the “product-design” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.). 4. Make sure <skills folder>/product-design/SKILL.md exists. 5. Briefly tell me what this skill does and offer to try it on my task. If you cannot do a step yourself, tell me what to click or type.
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
Riavvia Claude Code: lo skill compare nell'elenco; per richiamarlo a mano usa /product-design. Per tutti i progetti: ~/.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 cerca gli skill in .agents/skills dalla cartella corrente fino alla radice del repo; richiamalo con /skills o $product-design. Per tutti i progetti: ~/.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 carica lo skill all'avvio; richiamalo con “/” nella chat Agent. Cursor legge anche .claude/skills e .agents/skills. Per tutti i progetti: ~/.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 propone di attivare lo skill quando il compito corrisponde: tu confermi. Per tutti i progetti: ~/.gemini/skills.
Leggi SKILL.md e i file correlati prima di installare. Clicca un file per l'anteprima.
Contenuto di SKILL.md
Testo originale dell'autore · sola letturaDesign 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.
Domande frequenti
Che cosa fa lo skill product-design?
Crea prototipi HTML interattivi utilizzando lo stack UI reale di LobeHub, concentrandosi sull'interazione piuttosto che sullo stile del codice.
Come si installa product-design?
Apri il blocco “Installazione” in questa pagina e scegli il tuo agente — Claude Code, Codex, Cursor o Gemini CLI — per i comandi pronti che copiano la cartella dello skill nel posto giusto. Oppure copia il prompt dalla scheda “Con l'assistente” e lascia che sia l'assistente a controllare e installare lo skill.
Con quali modelli AI funziona product-design?
Gli skill sono semplici istruzioni in Markdown (formato Agent Skills), quindi product-design funziona con qualsiasi agente che legge SKILL.md: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode e altri. Il modello carica le istruzioni solo quando il compito corrisponde alla descrizione dello skill.
product-design è gratuito?
Lo skill è pubblicato apertamente da lobehub. Lo skill in sé non costa nulla: paghi solo il tuo fornitore AI per i token usati. Nel repository non è indicata una licenza: verifica le condizioni con l'autore prima di un uso commerciale.
È sicuro installare gli skill?
Uno skill è un insieme di istruzioni che il tuo agente seguirà: leggi SKILL.md e i file correlati prima di installarlo. Gli script nella cartella dello skill vengono eseguiti solo se li esegue l'agente: controlla cosa fa e non concedere permessi superflui.
In cosa differisce uno skill da un server MCP o da un plugin?
Un server MCP o un plugin danno al modello nuovi strumenti: codice che viene eseguito e restituisce un risultato. Uno skill fornisce conoscenza e metodo: come affrontare il compito, quali passi seguire e com'è un buon risultato. Non servono server né chiavi API.