High-fidelity website/app clone design pipeline. Use when asked to clone, replicate, copy, or recreate any existing website or app screen. Captures real assets (images, SVGs, fonts, colors), extracts exact design tokens, generates the clone in Stitch, composites real assets into the output, then runs section-by-section visual comparison against the reference. Produces 90%+ accurate clones by combining Stitch generation with real asset injection.
9-phase pipeline for high-fidelity website/app clones.
NODE_PATH=/data/.npm-global/lib/node_modulesMCPORTER_CALL_TIMEOUT=180000skills/clone-design/scripts/Screenshot the target at mobile (390×844) viewport, full-page + per-viewport-section.
NODE_PATH=/data/.npm-global/lib/node_modules node skills/clone-design/scripts/extract-assets.js <url> <output-dir>
This produces:
screenshots/full-page.png + screenshots/section-N.png per viewportscreenshots/viewport.png (above-fold only)assets/images/, assets/svgs/, assets/fonts/design-tokens.json (structured extraction)extraction-report.md (human-readable summary)source.html (raw page HTML)Read extraction-report.md and design-tokens.json. Extract:
Use the image tool to analyze each screenshots/section-N.png:
For long pages, generate in 2-3 Stitch calls max (Stitch handles long prompts well). Group sections logically:
Each prompt must include:
deviceType="MOBILE" for mobile clonesUse edit_screens for refinement passes rather than regenerating from scratch.
MCPORTER_CALL_TIMEOUT=60000 mcporter call stitch.get_screen \
name="projects/{pid}/screens/{sid}" projectId="{pid}" screenId="{sid}" --output json
Download the HTML code via the downloadUrl. Save to stitch-pulls/<project>/.
NODE_PATH=/data/.npm-global/lib/node_modules node skills/clone-design/scripts/compose-assets.js \
<generated.html> <extract-dir> <output.html>
This script:
After auto-compositing, manually review and fix:
NODE_PATH=/data/.npm-global/lib/node_modules node -e "
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 390, height: 844, deviceScaleFactor: 2 } });
await page.goto('file:///path/to/composed.html');
await page.waitForTimeout(4000);
await page.screenshot({ path: '/path/to/output.png', fullPage: true });
await browser.close();
})();
"
NODE_PATH=/data/.npm-global/lib/node_modules node skills/clone-design/scripts/visual-diff.js \
<extract-dir> <composed.html> <diff-output-dir>
Then use the image tool to compare each section pair:
screenshots/section-N.png vs Clone clone-section-N.pngBased on comparison findings:
edit_screens in Stitch for structural changesMax 3 iterations. After 3, assess if the approach needs rethinking.
| Metric | Target |
|---|---|
| Layout structure | 95%+ section ordering and sizing match |
| Color accuracy | Exact hex match on primary palette |
| Typography | Same font family, ±1px on sizes |
| Content | 100% text match (copied from source) |
| Images/assets | Real assets from source, correctly positioned |
| Overall fidelity | 90%+ visual match |
stitch-pulls/<project>/
├── extract/ # Phase 1 output
│ ├── screenshots/ # Reference screenshots
│ ├── assets/ # Downloaded images, SVGs, fonts
│ ├── design-tokens.json # Structured tokens
│ ├── extraction-report.md # Human-readable summary
│ └── source.html # Raw source
├── generated.html # Phase 5 Stitch output
├── composed.html # Phase 6 with real assets
├── final-rendered.png # Phase 7 screenshot
└── diff/ # Phase 8 comparison
├── clone-section-N.png
└── diff-report.md
When designing original screens (not cloning an existing site), skip Phases 1-3 and 6. Instead:
MCPORTER_CALL_TIMEOUT=180000 for Stitch generation callsmodelId="GEMINI_3_1_PRO" for highest quality generationsource.html — never paraphrasefonts-noto-color-emoji is installedrgba(0,0,0,0) is transparent, not black