| name | prototype-to-production |
| description | Convert design prototypes (HTML, CSS, Figma exports) into production-ready components. Analyzes prototype structure, extracts design tokens, identifies reusable patterns, and generates typed React components. Adapts to existing project tech stack with React + TypeScript as default. |
| version | 1.0.0 |
| category | Design & Frontend |
| agents | ["frontend-ui-developer","rapid-ui-designer","code-quality-reviewer"] |
| keywords | ["prototype","production","components","design","HTML","CSS","Figma","React","TypeScript","conversion","design-tokens","atomic-design"] |
Prototype to Production Skill
Convert design prototypes into production-ready, typed components by analyzing structure, extracting patterns, and generating clean code.
When to Use
- Converting HTML prototypes to React components
- Transforming super-design outputs (
.superdesign/design_iterations/*.html) to production code
- Breaking down Figma exports into reusable components
- Extracting design tokens from prototype CSS/inline styles
- Productionizing a mockup or proof-of-concept UI
Conversion Workflow
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Analyze โโโโถโ Detect โโโโถโ Decompose โโโโถโ Generate โ
โ Input โ โ Tech Stack โ โ Components โ โ Code โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ โ โ โ
โผ โผ โผ โผ
Identify type package.json Atomic design TypeScript
& structure scan + patterns methodology components
Step 1: Analyze Input
Detect prototype type and structure:
| Input Type | Detection Method | Key Patterns |
|---|
| Super-design | Path: .superdesign/design_iterations/*.html | Flowbite, Tailwind CDN, theme CSS references |
| Generic HTML | Any .html file | Standard HTML structure, inline/external CSS |
| Figma Export | Figma-specific class names | figma-, absolute positioning, frame naming |
Super-design analysis:
Read prototype file โ Extract theme CSS reference โ
Identify component regions (header, main, footer) โ
Map flowbite components to equivalents
Step 2: Detect Project Tech Stack
Scan target project to determine output format:
-
Check package.json for frameworks:
react / react-dom โ React components
vue โ Vue SFCs
svelte โ Svelte components
@angular/core โ Angular components
-
Check for TypeScript:
tsconfig.json exists โ TypeScript output
typescript in dependencies โ TypeScript output
-
Check styling approach:
tailwindcss โ Tailwind classes
styled-components / @emotion/react โ CSS-in-JS
- CSS/SCSS files โ Separate stylesheets
Default: React + TypeScript + Tailwind CSS
Step 3: Component Decomposition
Apply atomic design methodology:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ORGANISMS (Complex compositions) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ MOLECULES (Simple compositions) โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ ATOMS (Primitive elements) โ โ โ
โ โ โ Button, Input, Label, Icon, Badge, Avatar โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ FormField, SearchBar, Card, MenuItem โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Header, Sidebar, ProductGrid, CommentThread โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Component identification checklist:
Step 4: Extract Design Tokens
Extract from prototype CSS/styles:
{
"colors": {
"primary": "extracted-from-buttons",
"secondary": "extracted-from-secondary-elements",
"background": "extracted-from-body/container",
"text": "extracted-from-body-text"
},
"typography": {
"fontFamily": "extracted-from-font-family",
"fontSize": { "base": "16px", "lg": "18px", "xl": "20px" }
},
"spacing": {
"derived-from-padding-margin-patterns": true
},
"borderRadius": "extracted-from-rounded-elements"
}
See templates/design-tokens-extract.json for full template
Step 5: Generate Components
For each identified component:
- Create TypeScript interface for props
- Apply forwardRef pattern for DOM access
- Include accessibility attributes
- Use project's styling approach
- Add JSDoc documentation
See templates/component-base.tsx and templates/component-with-variants.tsx
Step 6: Integration Guidance
Provide clear instructions for:
- File placement in project structure
- Import statements needed
- Peer dependencies (if any)
- Usage examples
Component Output Standards
TypeScript Props Interface
interface ComponentProps {
variant?: 'primary' | 'secondary' | 'outline';
size?: 'sm' | 'md' | 'lg';
disabled?: boolean;
className?: string;
children: React.ReactNode;
}
Accessibility Requirements
Every component must include:
- Semantic HTML elements (use
<button> not <div>)
- Keyboard navigation support
- ARIA attributes where needed
- Focus management
Naming Conventions
| Type | Convention | Example |
|---|
| Components | PascalCase | ProductCard.tsx |
| Props types | PascalCase + Props | ProductCardProps |
| CSS classes | kebab-case | product-card-container |
| Design tokens | camelCase | primaryColor |
Conversion Patterns Reference
See references/conversion-patterns.md for comprehensive HTML โ React patterns
Quick Reference
| HTML Pattern | React Equivalent |
|---|
class="..." | className="..." |
onclick="..." | onClick={handler} |
for="..." | htmlFor="..." |
<input value=""> | <input value="" onChange={...}> |
| Inline styles | Tailwind classes or styled objects |
Templates Reference
| Template | Purpose |
|---|
component-base.tsx | Basic component with types and accessibility |
component-with-variants.tsx | Component with variant/size system |
design-tokens-extract.json | Token extraction structure |
Example Conversion
Input (super-design HTML):
<button class="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700">
Submit
</button>
Output (React + TypeScript):
interface ButtonProps {
variant?: 'primary' | 'secondary';
children: React.ReactNode;
onClick?: () => void;
}
export const Button = ({ variant = 'primary', children, onClick }: ButtonProps) => {
return (
<button
className={cn(
'px-4 py-2 rounded-lg transition-colors',
variant === 'primary' && 'bg-blue-600 text-white hover:bg-blue-700'
)}
onClick={onClick}
>
{children}
</button>
);
};
Integration with Super-Design
When converting super-design outputs:
- Read the theme CSS file referenced in the HTML
- Map theme variables to design tokens
- Preserve animations defined in the prototype
- Maintain responsive breakpoints from Tailwind classes
Super-design folder structure:
.superdesign/
โโโ design_iterations/
โโโ theme_1.css # Theme tokens
โโโ chat_ui_1.html # Prototype iteration 1
โโโ chat_ui_2.html # Prototype iteration 2