mockup-extract

Extracts existing app components into a mockup sandbox for canvas preview and redesign.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/AmirEmad11/instabot --skill mockup-extract-amiremad11
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mockup-extract
Source: https://github.com/AmirEmad11/instabot/tree/main/.local/skills/mockup-extract
Command: npx skills add https://github.com/AmirEmad11/instabot --skill mockup-extract-amiremad11

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Redesigning an existing UI component by hand-coding an approximation always gets dimensions, colors, fonts, and spacing wrong. This Skill copies the real component source code, along with its dependencies and global styles, into an isolated mockup sandbox so the canvas preview matches the production component exactly. ## Core Features & Use Cases - Dependency tracing and classification: Walks the full import chain and inlines, copies, or stubs each dependency (API calls, context providers, routing, global state). - Import rewriting and style scoping: Rewrites @/ paths to resolve inside the sandbox and captures global CSS variables and fonts in a group-level _group.css file. - Canvas embedding and variants: Type-checks the result, embeds it on the canvas via the sandbox /preview/ URL labeled "Current", and sets up variant files for design iteration. - Use Case: A user says "redesign my navbar" — the Skill extracts the real navbar component from the main app into artifacts/mockup-sandbox/, stubs its auth context and router, and displays it on the canvas as the baseline for new variants. ## Quick Start Extract my current pricing page component onto the canvas so I can create redesign variants of it.

Frequently Asked Questions about mockup-extract

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

FAQPage Schema
How do I redesign an existing React component without rewriting it from scratch?

Extract the real component source into a mockup sandbox instead of hand-coding an approximation. The process traces imports, stubs external dependencies like routing and API calls, and preserves exact colors, spacing, and fonts from the original code.

How do I show an existing app component on a design canvas?

Copy the component and its dependencies into the mockup sandbox, then embed the sandbox's /preview/ URL as an iframe on the canvas. Do not iframe the main app's dev server, since that shows the whole app shell and cannot support independent variants.

Why does my extracted component look different from the original app?

Missing global styles are the usual cause. CSS variables, font links, and @font-face rules live outside the import chain, so they must be collected into a _group.css file that the extracted component explicitly imports.

Why does an extracted component crash in the mockup sandbox?

Unstubbed side effects like API calls, router hooks, auth context, or global state stores fail outside the main app. Replace them with mock data, no-op functions, or local useState values before previewing.

When should I not iframe the main app dev server for a redesign?

Avoid it whenever you need the component in isolation or plan to create variants. The dev server iframe shows the entire app shell, navigates away on clicks, and changes live when the main app code is edited, making before/after comparison impossible.