design-workspace-starter/skills/ui-screenshot-to-storybook-product/SKILL.md
Turn screenshots or Figma exports into token-backed Storybook components and composed product screens.
npx skillsauth add harrychuang/cursor-skills ui-screenshot-to-storybook-productInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this workflow when the workspace is driven by screenshots in reference/, or by Figma when .env.local is configured.
reference/.env.localproduct/start-here/ACCURACY_CONTRACT.mdBefore implementation, classify the source mode:
Figma-first: highest-fidelity path because the workflow can use structured layout, variables, components, and selected frame context.Multi-reference screenshot: good visual reconstruction when repeated patterns and breakpoints are visible, but component boundaries and hidden states still need confirmation.Single-image: first-pass approximation only. Record observed facts, inferred decisions, missing context, and open questions before coding.Do not present a single image as a complete product specification. If only one image is available, ask for or record the target viewport, product purpose, key states, real data assumptions, responsive behavior, brand assets, and acceptance threshold.
If .env.local contains FIGMA_FILE_URL and FIGMA_NODE_ID but has neither FIGMA_PAT nor FIGMA_AUTH_MODE=connector, stop and ask the user to set FIGMA_PAT in .env.local, or set FIGMA_AUTH_MODE=connector when the tool already has authenticated Figma MCP/connector access, before continuing with Figma-first automation.
If .env.local contains the Figma URL and node plus either FIGMA_PAT or FIGMA_AUTH_MODE=connector:
reference/ screenshots only as secondary visual validation.Before code, produce:
start-here/ACCURACY_CONTRACT.mdobserved, what is inferred, and what is an intentional exceptionIf references disagree, identify the dominant pattern and document the exceptions instead of averaging everything together.
Use this exact response structure for Phase A:
| Dimension | Observed pattern | Confidence | Notes | | --- | --- | --- | --- | | Color proportion | | high / medium / low | | | Spacing feel | | high / medium / low | | | Corner size | | high / medium / low | | | Typography weight | | high / medium / low | | | Hierarchy contrast | | high / medium / low | |
| Principle | Source evidence | Interpretation | Design rule | Token impact | | --- | --- | --- | --- | --- | | 1 | | | | | | 2 | | | | | | 3 | | | | | | 4 | | | | | | 5 | | | | |
Add rows 6-7 only when justified by real repeated patterns.
| Element | Recommendation | Why it fits the principles | Token direction |
| --- | --- | --- | --- |
| Primary color | # | | --sys-color-* |
| Secondary color | # | | --sys-color-* |
| Background/surface color | # | | --sys-color-* |
| Typography family | | | --sys-font-* |
| Typography weight strategy | | | --sys-font-weight-* |
| Corner strategy | | | --sys-radius-* |
| Base spacing grid | | | --sys-space-* |
| Layout density | | | spacing and layout tokens |
| Item | Type | Detail | Reason | | --- | --- | --- | --- | | 1 | observed / inferred / exception | | | | 2 | observed / inferred / exception | | | | 3 | observed / inferred / exception | | |
Do not write code yet.
After the design-system analysis, produce:
| Block | Purpose | Visual cues | Candidate component owner | Token roles |
Do not write code yet.
For each block:
Output:
| Component | Responsibility | Screens | Decision |
Create or update shared UI before screen files:
argTypes plus expanded controlsdesign/foundations/*.md as the written source for principles, specs, and token usageAssemble screens from documented exports only.
Run the compare workflow before calling the screen done.
The parity loop must:
argTypes.development
Extract a reusable design-system specification from UI screenshots/images, Figma URLs or exports, Figma Variables, existing app/project folders, or prototype code. Use when Codex must produce evidence-backed design principles, design elements, token architecture, component inventory, component token specs, anti-AI style constraints, static HTML documentation for developers, cross-agent handoff guidance for Claude Code/Cursor/Codex, and a checkpoint before any product implementation.
development
Create, apply, audit, and understand Variables in Figma using Google Material Design's three-tier token inheritance (Ref → Sys → Comp). Use when: creating Variables for components or screens, applying existing Variables to nodes, auditing token naming and structure for compliance, or having AI read existing Variables to reverse-engineer design components. Triggers: create Variables, apply Variables, Figma variables, M3 token, design token, token inheritance, token audit, audit variables, design component from variables, three-tier token.
tools
Turn screenshots or Figma exports into token-backed Storybook components and composed product screens.
development
Bootstrap a full frontend delivery workspace from UI screenshots or a Figma URL, then carry the implementation through Storybook-first, token-first development and visual parity. Use when the user wants to start a new product build from reference images, a Figma design, or both.