Recast
- Extensions and automation
- Agent Tooling
- 2026
- Private
WXT, React, TypeScript, Chrome DevTools Protocol and 4 more
Recast is a Chrome extension that captures a website and prepares a workspace for rebuilding it in Next.js, React and Tailwind. A run downloads one ZIP with four layers. They are a static reference, a runnable mirror of the source runtime, a rebuild kit of evidence, and a scaffolded app. Recast does not write the rebuilt application. A coding agent does, against that evidence and the acceptance checks the archive carries.
I built it to study design technique by rebuilding it: responsive layout, motion timing, and components that repeat across pages. The README draws the boundary in one line, saying to use it “on sites you own or have permission to reproduce”.
# the downloaded archive, unpacked locallyunzip -q ~/Downloads/*-recast-clone.zip -d clonels clonenextjs-app rebuild-kit reference runtime-mirrorcd clone/nextjs-app && npm cinpm run reference &Reference server: http://127.0.0.1:4173/npm run mirror &Runtime mirror: http://127.0.0.1:4174/
5 commands3 lines of output
- Chapter
- Extensions and automation
- Category
- Agent Tooling
- Year
- Availability
- Private
- WXT
- React
- TypeScript
- Chrome DevTools Protocol
- OPFS
- Next.js
- Tailwind CSS
- Playwright
Why evidence first
Recast began on July 7, 2026 as Site Extractor Pro, a vanilla JavaScript extension that saved a site as one flat, self-hostable folder. A copy like that runs, but the interesting decisions sit inside minified bundles, and nobody can maintain it. Handing an agent a few screenshots fails differently. A screenshot is one state at one viewport, with no hover, no breakpoint and no animation timing. Version 2.2.0 turned the output into an agent-ready reconstruction archive. An agent needs evidence ranked by trust, a target that forbids shortcuts, and checks that say when it is done.
The capture pipeline
Discovery reads robots.txt and sitemaps, then runs a bounded same-origin link crawl. A site run pauses there while lib/route-selection.js folds the URLs into buckets I can pick from. lib/templates.js then groups routes by URL shape, collapsing ids, dates and uuids. The homepage, singleton routes and one representative per group become anchors with full evidence, and their siblings get one viewport. Optional browser evidence loads each page in an isolated tab, driven through chrome.debugger over the Chrome DevTools Protocol. Capture emulates viewports from 390 by 844 up to 1920 by 1080, and can record dark scheme, reduced motion, interaction states and animation timelines. Localization rewrites HTML, CSS, module graphs, media and fonts to local paths. Fetches omit browser credentials, honor robots.txt crawl delays, and pause on 403, 429 and 503 responses.
The workspace contract
reference/ is a static replay with the source runtime disabled, so a missing chunk cannot wipe settled evidence. runtime-mirror/ executes the localized source runtime at its original route paths through a zero-dependency serve.mjs. rebuild-kit/pages/<route>/ keeps source HTML, rendered HTML and capture records apart. nextjs-app/ is a stock App Router project with a pinned lockfile and no captured routes authored. Each route starts in reconstruction/route-map.json as routing: "unassigned". The generated AGENTS.md is the contract. It forbids iframing or proxying the source, screenshot backgrounds, raw HTML pasted into JSX, and shipping the original minified runtime. It also marks every captured string and script as untrusted evidence, never instructions. Repeated structures arrive as typed starters in components/generated/, each carrying a data-signature back to its captured evidence.
Rebuilding with an agent
In the popup I pick Entire site or This page only, review the discovered routes, and build the workspace. Low-impact mode, the default, caps a run at 25 pages with one worker and videos off. The archive then goes to an agent with the rebuild-site-zip-to-next skill, whose auditor checks paths, symlinks and sizes before extracting anything.
python3 <skill-dir>/scripts/audit_reconstruction_zip.py site.zip --extract worktree --report audit.json
cd worktree/nextjs-app && npm ci
npm run mirror # source runtime on port 4174
npm run test:visual
npm run parity -- --route /
npm run test:network # fails on any non-localhost request
node <skill-dir>/scripts/check_next_project.mjs . --claim captured
The mirror is checked against available anchor captures before it answers design questions. npm run parity turns a visual mismatch into ranked selector, property, expected and actual suspects. The checker validates reconstruction/acceptance-matrix.md without executing what it records.
Decisions and costs
- Evidence over conversion. The app is deliberately a stock scaffold, so nothing converts HTML mechanically. All authoring falls to the agent, and a passing build proves nothing about parity.
- Stream the archive to disk. Since 2.8.0 a ZIP64 writer on
CompressionStreamstreams into OPFS, bounded by disk rather than tab memory. That path produced real defects: concurrent writes could corrupt 2.8.x archives, and a typo discarded checkpoints holding CSS shards until 2.10.1. - Template-aware depth. Siblings carry one viewport, which removed most capture time on template-heavy sites. Their missing detail depends on the mirror passing its trust gate.
- Mirror first, browser evidence off. On August 10 the parallel tab cap fell from 32 to 2, and screenshots became opt-in. This is the default I would revisit. Without captured screenshots there are no immutable pixel baselines, so visual checks compare against the static replay.
Limits and status
Browser capture cannot recover private backend logic or inaccessible APIs, so the agent records those in reconstruction/DECISIONS.md instead. Canvas, WebGL, logged-in, geographic and consent-dependent content can need manual evidence, and cross-origin iframes stay external. Each fetched response is capped at 128 MiB. Public-site runs reject private, loopback and link-local targets, but browser fetch cannot see DNS resolution, so rebinding is not prevented. The extension asks for activeTab, scripting, downloads, storage, debugger and <all_urls>. CI runs Vitest, a typecheck, the build and Playwright against local fixtures. The privacy page names migrations, design-system recovery and archival of your own work as the intended uses. The repository is private with no licence file, at version 2.11.0 in October 2026.