Wix Headless Replatform
WixOfficialPublished by Wix
- Skill
- Workflow
- Software development
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The wix-headless-replatform skill acts as a central supervisor for migrating or cloning a public website's home page into a Wix Headless environment. It enforces a structured, multi-stage process that includes browser-based extraction, build planning, implementation, and visual verification. The skill ensures visual fidelity, SEO preservation, and structural integrity by utilizing a frozen manifest approach, where every stage produces durable artifacts that inform the next. It supports both standalone cloning and integrated migration modes, with specific protocols for handling gaps and ensuring the final output is a functional Wix CLI project.
What it does
- Clones or migrates a public website home page to a Wix Headless frontend.
- Manages the end-to-end workflow through distinct stages: context, evidence, implementation, and verification.
- Uses browser-backed extraction to capture visual and structural data.
- Enforces strict visual fidelity and SEO preservation standards.
- Supports one-click automation for migration handoffs.
- Generates a final report and terminal receipt for migration completion.
When to use it
- When you need to clone a public website home page into a new Wix Headless project.
- When performing a migration of an existing site to a Wix Headless architecture.
- When you require a structured, verifiable process for rebuilding a frontend with high visual fidelity.
- When working within a migration handoff that provides specific project and data-binding intent.
Advantages
- Ensures consistent results through a rigid, stage-based supervisor protocol.
- Maintains high visual and functional fidelity to the source website.
- Provides a clear path for recovery and gap resolution during the build process.
- Automates the transition from extraction to a runnable Wix CLI scaffold.
Usage examples
- “Clone the home page of a website into a new Wix Headless project.”
- The agent initiates the standalone clone workflow, resolving the source URL and proceeding through the context and evidence stages to create a new Wix CLI project.
- “Migrate this website using the provided handoff file.”
- The agent enters migration mode, reads the handoff configuration, and continues the build process within the existing migration-owned project structure.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/wix/wix-headless-replatform-p46x/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip wix-headless-replatform.zip -d .agents/skills
Documentation by Wix
wix-headless-replatform
Role
Drive a close-enough, visually polished Wix Headless frontend from a source website.
The implemented scope is one resolved home page and the default output is
projects/<project-name>, derived from the hostname. Use Wix CLI Headless, Astro,
TypeScript, and Tailwind; use React only for complex interactive islands.
Reject additional-page and explicit-URL scope with an actionable explanation until a later
approved workflow defines page resolution and shared evidence across routes.
This entry skill is the supervisor. It decides the next workflow stage and loads only the resource for that stage. Do not preload every resource or reference: stage-specific rules are deliberately demand-loaded.
Two modes exist:
Standalone clone: source URL to a new, real Wix CLI Headless project.
Migration phase:
--handoff <migration-project>/website/handoff.jsoncontinues on the migration-owned destination. Never omit--handofffor an integrated migration: the standalone command creates a second site.
Non-negotiable invariants
Treat the requested public branded homepage as authorized; apply the boundaries in
references/safety.mdwithout asking a separate routine authorization question.Browser-backed extraction is mandatory. Do not substitute HTML-only extraction.
Resolve the home page before capture. Build only from a validated frozen extraction manifest; raw observations are never builder inputs.
A standalone output must be a successful Wix CLI scaffold with valid Wix identity and runnable
devandbuildscripts. Never hand-create a Wix-shaped substitute.In migration mode, reuse the handoff's site/project and route/data-binding intent; do not create or retarget a second destination.
Preserve source structure, first-viewport evidence, chrome hierarchy, source assets, fonts, core interactions, SEO, internal URL behavior, and branded fallback behavior.
A build is not completion. Completion requires the accepted post-build visual-review and gap-loop evidence described by
rp-qa-gap-loop, plus optional facelift acceptance only when the user explicitly selected facelift mode.
Supervisor protocol
On every new or resumed run:
Resolve the source URL, output directory, and mode. In migration mode read
website/handoff.jsonanddocs/site-clone/frontend-automation-state.jsonfirst.Select the first incomplete stage from the table below and read only that resource's
SKILL.mdplus the references it explicitly needs.Execute that stage until it writes its required durable artifact, or records a specific genuine blocker with evidence and an exact unblock action.
Re-select the stage after every boundary. Do not say that a required next step “needs to happen” and end the run; load its resource and perform it.
| Stage | Load only when | Resource | Durable outcome |
|---|---|---|---|
| Context | mode, scope, project, or browser environment is unresolved | resources/rp-project-context/SKILL.md | valid context, approval record, runnable project/plan state, or blocker |
| Evidence | frozen home-page extraction is absent or stale | resources/rp-source-evidence/SKILL.md | validated extraction/latest.json and frozen manifest, or global blocker |
| Implementation | frozen build plan exists and home UI is incomplete | resources/rp-ui-implementation/SKILL.md | manifest-hash-aware runnable home implementation |
| Verify and improve | build, QA, comparison, review, fix, report, release, or receipt is incomplete | resources/rp-qa-gap-loop/SKILL.md | accepted result, done_with_gaps, or global blocker |
| Optional facelift | normal clone accepted and automation state says facelift is requested | resources/rp-facelift/SKILL.md | accepted facelift review, or blocker |
When frontendPhase.allowedNow is plan, complete only the plan-eligible context and
evidence work and leave a resumable plan-state record. When it is build, continue through
implementation and verification against the migration-owned project.
One-click continuation
A migration handoff declaring automationMode: "one_click" authorizes routine scope and
frontend checkpoints. Record those approvals in
docs/site-clone/frontend-automation-state.json; do not pause to ask whether to proceed
with a required stage, screenshot review, or authorized gap-fix pass.
An explicit facelift request may be carried from 1-click intake, but it remains gated until
normal clone acceptance; 1-click never implies facelift by itself.
In a one-click build run, keep selecting and executing stages until one of these durable outcomes exists:
website/completion.jsonis valid and the latest visual review is complete with no open critical/high identity finding; orfive visual gap cycles have been completed and
website/completion.jsonrecords the truthful terminal statusdone_with_gapswith the final reviewed evidence; ora genuine blocker is recorded with owner, evidence, attempted recovery, and exact next authority/action needed.
An owned local extraction gap is not a genuine blocker. Continue unrelated work, use no more
than two distinct targeted recovery attempts, then build the affected dependency closure
provisionally and surface post-assembly choices in final-report.json and .md.
Before classifying a shell, browser, or network failure as a blocker, use the
repo-local Wix/Yarn toolchain PATH ordering and follow the recovery order in
resources/rp-project-context/SKILL.md: aligned-shell retry, then the
required browser/network escalation and retry, then blocker only if it still
fails or approval is pending. After every gap iteration, immediately return to
the stage table; never treat a first build, a reported plan, or backend import
as frontend completion.
In migration mode the build must also leave the final route manifest that old-link
preservation consumes (output-contract.md, "Migration terminal receipt"). A built site is
not proof that old URLs work; redirect application and public verification stay pending
until the cutover step runs them.
Commands
Run node scripts/site-clone.mjs <source-url> for standalone mode, or
node scripts/site-clone.mjs <source-url> --handoff <path> for migration mode. The active
resource gives the exact commands and inputs for its stage.
References
Resources load their own references. The shared contracts are kept under references/:
safety.md, workflow.md, extraction-schema.md, output-contract.md,
qa-checklist.md, and the interaction/layout/control/normalization/gap contracts.
Files
- .publish-manifest.json228 B
- ATTRIBUTION.mdAdded by AutoGineer833 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md6.7 KiB
- VERSION6 B
- agents/openai.yaml259 B
- references/control-and-visual-fidelity-contract.md2.1 KiB
- references/extraction-schema.md8.6 KiB
- references/interaction-runtime-contract.md5.5 KiB
- references/layout-blueprint-contract.md2.1 KiB
- references/output-contract.md5.0 KiB
- references/post-build-gap-contract.md5.5 KiB
- references/qa-checklist.md4.7 KiB
- references/safety.md1.0 KiB
- references/ui-normalization-contract.md2.8 KiB
- references/workflow.md8.5 KiB
- registry/README.md958 B
- registry/approvals/button/shadcn-default-ac60ef5.json980 B
- registry/items/button/shadcn-default-ac60ef5/button.tsxScript1.9 KiB
- registry/items/button/shadcn-default-ac60ef5/capabilities.json2.7 KiB
- registry/items/button/shadcn-default-ac60ef5/contract.md2.1 KiB
- registry/licenses/shadcn-ui-ac60ef5-MIT.txt1.0 KiB
- registry/registry.json1.4 KiB
- schemas/build-plan.schema.json628 B
- schemas/candidate.schema.json949 B
- schemas/common.schema.json1.2 KiB
- schemas/decision-patch.schema.json621 B
- schemas/decision-request.schema.json825 B
- schemas/extraction-gap.schema.json1.6 KiB
- schemas/extraction-manifest.schema.json1.6 KiB
- schemas/final-report.schema.json744 B
- schemas/foundation.schema.json950 B
- schemas/metadata.schema.json801 B
- schemas/observation-packet.schema.json661 B
- schemas/page-capture.schema.json1015 B
- schemas/page-resolution.schema.json1.4 KiB
- schemas/shared-chrome.schema.json940 B
- schemas/unit.schema.json1.8 KiB
- scripts/assemble-extraction.mjsScript36.1 KiB
- scripts/benchmark-extraction.mjsScript9.1 KiB
- scripts/browser-extraction-preflight.mjsScript1.2 KiB
- scripts/build-extracted-homepage.mjsScript17.1 KiB
- scripts/clear-wix-starter.mjsScript2.3 KiB
- scripts/create-wix-project.mjsScript17.7 KiB
- scripts/discover-urls.mjsScript4.4 KiB
- scripts/extract-assets.mjsScript4.6 KiB
- scripts/extract-design-system.mjsScript23.9 KiB
- scripts/extract-interactions.mjsScript83.5 KiB
- scripts/extract-page.mjsScript118.0 KiB
- scripts/extract-seo.mjsScript848 B
- scripts/extract-tokens.mjsScript2.6 KiB
- scripts/finalize-extraction-report.mjsScript6.4 KiB
- scripts/finalize-gap-review.mjsScript12.2 KiB
- scripts/finalize-gap-review.test.mjsScript5.3 KiB
- scripts/finalize-migration-website.mjsScript6.2 KiB
- scripts/generate-control-state-contract.mjsScript9.6 KiB
- scripts/generate-design-md.mjsScript11.7 KiB
- scripts/generate-extraction-validators.mjsScript5.4 KiB
- scripts/generate-invoice-download-backend.mjsScript16.5 KiB
- scripts/generate-layout-blueprint.mjsScript8.7 KiB
- scripts/generate-repeater-cms.mjsScript4.9 KiB
- scripts/generate-route-plan.mjsScript4.6 KiB
- scripts/generate-scene-contract.mjsScript16.2 KiB
- scripts/generate-ui-normalization.mjsScript13.3 KiB
- scripts/generate-visual-assets.mjsScript6.3 KiB
- scripts/lib/browser-tooling.mjsScript19.9 KiB
- scripts/lib/common.mjsScript9.0 KiB
- scripts/lib/component-capabilities.mjsScript7.9 KiB
- scripts/lib/component-registry.mjsScript15.7 KiB
- scripts/lib/content-boundary.mjsScript2.8 KiB
- scripts/lib/extraction-contract.mjsScript19.1 KiB
- scripts/lib/extraction-detectors.mjsScript11.4 KiB
- scripts/lib/extraction-validators.generated.mjsScript25.2 KiB
- scripts/lib/font-contract.mjsScript10.0 KiB
- scripts/lib/frontend-automation-state.mjsScript6.6 KiB
- scripts/lib/gap-analysis.mjsScript26.1 KiB
- scripts/lib/html-extract.mjsScript5.7 KiB
- scripts/lib/interaction-bootstrap.mjsScript296 B
- scripts/lib/interaction-runtime.mjsScript8.1 KiB
- scripts/lib/interaction-timeline.mjsScript13.9 KiB
- scripts/lib/layout-blueprint/classifiers.mjsScript7.8 KiB
- scripts/lib/layout-blueprint/geometry.mjsScript1.8 KiB
- scripts/lib/layout-blueprint/vocabulary.mjsScript872 B
- scripts/lib/playwright-request-guard.cjsScript2.4 KiB
- scripts/lib/ui-normalization.css1.5 KiB
- scripts/lib/url-safety.mjsScript6.8 KiB
- scripts/optimize-svg.mjsScript895 B
- scripts/post-build-gap.mjsScript16.5 KiB
- scripts/provision-repeater-cms.mjs2.8 KiB
- scripts/record-gap-decision.mjs2.3 KiB
- scripts/replay-extraction.mjs5.3 KiB
- scripts/resolve-home-page.mjs4.0 KiB
- scripts/site-clone.mjs35.8 KiB
- scripts/validate-font-contract.mjs1.3 KiB
- scripts/verify-interactions.mjs32.1 KiB
- scripts/visual-qa.mjs20.6 KiB
scripts/visual-qa.mjs
#!/usr/bin/env node
import path from "node:path";
import { docsDir, normalizeUrl, parseArgs, readJson, resolveOutputDir, writeJson } from "./lib/common.mjs";
import { verifyFrozenManifest } from "./lib/extraction-contract.mjs";
async function main() {
const args = parseArgs();
const url = normalizeUrl(args._[0] || args.url).toString();
const outputDir = resolveOutputDir(url, args.out);
const report = await visualQa({ outputDir });
await writeJson(path.join(docsDir(outputDir), "qa", "visual-qa.json"), report);
if (args.json) process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
else console.log(`Visual QA heuristic score: ${report.score}/100`);
}
export async function visualQa({ outputDir }) {
const dir = docsDir(outputDir);
const latest = await safeRead(path.join(dir, "extraction", "latest.json"), null);
if (!latest?.captureId) return missingManifestReport();
const extractionDir = path.join(dir, "extraction", latest.captureId);
const integrity = await verifyFrozenManifest(extractionDir);
const observations = path.join(extractionDir, "observations");
const page = await safeRead(path.join(observations, "page.json"), {});
const seo = await safeRead(path.join(observations, "seo.json"), {});
const sourceMap = { pages: [page], seo };
const interactionMap = await safeRead(path.join(observations, "interaction-map.json"), { interactions: [], structural: {} });
const sceneContract = await safeRead(path.join(observations, "scene-contract.json"), { scenes: [] });
const controlStateContract = await safeRead(path.join(observations, "control-state-contract.json"), { controls: [] });
const visualAssets = await safeRead(path.join(observations, "visual-assets.json"), { logos: [], icons: [] });
const layoutBlueprint = await safeRead(path.join(observations, "layout-blueprint.json"), { pages: [] });
const buildPlan = await safeRead(path.join(dir, "build", "build-plan.json"), { units: [] });
const ledger = await safeRead(path.join(dir, "build", "section-implementation.json"), { units: [] });
const specIndex = await safeRead(path.join(extractionDir, "spec-index.json"), {});
const extractionGaps = await safeRead(path.join(extractionDir, "extraction-gaps.json"), { gaps: [] });
const chromePages = (sourceMap.pages || []).filter((page) => page.chrome);
const implementationText = await readImplementationText(outputDir);
const chromeWarnings = chromeReviewWarnings({ chromePages, implementationText });
const repeaterWarnings = repeaterReviewWarnings({ pages: sourceMap.pages || [], implementationText });
const interactionWarnings = interactionReviewWarnings({ pages: sourceMap.pages || [], interactionMap, implementationText });
const checks = [];
checks.push(check("frozen manifest integrity", integrity.ok && integrity.manifest.manifestHash === latest.manifestHash, 20, integrity.failures));
checks.push(check("home build plan matches manifest", buildPlan.manifestHash === latest.manifestHash, 10));
checks.push(check("every planned unit has a build ledger entry", buildPlan.units?.every((unit) => ledger.units?.some((entry) => entry.id === unit.id && entry.specHash === unit.hash)), 10));
checks.push(check("source pages extracted", sourceMap.pages?.length > 0, 10));
checks.push(check("text content captured", sourceMap.pages?.some((p) => p.sections?.some((s) => s.text?.length > 80)), 15));
checks.push(check("seo captured", Boolean(sourceMap.seo?.title || sourceMap.pages?.some((p) => p.seo?.title)), 10));
checks.push(check("screenshots captured or fallback recorded", sourceMap.pages?.some((p) => Object.keys(p.screenshots || {}).length > 0 || p.extractionWarnings?.length), 5));
checks.push(check("stateful scene contract generated", Array.isArray(sceneContract.scenes) && sceneContract.scenes.length > 0, 10));
checks.push(check("control state contract generated", Array.isArray(controlStateContract.controls) && controlStateContract.controls.length > 0, 10));
checks.push(check("source logo assets materialized", (visualAssets.logos || []).length > 0 && (visualAssets.logos || []).every((logo) => Boolean(logo.localPath || logo.sourceUrl)), 10));
checks.push(check("important text geometry captured", (layoutBlueprint.pages || []).some((page) => page.sections?.some((section) => section.regions?.some((region) => region.textGeometry?.lineCount))), 10));
checks.push(check("chrome evidence captured or fallback warning recorded", chromeEvidenceAvailable(sourceMap.pages), 10));
checks.push(check("repeaters preserved or manually flagged", !repeaterWarnings.some((warning) => warning.kind === "collapsed-repeater"), 5, repeaterWarnings.filter((warning) => warning.kind === "collapsed-repeater").map((warning) => warning.message)));
checks.push(check("repeater headings preserved or manually flagged", !repeaterWarnings.some((warning) => warning.kind === "missing-repeater-headings"), 5, repeaterWarnings.filter((warning) => warning.kind === "missing-repeater-headings").map((warning) => warning.message)));
checks.push(check("multi-image repeaters preserved or manually flagged", !repeaterWarnings.some((warning) => warning.kind === "collapsed-multi-image-repeater"), 5, repeaterWarnings.filter((warning) => warning.kind === "collapsed-multi-image-repeater").map((warning) => warning.message)));
checks.push(check("dropdown hierarchy preserved or manually flagged", !chromeWarnings.some((warning) => warning.kind === "flattened-dropdown"), 10, chromeWarnings.filter((warning) => warning.kind === "flattened-dropdown").map((warning) => warning.message)));
checks.push(check("sticky header footprint reviewed", !chromeWarnings.some((warning) => warning.kind === "sticky-header-footprint"), 5, chromeWarnings.filter((warning) => warning.kind === "sticky-header-footprint").map((warning) => warning.message)));
checks.push(check("seo-only hero text reviewed", !chromeWarnings.some((warning) => warning.kind === "seo-only-hero-text"), 5, chromeWarnings.filter((warning) => warning.kind === "seo-only-hero-text").map((warning) => warning.message)));
checks.push(check("core interaction evidence consumed", !interactionWarnings.some((warning) => warning.kind !== "manual-interaction-review"), 20, interactionWarnings.filter((warning) => warning.kind !== "manual-interaction-review").map((warning) => warning.message)));
checks.push(check("source footer content preserved", !interactionWarnings.some((warning) => warning.kind === "missing-footer-content" || warning.kind === "clone-process-copy"), 10, interactionWarnings.filter((warning) => warning.kind === "missing-footer-content" || warning.kind === "clone-process-copy").map((warning) => warning.message)));
const rawScore = checks.reduce((sum, item) => sum + (item.pass ? item.points : 0), 0);
const possiblePoints = checks.reduce((sum, item) => sum + item.points, 0);
const unitAcceptance = await acceptanceResults({
extractionDir,
buildPlan,
ledger,
specIndex,
gaps: extractionGaps.gaps || [],
});
return {
score: possiblePoints ? Math.round((rawScore / possiblePoints) * 100) : 0,
rawScore,
possiblePoints,
checks,
unitAcceptance,
pageAcceptance: checks.map(({ name, pass, warnings = [] }) => ({
criterion: name,
status: pass ? "verified" : "failed-or-pending",
warnings,
})),
warnings: [...chromeWarnings, ...repeaterWarnings, ...interactionWarnings].map((warning) => warning.message),
manifestHash: latest.manifestHash,
provisionalUnits: buildPlan.units?.filter((unit) => unit.status === "provisional").map((unit) => unit.id) || [],
note: "Frozen-spec preflight only. Run browser-backed result comparison and report unresolved local gaps without blocking unrelated units.",
generatedAt: new Date().toISOString(),
};
}
async function acceptanceResults({ extractionDir, buildPlan, ledger, specIndex, gaps }) {
const gapById = new Map(gaps.map((gap) => [gap.id, gap]));
const ledgerById = new Map((ledger.units || []).map((entry) => [entry.id, entry]));
const results = [];
for (const unit of buildPlan.units || []) {
const relativePath = specIndex[unit.id];
const spec = relativePath ? await safeRead(path.join(extractionDir, relativePath), {}) : {};
const ledgerEntry = ledgerById.get(unit.id);
const ownedGaps = (unit.gapRefs || []).map((id) => gapById.get(id)).filter(Boolean);
const unresolvedGapRefs = ownedGaps
.filter((gap) => !["resolved", "user-accepted"].includes(gap.status))
.map((gap) => gap.id);
const viewports = Object.values(ledgerEntry?.verification || {});
const browserVerified = viewports.length > 0 && viewports.every((status) => status === "passed");
const implementationMatches = Boolean(ledgerEntry && ledgerEntry.specHash === unit.hash);
const required = Array.isArray(spec.acceptance?.required) ? spec.acceptance.required : [];
const criteria = required.map((criterion) => ({
criterion,
status: !implementationMatches
? "not-implemented"
: unresolvedGapRefs.length
? "provisional-gap-backed"
: browserVerified
? "verified"
: "pending-browser-verification",
...(unresolvedGapRefs.length ? { gapRefs: unresolvedGapRefs } : {}),
}));
results.push({
unitId: unit.id,
specHash: unit.hash,
implementationMatches,
status: criteria.length && criteria.every((entry) => entry.status === "verified")
? "verified"
: unresolvedGapRefs.length
? "provisional"
: implementationMatches
? "verification-pending"
: "not-implemented",
criteria,
sourceAssertions: spec.acceptance?.sourceAssertions || [],
gapRefs: unresolvedGapRefs,
});
}
return results;
}
function missingManifestReport() {
return {
score: 0,
rawScore: 0,
possiblePoints: 20,
checks: [{ name: "frozen manifest integrity", pass: false, points: 20, warnings: ["No frozen extraction manifest exists."] }],
warnings: ["No frozen extraction manifest exists."],
provisionalUnits: [],
note: "Extraction must freeze before build QA.",
generatedAt: new Date().toISOString(),
};
}
function interactionReviewWarnings({ pages, interactionMap, implementationText }) {
const warnings = [];
if (!implementationText) return [{ kind: "manual-interaction-review", message: "No implementation source exists yet; verify every core interaction after UI code is written." }];
const required = new Set((pages || []).flatMap((page) => page.interactionDiscovery?.requiredBehaviors || []));
const media = interactionMap.structural?.media || (pages || []).flatMap((page) => page.interactionDiscovery?.media || []);
for (const item of media.filter((entry) => entry.src && entry.role === "background")) {
if (!mediaReferenced(implementationText, item.src)) {
warnings.push({ kind: "missing-embedded-media", message: `Required ${item.provider || item.tag} background media is not referenced by the implementation: ${item.src}` });
}
}
if (required.has("preserve-carousel-card-expansion") && !(/carousel|story-rail|rail-track|case-card/i.test(implementationText) && /overflow-x|overflow\s*:\s*auto|scrollLeft|scrollWidth|translateX/i.test(implementationText) && /active|expanded/i.test(implementationText))) {
warnings.push({ kind: "flattened-carousel", message: "Source carousel has an active-card expansion state, but implementation does not show an overflowing rail with active/expanded state handling." });
}
if (required.has("preserve-scroll-expanded-section-state") && !(/position\s*:\s*(sticky|fixed)|scrolltrigger|intersectionobserver/i.test(implementationText) && /scroll/i.test(implementationText))) {
warnings.push({ kind: "flattened-scroll-state", message: "Source scroll-state section is required, but implementation does not show pinned/sticky scroll-state handling." });
}
if (/this cloned homepage|development reconstruction|first-pass clone|video background unavailable/i.test(implementationText)) {
warnings.push({ kind: "clone-process-copy", message: "Implementation contains clone/migration-process copy that must not appear on a migrated source page." });
}
for (const page of pages || []) {
const legalText = String(page.footer?.legalText || "").replace(/\s+/g, " ").trim();
const meaningful = legalText.split(/(?<=[.!?])\s+/).find((sentence) => sentence.length >= 80);
if (meaningful && !implementationText.includes(meaningful.slice(0, 80))) {
warnings.push({ kind: "missing-footer-content", message: "Source footer legal text was extracted but is not present in implementation source." });
}
}
return warnings;
}
function mediaReferenced(implementationText, source) {
const canonicalSource = canonicalMediaUrl(source);
if (implementationText.includes(source) || implementationText.includes(canonicalSource)) return true;
return canonicalSource ? implementationText.includes(canonicalSource.replace(/&/g, "&")) : false;
}
function canonicalMediaUrl(value) {
const raw = String(value || "").trim();
if (!raw) return raw;
try {
const url = new URL(raw);
url.search = url.search.replace(/\?([^?]*)\?/g, "?$1&");
return url.toString();
} catch {
return raw.replace(/\?([^?]*)\?/g, "?$1&");
}
}
function repeaterReviewWarnings({ pages, implementationText }) {
const warnings = [];
for (const page of pages || []) {
for (const warning of page.repeaterDiagnostics?.warnings || []) {
warnings.push({
kind: "manual-repeater-review",
message: `Source page ${page.path || page.url}: ${warning}`,
});
}
for (const repeater of page.repeaters || []) {
if (!implementationText) {
warnings.push({
kind: "manual-repeater-review",
message: `Source page ${page.path || page.url} has structured repeater content (${repeater.itemCount || repeater.items?.length || 0} items); verify the implementation consumes repeaters instead of flattening the content.`,
});
continue;
}
const headings = (repeater.items || []).map((item) => item.heading).filter(Boolean);
const matchedHeadings = headings.filter((heading) => implementationText.includes(heading)).length;
const hasRepeaterStructure = /\brepeaters\b|\bstories\b|\bitems\b|\bmap\s*\(/.test(implementationText);
if (headings.length && matchedHeadings < Math.min(3, headings.length)) {
warnings.push({
kind: "missing-repeater-headings",
message: `Source page ${page.path || page.url} has ${headings.length} repeater heading(s), but fewer than ${Math.min(3, headings.length)} appear in implementation files.`,
});
}
if (matchedHeadings >= Math.min(3, headings.length) && !hasRepeaterStructure) {
warnings.push({
kind: "collapsed-repeater",
message: `Source page ${page.path || page.url} has structured repeater items, but implementation files contain multiple repeater headings without an obvious repeated-content structure.`,
});
}
if ((repeater.schema?.maxImagesPerItem || 0) > 1) {
const supportsMultipleImages = /\bimages\b|\bgallery\b|\bcarousel\b|map\s*\(\s*\(?image\b|image[s2-9]/.test(implementationText);
if (!supportsMultipleImages) {
warnings.push({
kind: "collapsed-multi-image-repeater",
message: `Source page ${page.path || page.url} has repeater items with up to ${repeater.schema.maxImagesPerItem} images each, but implementation files do not show an obvious multi-image item structure.`,
});
}
}
}
}
return warnings;
}
function check(name, pass, points, warnings = []) {
return { name, pass: Boolean(pass), points, ...(warnings.length ? { warnings } : {}) };
}
async function existsJsonOrText(filePath) {
try {
await import("node:fs/promises").then(({ access }) => access(filePath));
return true;
} catch {
return false;
}
}
async function safeRead(filePath, fallback) {
try {
return await readJson(filePath);
} catch {
return fallback;
}
}
function chromeEvidenceAvailable(pages = []) {
return pages.some((page) => {
if (!page.chrome) return false;
if (page.chrome.warnings?.length) return true;
return Boolean(page.chrome.header?.variants?.length || page.chrome.navigation?.length || page.chrome.heroEvidence);
});
}
function chromeReviewWarnings({ chromePages, implementationText }) {
const warnings = [];
if (!chromePages.length) {
warnings.push({
kind: "manual-chrome-review",
message: "No chrome evidence is available; manually review header behavior, menu hierarchy, logo size, and hero text before completion.",
});
return warnings;
}
for (const page of chromePages) {
for (const warning of page.chrome?.warnings || []) {
warnings.push({ kind: "manual-chrome-review", message: warning });
}
const dropdowns = (page.chrome?.navigation || []).filter((item) => item.children?.length);
if (dropdowns.length && implementationText) {
for (const dropdown of dropdowns) {
const childLabels = dropdown.children.map((child) => child.label).filter(Boolean);
const hasStructuredChildren = /children\s*[:=]|\bsubmenu\b|\bdropdown\b|<details\b|aria-haspopup/.test(implementationText);
const flattenedCount = childLabels.filter((label) => implementationText.includes(label)).length;
if (!hasStructuredChildren && flattenedCount >= Math.min(3, childLabels.length)) {
warnings.push({
kind: "flattened-dropdown",
message: `Navigation dropdown "${dropdown.label || dropdown.href}" has ${childLabels.length} source child item(s), but implementation files contain child labels without an obvious submenu structure.`,
});
}
}
} else if (dropdowns.length && !implementationText) {
warnings.push({
kind: "manual-chrome-review",
message: `Source navigation has dropdowns (${dropdowns.map((item) => item.label || item.href).join(", ")}); verify implementation preserves them as submenus after UI code exists.`,
});
}
const variants = page.chrome?.header?.variants || [];
const initial = variants.find((variant) => variant.name === "initial");
const scrolled = variants.find((variant) => variant.name === "scrolled");
const viewportHeight = page.chrome?.viewport?.height || 1200;
const limit = page.chrome?.header?.maxStickyViewportRatio || 0.16;
if (implementationText && initial?.height && initial.height / viewportHeight > limit && /position\s*:\s*sticky|position\s*:\s*fixed/.test(implementationText)) {
const hasCompactState = /scrolled|compact|is-sticky|shrink|small-header|sticky-header/.test(implementationText);
if (!hasCompactState && (!scrolled?.height || scrolled.height < initial.height * 0.75)) {
warnings.push({
kind: "sticky-header-footprint",
message: `Source initial header is large (${initial.height}px); implementation appears to use sticky/fixed positioning without an obvious compact scrolled state.`,
});
}
}
const seoOnly = page.chrome?.heroEvidence?.forbiddenSeoOnlyText || [];
if (implementationText && seoOnly.some((text) => text.length > 12 && implementationText.includes(text))) {
warnings.push({
kind: "seo-only-hero-text",
message: "Implementation contains SEO-only title/tagline text that was not confirmed as visible first-viewport hero content.",
});
} else if (!implementationText && seoOnly.length) {
warnings.push({
kind: "manual-chrome-review",
message: "SEO-only title/tagline text was detected; verify it is not rendered as hero copy without visual source evidence.",
});
}
}
return warnings;
}
async function readImplementationText(outputDir) {
const srcDir = path.join(outputDir, "src");
const files = await listSourceFiles(srcDir);
const chunks = [];
for (const file of files.slice(0, 80)) {
try {
const { readFile } = await import("node:fs/promises");
chunks.push(await readFile(file, "utf8"));
} catch {
// Ignore unreadable generated files during heuristic QA.
}
}
return chunks.join("\n").slice(0, 500000);
}
async function listSourceFiles(dir) {
try {
const { readdir } = await import("node:fs/promises");
const entries = await readdir(dir, { withFileTypes: true });
const files = [];
for (const entry of entries) {
const fullPath = path.join(dir, entry.name);
if (entry.isDirectory()) files.push(...await listSourceFiles(fullPath));
else if (/\.(astro|tsx?|jsx?|css|scss)$/.test(entry.name)) files.push(fullPath);
}
return files;
} catch {
return [];
}
}
if (import.meta.url === `file://${process.argv[1]}`) {
main().catch((error) => {
console.error(error.stack || error.message);
process.exit(1);
});
}
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Wix
- Publisher
- Wix (Official)
- Source
- wix/skills · skills/wix-headless-replatform · commit d168bc2
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Wix.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download wix-headless-replatform.zip