--- name: design-system-cli description: Complete Design System Reverse Engineering (DSRE) + Functional Cloning CLI - Extract visual design (tokens, assets) AND functional behavior (workflows, state machines, business rules) from any web application license: MIT allowed-tools: [Read, Write, Edit, Bash, Grep, Glob] --- # Design System CLI Skill Complete reverse engineering toolkit for cloning BOTH the visual design AND functional behavior of web applications. ## Overview The design-system-cli provides two complementary capabilities: ### Part A: Visual Cloning (Phases 1-8) 1. **Design Tokens**: Colors, typography, spacing, border-radius, shadows, breakpoints 2. **Visual Assets**: Images, videos, SVG icons, background images with metadata 3. **Asset Prompts**: LLM-ready prompts for recreating extracted visual assets 4. **Component Generation**: React components from HTML structure 5. **Hard Fork & Rebrand**: Transform sites into legally clean templates ### Part B: Functional Cloning (Phases 9-12) 1. **Interaction Recording**: Capture user sessions with clicks, typing, network calls 2. **Flow Extraction**: Identify screens and user journeys 3. **Entity Inference**: Extract data models from API payloads 4. **Business Rules**: State machines, validation rules, permissions 5. **App Generation**: Generate working Next.js applications from behavioral data **Result**: Clone BOTH the look AND behavior of any web application ## Core Capabilities ### Part A: Visual Cloning (Phases 1-8) #### 1. Design Token Extraction **Command**: `ds pipeline --url --framework ` **Frameworks Supported**: - `react-tailwind` - Tailwind CSS config for React - `vue-tailwind` - Tailwind CSS config for Vue - `react-mui` - Material-UI theme for React - `angular-material` - Angular Material theme - `css-variables` - Plain CSS custom properties **Output Files**: - `raw-tokens.json` - Raw extracted tokens - `normalized-tokens.json` - Normalized design system - `.config.js` - Framework-specific config **Example**: ```bash ds pipeline --url https://labs.google/aifuturesfund/ --framework react-tailwind ``` #### 2. Visual Asset Extraction **Command**: `ds pipeline --url --assets-out ` **Extracts**: - Images (`` tags) with dimensions, alt text, aspect ratio - Videos (`