design-prototype

Generate interactive single-file HTML prototypes using the LobeHub design system and production-style React.

74|11|Updated Jul 4, 2024
One-click install
npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill design-prototype-opensourceagi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-prototype
Source: https://github.com/OpenSourceAGI/qwksearch-research-agent/tree/main/apps/qwk-in-lobe/.agents/skills/design-prototype
Command: npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill design-prototype-opensourceagi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @lobehub/ui, @lobehub/icons, antd, antd-style, lucide-react, react, react-dom, esbuild, @babel/standalone, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Building a design prototype usually means either a throwaway mockup that diverges from the real design system or a full app setup with a build pipeline. This Skill produces a single HTML file that opens directly in a browser while rendering with the actual @lobehub/ui, antd, and antd-style tokens from the repository, so the prototype matches production styling without any build step. ## Core Features & Use Cases - Real design system rendering: Bundles react, @lobehub/ui, @lobehub/ui/base-ui, antd, antd-style, and lucide-react from the repo's own node_modules into a cached IIFE runtime, so component versions and tokens match production exactly. - Production-style source: Prototype code keeps real import statements, createStyles hooks, and memo patterns via a require shim and babel-standalone, making promotion to production mostly a file-splitting exercise. - State-complete prototypes: The template enforces a state toggle covering data, empty, loading, and error states, plus light/dark theme support via ThemeProvider. - Use Case: When asked for an interactive mockup of a settings page redesign, run the build script once, copy the template, write the surface in React, and verify it headlessly with Playwright before delivering. ## Quick Start Ask the AI to create an interactive HTML design prototype of the page or flow you describe, and it will build the runtime, write the single-file prototype, and verify it renders without console errors.

Frequently Asked Questions about design-prototype

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an interactive HTML prototype with a real React design system?

Run the build-runtime.sh script once to bundle react, @lobehub/ui, antd, and antd-style into a single runtime file, then copy the provided template.html and write your surface in production-style React. The resulting HTML file opens directly in a browser with no server or build step.

How to prototype with @lobehub/ui components without a build step?

The skill bundles @lobehub/ui and base-ui components from the repo's node_modules into an IIFE global, and a small window.require shim maps bare imports to it. babel-standalone compiles the JSX in the browser, so imports like import { Block } from '@lobehub/ui' work as-is.

Why does importing Switch from @lobehub/ui fail in the prototype runtime?

Switch lives in @lobehub/ui/base-ui, not the root package, along with the other base-ui primitives. Import it from '@lobehub/ui/base-ui' instead; importing from the root fails the runtime build.

Can I use createStaticStyles in a browser-only React prototype?

No, createStaticStyles requires a build-time static extraction step, which a no-build HTML prototype does not have. Use createStyles from antd-style at runtime instead, and note this deviation when handing the prototype to an implementer.

What are the limitations of CDN import maps for antd prototypes?

The esm.sh import-map route fails because its CJS named-export analysis breaks serially across antd's dependency chain, and the bundle flag leaks an unversioned react-is 404. The skill instead bundles dependencies locally with esbuild for a reliable offline runtime.