stardust:extract
يزحف موقع موجود ويجهز ملفات المنتج والمحتوى.
Crawl an existing website (capped, multi-page) and seed stardust/current/ with a design context (tokens, DESIGN.md and PRODUCT.md in design/), a per-page inventory, and the consolidated brand surface — the captured design system, palette, typography, motifs, and voice of the live site. Use when the user wants to analyze an existing site's design, extract or reverse-engineer its design system or brand, capture design tokens from a live site, import a website as the starting point for a redesign,
Install
npx skills add adobe/skills --skill extractWorks with
claude-code (native), claude (native), codex (native), chatgpt (native), gemini-cli (native), cursor (native), copilot (native), opencode (native), amp (native), roo (native), kiro (native), goose (native), junie (native), trae (native), cline (compatible), continue (compatible), antigravity (compatible), windsurf (compatible), augment (compatible), qwen-code (compatible)
Content
stardust:extract
Crawl an existing website, parse each page, extract the brand surface, and produce a stardust-formatted snapshot of the current state under stardust/current/. The output describes what the site is; later sub-commands consume it to decide what it should be.
This skill is descriptive: it does not invent direction, it does not critique, and it does not modify the live site. It writes only under stardust/current/ and updates stardust/state.json.
Inputs
<url>— required. The origin to crawl. Examples:https://example.com,https://example.com/shop. A path narrows the same-origin crawl to that subtree.--cap <N>— optional. Override the default 5-page cap.--all— optional. Lift the cap entirely; extract every discovered page after junk filtering. Equivalent to--cap 0. Use when the user spontaneously asks for a full crawl.--pages <slug,slug,...>— optional. Restrict the crawl to specific paths (slugs derived perreference/ia-extraction.md). Bypasses the cap.--refresh <slug>— optional. Re-extract one page that already exists instate.json.--single— optional. Equivalent to--cap 1. Useful for testing.--wait <fast|medium|spec|auto>— optional. Wait strategy per page. Defaultmedium. Seereference/playwright-recipe.md§ Wait modes.--no-junk-filter— optional. Disable the default junk-page filter in discovery (seereference/ia-extraction.md§ Filtering).--no-consent-dismiss— optional. Skip the pre-flight consent / cookie banner dismissal. Default is to dismiss.--dynamics— optional, migration-bound. Record per-page reach signals of the dynamic surface. Set byprepare-migration,replicaandmigrate's safety net; never by a bare extract,upliftoraudit— dynamics is a migration concern.--concurrency <n>— optional. Parallel browser contexts for the per-page capture loop. Default 4; sane range 4–8. See § Concurrency.--brand-source <url>— optional, repeatable. An additional same-brand origin whose brand surface enriches the primary extraction. See § Cross-site brand sources.--design-source <url>— optional. Design-donor origin. See § Cross-site brand sources.--prep— optional. Run in migrate-prep mode. See § Prep mode below.
Full text of the shortened flags: reference/flags.md.
Setup
Run the master skill's setup procedure first (skills/stardust/SKILL.md § Setup): impeccable dep check, context loader, state read.
Additional checks for this sub-command:
- Playwright availability. The extraction step needs a real browser. Detect Playwright in this order: a Playwright MCP server, then a project-importable
playwrightmodule. Thenpx playwrightprobe is NOT sufficient — it confirms the CLI (which resolves a global install) but the recipe andscripts/crawl.mjsloadplaywrightthroughbrowser.mjs, and ESM module resolution does not honour a global install orNODE_PATH— the import throwsERR_MODULE_NOT_FOUNDeven wherenpx playwright --versionsucceeds. Verify the module is import-resolvable from the project root (probe:node -e "import('playwright').then(()=>process.exit(0))"); if it isn't, runnpm i -D playwright pixelmatch pngjs cheerio --legacy-peer-deps(devDependencies, never--no-save— #125) or use the Playwright MCP server, before crawling. The--legacy-peer-depsflag is required onaem-boilerplatetargets (their pinnedeslint@8makes a plainnpm iexitERESOLVEbefore playwright is even considered). Don't trust the CLI probe alone.
Script location matters. ESM resolves import 'playwright' from the *script's* directory and the plugin tree ships no node_modules: copy every script byte-identical into the project (stardust/scripts/…), the master skill's too (../stardust/SKILL.md § Setup, step 7), and run the copy.
Bundled crawler. skills/extract/scripts/crawl.mjs is a runnable reference implementation of this whole sub-command. Prefer invoking it over hand-rolling a Playwright script per run; extend its in-page capture() to cover any recipe field it doesn't yet emit. What it covers, and why a --no-save install does not survive the pipeline: reference/setup-detail.md.
- Origin collision. If
stardust/state.jsonalready recordssite.originUrland the new<url>is a different origin, stop and ask before clobbering. Stardust does not silently mix two sites in one project. Flow guard (migration asks only). If the ask carries migration intent ("migrate", "to EDS", "re-platform", "1:1", "replica") andstardust/state.jsonexists — or is about to be created — withoutflow, hand back to the master skill § Two migration flows before crawling: the flow is chosen and stamped there, and a keep-design ask enters throughreplica(which invokes this skill with--prepitself). A bareextract <url>for a redesign, audit or uplift is unaffected. (Recorded:extracton a raw URL as the entry of a same-design migration; the agent then built its own importer besidereplica.) - Browser contexts. Open a fresh
BrowserContextper capture worker (§ Concurrency; default 4). Run the consent dismissal pre-flight perreference/playwright-recipe.md§ Pre-flight: consent dismissal *unless*--no-consent-dismissis set. Cookies persist within a context but not across contexts — re-establish consent state per context (re-run the dismissal on the worker's first page, or clone the probe context'sstorageState). Record the resolved method in_crawl-log.json#consent.method. - Bot-management probe. When the first navigation in the run returns
ERR_HTTP2_PROTOCOL_ERRORorERR_QUIC_PROTOCOL_ERROR, or hangs through the entire hard-cap on what should be a fast origin, do not retry headless — switch to headed Chrome per § Failure modes → Bot-management block and record the switch in_crawl-log.json#discovery.fetchTechniqueso re-runs start in headed mode without rediscovering the issue.
Procedure
Phase 1 — Discovery
Sitemap, then same-origin BFS; junk filter; apply the cap and proceed silently — do not gate on user confirmation. Writes stardust/current/_crawl-log.json. Read reference/phase-1-discovery.md before Phase 1.
Phase 2 — Per-page extraction
Render each page in the cap-respecting list with Playwright following reference/playwright-recipe.md, concurrently per § Concurrency. The recipe is mandatory per page — in particular, do not skip the wait, scroll, or capture-list steps. Read reference/phase-2-per-page.md before Phase 2 (capture list, rendered-DOM sidecar, media).
Save to stardust/current/pages/<slug>.json with _provenance as the first key.
Live-render evidence (synthesis is forbidden). Refuse to mark a page extracted in state.json unless its _provenance contains renderedBy: "playwright", an ISO-8601 fetchedAt, a positive integer waitMs, a waitMode from the recipe, and a final httpStatus in the 2xx/3xx range. These five fields are the contract enforced by reference/current-state-schema.md § Live-render evidence and read back by every downstream phase via validateProvenance() per skills/stardust/reference/state-machine.md § Provenance validation. Synthesizing a page record from _brand-extraction.json plus URL patterns plus captured photos — the 2026-04-30 e-commerce shortcut — is the failure mode this guard exists to prevent. When the agent (or a delegated sub- agent) cannot satisfy the contract for a page, treat the page as a Phase 2 failure: record under _crawl-log.json#crawl.failures[] with errorClass: "ProvenanceMissing" and continue.
Mark the page extracted in state.json immediately after each successful page write. If a page fails, record the error in _crawl-log.json and continue — extraction is best-effort per page.
Phase 2.5 — Vision verification
Before anything downstream is authored, look at each captured page's screenshot and verify it against the extracted record; re-capture on mismatch and record _crawl-log.json#visionCheck[]. Read reference/phase-2-5-vision.md before Phase 2.5. Read the whole page through its thumbnail — never the full-resolution screenshot. A thumbnail enters the context only after thumb.mjs has written it (≤ 150 KB, or the floor thumbnail it named on stderr, exit 1) — or the vision check runs in a subagent that reads the thumbnails and returns one line per page (<slug>: ok | recaptured | suspect — <note>).
Phase 3 — Brand-surface extraction
Produces stardust/current/_brand-extraction.json per reference/brand-surface.md — logo, favicon, palette, type, motifs, voice, hero, icon font, system components, origins — aggregated across all extracted pages. Read reference/phase-3-brand-surface.md before Phase 3.
Computed-style census — run the shipped instrument; author no probe. Content-cap model — run the shipped probe; author no lift (#124). Both commands are in the reference.
Do not invent values. Every captured value cites a source selector or URL in _brand-extraction.json for traceability.
Phase 4 — Seed stardust/current/design/
Descriptive, not authored: no interview. Read reference/phase-4-seed.md before Phase 4 (what each step writes, the prose format specs). From the project root, in order:
node stardust/scripts/stardust/design-seed.mjs current— tokens,context.jsonand (after--prep) module contracts intostardust/current/design/. Exit 1 = no_brand-extraction.json: finish Phase 3 first.node stardust/scripts/stardust/design-tokens.mjs front-matter --tokens stardust/current/design/tokens --design stardust/current/design/DESIGN.md --name "<site>"— the front matter is generated, never hand-written.- Write the prose of
stardust/current/design/DESIGN.md(below the front matter) andstardust/current/design/PRODUCT.md. - Exit check:
node stardust/scripts/stardust/design-validate.mjs stardust/current/designmust exit 0 (warnings pass). Exit 1: fix what the findings name, rerun. Never skip it; extract is not done until it exits 0.
Stardust does not invoke $impeccable init (formerly teach) or $impeccable document here: they write the *target* and run an interview. Their format spec is the contract; the command is not. The target design/ at the project root is written by $stardust direct, not here.
Phase 5 — Render stardust/current/brand-review.html
After Phase 4's exit check passes, emit the current-state brand review per reference/brand-review-template.md.
The template is mandatory. In particular:
- Run the Tensions detectors listed in
reference/brand-review-template.md§ Detectors. Each rule is mechanical; emit a tension card whenever the trigger condition matches. The review may ship with zero tensions if the data is too thin to evaluate, but the detectors must always be run. - Render in the brand's own captured colors and fonts, not a stardust shell.
- Embed all CSS; do not load external JavaScript or fonts unless the live site already does.
- Cite the source artifact for every section (e.g.
_brand-extraction.json § typeunder Typography).
If the data for a section is missing, omit the section — do not fabricate placeholders. The coverage callout at the top reflects what is missing.
Phase 6 — Update state and report
After all Phase 2-5 writes succeed:
- Update
stardust/state.json(schema inskills/stardust/reference/state-machine.md):
site.originUrl,site.extractedAt,site.pageCap,site.totalDiscovered,site.crawledpages[]— one entry per crawled page withstatus: "extracted", filledcurrentStatePath, emptyprototypePathandmigratedPathdesignSource— only when--design-sourcewas used:{ url, capturedAt, path }per § Cross-site brand sources
- Print a one-screen summary per
reference/phase-6-report.md. The per-page evidence table is mandatory.
Cross-site brand sources
Two flags widen extraction beyond the primary origin — read reference/cross-site-sources.md in full whenever either flag is present. Both are opt-in; without them this section is inert.
Sibling-site discovery
After the primary crawl (Phases 2–2.5), harvest candidate same-brand origins from evidence already captured — no extra navigation. Read reference/sibling-discovery.md for the signals, the interactive and hands-off decisions, and the cap.
Outputs
Everything lands under stardust/current/ (plus stardust/canon-source/ with --design-source) and stardust/state.json; the full table is reference/outputs.md.
Concurrency
Page captures run concurrently (--concurrency, default 4); pool and consent-per-context detail in reference/phase-2-per-page.md § Concurrency.
Across processes, per state-machine.md: stardust does not lock. Two concurrent extracts on the same project are last-write-wins. Document this in the user report; do not engineer around it.
Failure modes
Read reference/failure-modes.md whenever a page or the crawl fails (network, HTTP/soft-404 validation, bot management, JS-only content). A synthesized page record is forbidden (§ Phase 2, Live-render evidence).
- Login wall. Do not attempt to authenticate. If the home page redirects to a login screen, capture that one page, mark the rest as unreachable, and ask the user how to proceed.
Prep mode (--prep)
When invoked with --prep, extract runs an extended pass that prepares the inventory for migration — read reference/prep-mode.md in full before running any --prep extraction. Discovery-mode runs (without --prep) are unchanged: small cap, no typing, no module detection. The flag is intended for the prepare-migration orchestrator, though direct invocation is supported.
Core contract (procedure, formats, and detection rules in the reference):
--prepimplies--allunless the user named N (then--cap N,reference/prep-mode.md§ 1) — migration coverage requires the full junk-filtered inventory, not the discovery cap.- Locale-root capture gaps are settled before Phase 2 of any flow (
reference/prep-mode.md§ 6). - The header contract is recorded here (
../diff/SKILL.md§ The header contract); its summary line in the prep summary sizes the header. - The prep summary replaces the Phase 6 report; its
Provenance: <live>/<total> liveline is mandatory, and any ratio short of<total>/<total>means the run failed the synthesis guard and is incomplete. - When delegating extraction to a sub-agent, the sub-agent prompt must forbid synthesis by name and require the per-page evidence table and wait-summary line in its return (
reference/prep-mode.md§ Sub-agent prompt requirements); missing any of the three is a recipe violation.
References
reference/playwright-recipe.md— viewport, capture list, logo locator chain.reference/flags.md— full text of the shortened flags.reference/setup-detail.md—--no-savecaveat, what the bundled crawler covers.reference/phase-1-discovery.md— discovery steps, scope flags, informational output.reference/phase-2-per-page.md— capture list, rendered-DOM sidecar, media, concurrency pool.reference/phase-2-5-vision.md— thumbnail reading, escalation ladder,visionCheck[].reference/phase-3-brand-surface.md— census and cap-probe commands, captured brand fields.reference/phase-4-seed.md— what the seed and front-matter steps write; DESIGN.md / PRODUCT.md prose.reference/phase-6-report.md— one-screen summary, evidence and media columns.reference/sibling-discovery.md— sibling-origin harvest and decisions.reference/outputs.md— every output path.reference/failure-modes.md— failure handling per class.reference/ia-extraction.md— sitemap + BFS crawl + cap procedure.reference/current-state-schema.md— per-page JSON schema.reference/brand-surface.md— consolidated brand-surface schema.reference/brand-review-template.md— current-state brand-review HTML contract + Tensions detectors.reference/prep-mode.md— full--prepprocedure (typing, module candidates, typed slots, prep summary, sub-agent requirements).reference/cross-site-sources.md— full--brand-source/--design-sourceprocedure (shallow capture, merge rules, canon-source donor).skills/stardust/reference/state-machine.md— state.json contract.skills/stardust/reference/artifact-map.md— provenance shape.
Source and license
- Source
- Adobe Skills
- Original
- adobe/skills/plugins/stardust/skills/extract/SKILL.md
- License
- Apache-2.0