Generated banner for Wix Headless
Generated logo for Wix Headless

Wix Headless

WixOfficialPublished by Wix

  • Skill
  • Tool integration
  • Software development
  • MIT
  • Low risk
  • Has scripts

From the author

Connect Wix business services (Stores, Bookings, Donations, CMS, Blog, Events, Forms, and more) to a Wix Headless frontend — infer the needed capabilities, install the apps, seed backend content, and produce an SDK-integration guide. For managed (Wix-hosted) projects it can also build the frontend: scaffold a new site (create) or wire an existing/brought-in design (connect), then build and release. Works across managed, self-managed, and stripe project types. Triggers: set up a Wix Headless backend, add Wix business features to my app, accept donations, build or host a Wix site, connect/implement this design with Wix.
— the description by Wix

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The wix-headless skill acts as an orchestrator for integrating Wix business services (such as Stores, Bookings, and CMS) into a headless frontend architecture. It handles the end-to-end configuration of the Wix backend, including app installation, content seeding, and the generation of a tailored SDK integration guide. Depending on the project type (managed, self-managed, or stripe), the skill can either provide a comprehensive integration guide for the user to implement or, in managed scenarios, actively scaffold, wire, and deploy the frontend project.

What it does

  • Infers required Wix capabilities based on user intent and project context.
  • Installs necessary Wix apps and seeds backend content automatically.
  • Generates a custom SDK integration guide for calling Wix services from the frontend.
  • Scaffolds or connects existing frontend projects to Wix for managed hosting.
  • Handles project-type-specific authentication and deployment workflows.
  • Provides a mechanism to relay feedback to Wix regarding the headless experience.

When to use it

  • When you need to integrate Wix business services into a custom-built headless frontend.
  • When you want to automate the setup and content seeding of a Wix backend.
  • When you are building a new site on Wix infrastructure and need a scaffolded frontend.
  • When you have an existing frontend design and need to wire it to Wix business capabilities.
  • When working with Stripe Projects and requiring a Wix backend configuration.

Advantages

  • Reduces manual configuration by automating app installation and content seeding.
  • Provides a clear, actionable SDK integration guide tailored to your specific capabilities.
  • Supports multiple project architectures including managed, self-managed, and Stripe-based setups.
  • Ensures consistent backend setup by following verified inline recipes.
  • Simplifies the transition from design to a functional, Wix-powered headless site.

Usage examples

“Set up a Wix Headless backend for a store with products and a blog.”
The skill will install the Stores and Blog apps, seed sample products and posts, and provide an SDK guide for fetching this data in your frontend.
“I have an existing design; connect it to Wix and host it on their managed infrastructure.”
The skill will initialize the project, wire the existing UI to the necessary Wix business services, and prepare it for release on Wix.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/wix/wix-headless/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip wix-headless.zip -d .agents/skills

Documentation by Wix

Wix Headless

This skill connects Wix business services to a Wix Headless frontend. Its core job is to configure the Wix backend: infer the needed capabilities, install the Wix apps, seed the backend content, and produce an SDK-integration guide describing how to call Wix from the frontend.

What happens with the frontend depends on the project type and operation:

  • Backend-only (self-managed, stripe, or a managed "just set up the backend" run) — the skill emits the SDK guide as its final output; the host owns the frontend, build, and hosting.

  • Managed create / connect — the skill also owns the frontend: it scaffolds a new project (create) or attaches Wix to an existing one (connect), wires it to the backend using that same guide, builds, and releases to Wix. (There is no Designer or template library — the frontend is built ad-hoc to intent.)

On a backend-only run the skill does not own the project scaffolding. When the work needs a frontend, scaffold it according to user intent — framework and structure follow the prompt; the skill's job is the Wix backend plus the emitted SDK guide describing how to call Wix from whatever frontend exists, not choosing or generating the app. This is the norm for a stripe run: the project is provisioned via Stripe Projects (credentials land in .env — see stripe/AUTHENTICATION.md), the skill configures the backend and emits the guide, and the live site is finalized per stripe/DEPLOYMENT.md — while the frontend is scaffolded and wired to intent, by the host.

Project types

The skill behaves identically across project types except for authentication and deployment, which are isolated in a per-type folder under references/:

Project typeHostingAuthentication & deployment live in
managedWix infrastructure (maintained by Wix)references/managed/
self-managedthe user's own host (TBD)references/self-managed/
stripethe user's own host, provisioned via Stripe Projectsreferences/stripe/

Everything else — Discovery, Setup, Seed, the SDK handoff — is project-type-agnostic and refers to "the provided authentication mechanism" rather than any specific method.

Resolving the project type

Resolve the type before Discovery, in this order — stop at the first that decides:

  1. Caller-provided. If the host/caller passed a project type (managed | self-managed | stripe), use it. An explicit value always wins.

  2. Detect from project signals (on disk). Check the working directory (read-only):

    • stripe — .env carries WIX_WIX_CLIENT_ID / WIX_WIX_CLIENT_SECRET / WIX_WIX_METASITE_ID (or the plain WIX_* fallback). This is the Stripe-Projects fingerprint.

    • managed — a Wix CLI project: wix.config.json present, or a .wix/ directory, or @wix/cli / @wix/astro in package.json.

    • self-managed — a frontend project on disk (e.g. package.json with a bundler/framework) with neither the Stripe .env fingerprint nor the Wix-CLI markers above.

  3. Detect from user intent. If disk is inconclusive, read the prompt:

    • managed — "managed", "host on Wix", "Wix-hosted", "deploy to Wix", "wix release".

    • stripe — "stripe projects", "I added Wix via Stripe", a Stripe-Projects context.

    • self-managed — "self-hosted", "my own host", names a non-Wix host, "I'll deploy it myself".

  4. Ask. If signals are absent or conflict, ask the user which type applies — don't guess.

Hold the resolved type in scratch; it selects <TYPE_DIR> (see Path resolution). Note self-managed is TBD — once resolved to it, the auth step will stop with a clear "not wired yet" error.

Resolving the operation (managed only)

create/connect/iterate are managed-only. For managed, resolve the operation by intent first, directory second — never let an empty directory override what the user is asking for. Check iterate first (it's decided by an unambiguous on-disk signal):

  • iterate → references/managed/CONNECT.md. The project is already connected to Wix — a wix.config.json (or .wix/) is already present — and the owner wants to add or change capabilities. Same flow as connect, but §1 skips init and reuses the existing wix.config.json; never re-init an already-connected project.

  • connect → references/managed/CONNECT.md. The user brings a design not yet connected to Wix and wants it wired: a frontend project on disk without a wix.config.json, or a brought-in/fetched design (a .zip/folder/file you unzip or read, a design-file URL, a Claude-Design/v0/Lovable export), or language like "connect this / implement this design (… connecting to Wix) / host this on Wix / deploy this to Wix / add Wix Headless to this project". A brought-in or fetched design is connect even when the current directory is empty — the design arrives from elsewhere (zip/fetch/URL), so emptiness at trigger time is not a create signal. (CONNECT.md step 1 places the brought design into CWD, then inits it.)

  • create → references/managed/CREATE.md. The user wants a new site built from a prompt with nothing brought in — "build me a site / store / blog…", no design file, no project on disk.

  • backend-only — the user only wants the backend configured (no frontend work). → the shared spine + emit the SDK handoff.

For self-managed and stripe, the operation is always backend-only (the host owns the frontend). Only when there is genuinely no brought-in design and no connect language does directory emptiness decide: empty → create; an existing frontend on disk → connect.

Preconditions (the host provides these — we read, never create)

  1. The project type — managed | self-managed | stripe — provided by the caller, else detected from project signals / user intent (see Project types § "Resolving the project type"), else asked. It selects <TYPE_DIR> (see Path resolution).

  2. A Wix metasite + a headless OAuth app exist, and credentials are available — obtained via the project type's AUTHENTICATION.md. The skill needs a bearer token authorized for the metasite and the metasite id.

  3. The user intent — free text describing what Wix should power ("add a store", "blog + contact form", "persist my app's data").

  4. (Optional) the project on disk — read-only, to sharpen brand/capability inference.

If the credentials are absent, the Wix backend isn't reachable — stop with a clear error.

What this skill does

Always open DISCOVERY.md first (it's agnostic — capability/brand/intent inference + the imagery gate, no auth). Then route by project type + operation:

Backend-only (self-managed, stripe, or managed backend-only) — the lean spine:

  1. Discovery (references/DISCOVERY.md) — infer capabilities + brand + intent + imagery.

  2. Setup (references/SETUP.md) — install the Wix apps those capabilities need.

  3. Seed (references/SEED.md) — create the backend content (+ entity images if imagery is on).

  4. Handoff (references/SDK_HANDOFF.md) — after Setup and Seed, emit the integration guide: SDK bootstrap, per-capability call shapes, the seeded IDs, and the @wix/* package list.

  5. Finalize deployment (<TYPE_DIR>/DEPLOYMENT.md) — run the project-type's finalize steps.

Throughout any run — if the user asks to send feedback to Wix, complains/gets frustrated, or the run hits any real friction (a confusing error, a doc gap, a tooling dead end, a workaround you had to invent — it doesn't need to repeat), offer to relay it to Wix per references/FEEDBACK.md. Default to offering rather than waiting to be asked. Every flow's finalize step (<TYPE_DIR>/DEPLOYMENT.md / managed/CREATE.md / managed/CONNECT.md) ends with the same checkpoint — treat it as a required self-check, not optional. Send only after an explicit yes — never automatically.

Managed create / connect / iterate — after Discovery, hand the whole run to the managed flow:

  • create → references/managed/CREATE.md (scaffold → Setup → Seed → build the frontend → release).

  • connect → references/managed/CONNECT.md (init → Setup → Seed → wire the existing UI → release).

  • iterate → references/managed/CONNECT.md — the project is already connected, so it reuses the existing wix.config.json (no init). Setup / Seed / wiring are incremental: it may already be set up and seeded from a prior run, so the agent checks current state first (installed apps, already-seeded content, existing wiring) and applies only the delta the new intent needs — never blindly re-installing or re-seeding. Re-release only if the frontend build output changed. These reuse the same SETUP.md/SEED.md/SDK_HANDOFF.md, but apply the SDK guide to build/wire the frontend themselves rather than emitting it, and release via managed/DEPLOYMENT.md.

Each Wix call uses the universal call shape (SETUP.md §1) with $TOKEN/$SITE_ID obtained per <TYPE_DIR>/AUTHENTICATION.md. The skill runs non-interactively except for the one imagery question (and asking the project type if it can't be resolved).

Don't smoke-test the frontend locally unless the user asks to verify. The deliverable is the built-and-released site (managed) or the SDK guide (backend-only) — not a local test report. By default do not start a dev server (wix dev / astro dev / npm run dev) to curl pages, drive the cart / booking / login flow, or launch a headless browser: correctness comes from following the recipes, real errors surface at wix build / wix release, and a headless run can't complete an interactive login or a real payment anyway — so these loops routinely burn minutes of wall for little signal (this is distinct from, and in addition to, the "release once at the very end" rule — that one only bans extra build+release cycles, not dev-server testing). Only spin up a dev server and smoke-test when the user's prompt explicitly asks to verify / test / confirm it works — and then keep it to a single lightweight pass (pages compile and render), not a full purchase/booking/login drive. The one post-release check in <TYPE_DIR>/DEPLOYMENT.md is the sanctioned verification.

Donations exception to the smoke-test policy above: for a build that accepts donations, follow the bounded anonymous API handoff check in references/inline-recipes/how-to-code-donations.md before claiming it works. It does not authorize a payment or campaign mutation, and does not require a dev-server testing loop. That recipe also defines the separate hosted-checkout and payment checks.

Path resolution

Compute <SKILL_ROOT> from this file (<SKILL_ROOT>/SKILL.md — strip /SKILL.md); hold the absolute path in scratch. Then resolve the project type to its folder and hold it too:

<TYPE_DIR> = <SKILL_ROOT>/references/<projectType>/ — one of managed/, self-managed/, stripe/.

WhatPath
Vertical index (intent matching + per-vertical site spec)<SKILL_ROOT>/references/CAPABILITIES.md
Discovery (infer capabilities + brand + intent; existing site → the Dynamic Context call in §1)<SKILL_ROOT>/references/DISCOVERY.md
Setup (install apps)<SKILL_ROOT>/references/SETUP.md
Seed (create backend content)<SKILL_ROOT>/references/SEED.md
SDK-integration handoff (emitted, or applied by create/connect)<SKILL_ROOT>/references/SDK_HANDOFF.md
Image generation (opt-in; agnostic)<SKILL_ROOT>/references/IMAGE_GENERATION.md
Design — fallback visual quality bar for the built frontend, when the user gave no design direction of their own (managed create only)<SKILL_ROOT>/references/DESIGN.md
Content — fallback copy quality bar for the built frontend, when the user gave no copy/voice direction of their own (managed create only)<SKILL_ROOT>/references/CONTENT.md
Experience overlays — a vertical's own design + copy bar on top of DESIGN/CONTENT (optional per vertical; read when that vertical is loaded)<SKILL_ROOT>/references/inline-recipes/experience-<vertical>.md (today: experience-store.md, experience-donations.md)
AI features — text/chat + embeddings (opt-in; agnostic)<SKILL_ROOT>/references/AI_FEATURES.md
Feedback — relay the user's headless-experience feedback to Wix (opt-in; user-approved)<SKILL_ROOT>/references/FEEDBACK.md
Authentication — obtain $TOKEN/$SITE_ID/clientId (project-type-specific)<TYPE_DIR>/AUTHENTICATION.md
Deployment — finalize the live site (project-type-specific)<TYPE_DIR>/DEPLOYMENT.md
Managed create flow (scaffold a new project)<SKILL_ROOT>/references/managed/CREATE.md
Managed connect flow (wire an existing project)<SKILL_ROOT>/references/managed/CONNECT.md
Frontend-axis references (how a frontend wires to Wix)<SKILL_ROOT>/references/astro.md, non-astro.md

Start a run by opening DISCOVERY.md. The flow files (CAPABILITIES, DISCOVERY, SETUP, SEED, SDK_HANDOFF, IMAGE_GENERATION, AI_FEATURES) are project-type-agnostic; the per-type specifics live under <TYPE_DIR>/ (AUTHENTICATION.md, DEPLOYMENT.md, and — managed only — CREATE.md/CONNECT.md).

Where the how comes from

This skill has no skill upstream — the how is read from the live Wix docs at dev.wix.com/docs. Read-priority: a page this skill links is read by curl-ing its .md twin directly (first priority — don't re-discover a curated link with search); the Wix MCP doc/search tools are second priority, for finding pages the skill doesn't link or as a fallback if a fetch fails. (Append .md to any docs URL for raw markdown; menu pages list child links, content pages carry the schema.)

Doc discovery is the shared fallback for both tracks — never the first move. Each track's primary source is its pinned material (below); when that doesn't cover what you need, fall back to references/DOC_DISCOVERY.md — a semantic doc-search + schema lookup that works with or without the Wix MCP.

  • Seed reads each capability's create flow from its inline recipe — a self-contained local inline-recipes/setup-*.md (mapped per capability in SEED.md § "What to seed per capability") that inlines the calls and supersedes the REST doc pages, so read it and seed from it alone. Only a capability with no inline recipe (e.g. coupons) falls back to doc discovery (DOC_DISCOVERY.md).

  • Handoff links the SDK docs for each capability's API shape, and supplies the runtime package set from the inlined map in SDK_HANDOFF.md (the SDK .md pages don't expose @wix/* import strings to navigation, so packages are mapped, not navigated).

Setup carries its app-install call (and the appDefId constants) inline in SETUP.md; CAPABILITIES.md is the vertical index that lets Discovery match intent and declares, per built vertical, the Required site features + Implementation checklist that Seed enables (backend-backed features) and the Handoff carries into the guide (so the host builds a complete site, not a bare data dump). This skill carries the what (which capabilities, how much content, what a finished site includes) and reads the how off the docs.

Files

references/astro.md

Astro — the pinned docs to read before connecting an Astro frontend to Wix

Astro is the documented default frontend for Wix-managed headless — pick it unless the user names another framework (then read non-astro.md instead). This file is to wiring an Astro frontend to the Wix backend what SEED.md is to seeding: the pointer to how it connects — an index of doc pages, each with a one-line "what it settles" note, followed by a Caveats section carrying the things the docs don't say. It holds no config blobs, page skeletons, design tokens, or payloads — the model designs and writes the whole frontend; this file only says how to connect it and what to watch out for.

Auto-auth is the whole point. On managed-Astro you create no client — no createClient, no OAuthStrategy, no clientId, no token handling in app code. You import { x } from "@wix/<pkg>" and call methods; @wix/astro + the session middleware authenticate every call automatically (§2, §3). The manual OAuth client survives only off this path — self-managed or non-Astro frontends (non-astro.md).

Hard constraint up front: Astro 5 only. headless link does not support Astro 6 — check the project's Astro major before linking an existing project (Caveat A1).

How to use it. Before scaffolding, wiring, or releasing, look the task up here and read its pinned pages top-to-bottom until you can act — read-then-act, never invent a URL or a config from memory. If a task has no entry, navigate from the doc index in §4.

URL form & how to read it. Each pinned link is the .md twin of a docs article (the article URL with .md appended). A page pinned here is already curated — read it directly; don't re-discover it with search. The two read paths take different URL forms — don't mix them:

  • curl the pinned link — first priority. Fetch it as-is (keep the .md) for raw markdown.

  • MCP doc tools — second priority (discovery of a page this file doesn't pin, or a fallback if a fetch fails). Pass the URL without the .md suffix: ReadFullDocsArticle for the guide/article pages here; SearchWixCLIDocumentation / SearchWixHeadlessDocumentation / SearchWixSDKDocumentation to reach an unpinned command or method page.

  • No MCP, or a shape not pinned anywhere → doc discovery (DOC_DISCOVERY.md): a curl semantic search (document_type: SDK/WIX_HEADLESS) plus structured schema lookup, then read the hit's .md?apiView=SDK.


Pick the row that matches the operation, then read it before running anything.

PageWhat it settles
https://dev.wix.com/docs/wix-cli/command-reference/project-creation/create-headless.mdcreate — npm create @wix/new@latest -- headless. The flags (--folder-name, --business-name, --site-template, --skip-install, --skip-git, --no-publish) and the required -- separator. --site-template accepts commerce|scheduler|registration|blank, but we don't adopt the business templates — the model designs, so scaffold blank and let config come from Wix, not template pages.
https://dev.wix.com/docs/go-headless/get-started/quick-starts/wix-managed-headless/quick-start-from-an-existing-astro-project.mdconnect (user brought an Astro project) — npm create @wix/new@latest -- headless link. The end-to-end "link an Astro project I already have" flow.
https://dev.wix.com/docs/wix-cli/command-reference/project-creation/create-headless-link.mdheadless link reference — link flags and exactly what it mutates in astro.config.mjs (the integration list, output: 'server', the image domain, the prod fetch adapter). Read alongside Caveat A2 — the docs' list is incomplete.
https://dev.wix.com/docs/wix-cli/command-reference/project-creation/create-init.mdinit — connect existing code in place without scaffolding (the lower-level connect primitive).
https://dev.wix.com/docs/go-headless/get-started/quick-starts/wix-managed-headless/quick-start-with-the-wix-cli.mdThe end-to-end orientation for a fresh managed project, start to finish — read once for the shape of the whole flow.

2 — The integration & auth (the keystone)

This is what makes managed-Astro different from every other path: authentication is automatic.

PageWhat it settles
https://dev.wix.com/docs/go-headless/wix-managed-headless/authentication/about-the-astro-integration.mdThe keystone. Auto-auth via the private app as OAuth handler, visitor sessions, member login, extensions, elevation. This is the "no client" anchor — read it first for §2/§3.
https://dev.wix.com/docs/go-headless/wix-managed-headless/authentication/handle-member-login-using-wix-s-astro-integration.mdMember login — the built-in /api/auth/login + /api/auth/logout routes and the returnUrl param. Use these instead of hand-rolling login. For the full frontend contract (login = sign-up, gate in SSR/backend route, current member via @wix/members, no client, no elevate, pricing-plans dependency) → Read inline-recipes/how-to-code-members-astro.md (local — Read it, don't curl). Only if the brief explicitly asks for a custom/branded login form or custom sign-up fields → Read inline-recipes/how-to-code-members-custom-login.md instead (a client-driven OAuthStrategy flow — on Astro that means an explicit client in a backend route, outside auto-auth; pick by intent, not project type).
https://dev.wix.com/docs/go-headless/wix-managed-headless/authentication/elevate-api-call-permissions.mdElevation. A privileged read at runtime goes in a backend HTTP endpoint (src/pages/api/*.ts, export const GET: APIRoute) that wraps auth.elevate(), called from the frontend via fetch('/api/…'). This is the documented shape — prefer it over inline-frontmatter elevation.
https://dev.wix.com/docs/go-headless/wix-managed-headless/authentication/fix-403-errors-for-api-calls.mdFix 403 — the identity-vs-permission troubleshooting page; read when a call 403s to tell "wrong identity" from "needs elevation."

3 — Frontend data access (SDK, no client)

PageWhat it settles
https://dev.wix.com/docs/sdk/articles/set-up-a-client/about-the-wix-client.mdConfirms managed-Astro is on the "don't need a client" list — the client/OAuthStrategy is for self-managed only. Read it to be sure you should not be constructing a client here.
https://dev.wix.com/docs/api-reference/articles/sdk-setup-and-usage/develop-with-the-sdk.mdDevelop with the SDK — calling SDK methods across SSR / islands / backend endpoints, and where elevation fits.

One line on what reaches the frontend: visitor-scoped reads work out of the box with no wiring. Admin-only data is seeded at build time (see SEED.md) — don't reach for runtime elevation unless the data genuinely can't be seeded ahead of time.

4 — CLI, project structure, dev loop, release

PageWhat it settles
https://dev.wix.com/docs/wix-cli/guides/about-the-wix-cli.mdWhat the CLI is and why the structure is Astro-based; auto-auth + session middleware framing.
https://dev.wix.com/docs/wix-cli/guides/project-structure/project-structure.mdOn-disk layout — .wix/, .astro/, astro.config.mjs, .env.local, wix.config.json, src/. What's generated and not to be hand-edited. (Field-name note: wix.config.json carries appId + siteId/projectId — read defensively.)
https://dev.wix.com/docs/wix-cli/command-reference/project-commands/dev.mdwix dev — local dev server with hot reload.
https://dev.wix.com/docs/wix-cli/command-reference/project-commands/build.mdwix build — build before release/preview.
https://dev.wix.com/docs/wix-cli/command-reference/project-commands/release.mdwix release — publishes the frontend build output to Wix hosting and registers the origin OOTB. Release once, at the end (managed/CREATE.md §5 / CONNECT.md §5) — not mid-flow. Re-release only when the build output itself changed. Seeded backend content and entity images are fetched at runtime, not baked into the build — a re-release does not refresh them, so never re-release to "clear a cache" for a backend data/image change (that's a red herring; a backend image not showing is an attach-shape bug — SEED.md § "Entity images"). Only if a genuine frontend republish shows stale build output does running wix release again help.

Prefer the documented wix … / npm run dev\|build\|release forms (the scaffold rewrites package.json to route them through wix). Deploy mechanics — origin registration, retries — live in managed/DEPLOYMENT.md, not here.

5 — Environment variables (custom vars only)

PageWhat it settles
https://dev.wix.com/docs/go-headless/wix-managed-headless/project-development/environment-variables/manage-environment-variables.mdThe documented mechanism. Declare each var in the envField schema in astro.config.mjs (context: client|server, access: public|secret); import from astro:env/client / astro:env/server; set with wix env set --key=… --value=…, pull with wix env pull (no --json). Never edit the WIX_CLIENT_* vars — the CLI manages them.
https://dev.wix.com/docs/go-headless/wix-managed-headless/project-development/environment-variables/about-environment-variables-in-the-cli.mdThe four var types (client/server × public/secret) — read when choosing the right context/access.

This is for custom vars only. Because there's no client on managed-Astro, app code doesn't read WIX_CLIENT_ID at all (don't reach for the import.meta.env.WIX_CLIENT_ID manual-client pattern — managed-Astro has no client, so there's nothing to read it into).

6 — SEO: let owners manage tags on item pages

Main pages (home, listings, about) get their SEO tags automatically on managed-Astro — nothing to write. Item pages — any parameterized detail route (/blog/[...slug], a product / service / event detail, an optional category/collection route) — do not: they need code so the tags a site owner edits in the dashboard reach the live <head>. Wire this on every managed site that renders item/detail routes — it's what lets owners control each item's <title>/description/OG/canonical without touching code, and it registers the route for the sitemap + dashboard SEO editor. Skipping it leaves detail pages with a generic fallback title the owner can't fix.

PageWhat it settles
https://dev.wix.com/docs/go-headless/wix-managed-headless/seo/add-seo-support-to-item-pages.mdThe item-page SEO contract. The three steps every detail route needs — export wixMetadata (route registration), call loadSEOTagsServiceConfig(...), render <SEO.Tags> — plus the deps (@wix/seo + @wix/essentials ≥ 1.0.10), the WIX_APPS sourcing rule (reference it directly in the export), per-page-type values, and how to verify. Read it before writing any [slug] / [...slug] detail page.

The per-vertical values — which WIX_APPS.*PageMetadata accessor + seoTags.ItemType.* to pass — live in each capability's inline-recipes/how-to-code-*.md (blog, store, bookings, events each name theirs).

7 — Caveats (the gaps the docs don't mention)

The heart of the file: hard-won knowledge the docs won't surface. These are guidance the model must follow when it writes the frontend — not things this skill writes for it.

CaveatWhat it says
A1 — Astro 5 onlyheadless link does not support Astro 6. Before linking an existing Astro project, check its Astro major; on 6 it fails. Fresh scaffolds are fine (they pin a supported Astro).
A2 — astro.config.mjs always carries wixPages() + checkOrigin: falseA working config must always include @wix/astro-pages (wixPages()) alongside wix()/react(), and set security: { checkOrigin: false }. Neither is in the docs; both are unconditional (no "when to add" logic). wixPages() injects the /_wix/pages.json page manifest + the wix:astro:pages virtual module the Wix platform consumes — omit it and /_wix/pages.json 404s. checkOrigin: false disables Astro 5's CSRF origin check, which false-positives on legitimate same-site POSTs behind Wix hosting; it's a safe no-op when there are no server POSTs. If you touch astro.config.mjs, keep both.
A3 — Guard every SSR SDK callWrap every Wix SDK call in .astro frontmatter in try/catch — an unguarded throw truncates the response mid-stream (white screen). Memoize repeated SSR probes at module scope to coalesce duplicate calls within a request.
A4 — Islands reading browser-only state must be client:only="react"An island that reads browser-only state (cart badge via sessionStorage, availability/booking widgets) must be client:only="react", not client:load — otherwise SSR renders a zero/empty state and hydration flashes it to the real value.
A5 — No HTML comments in .astro frontmatter.astro frontmatter is TypeScript — use //, never <!-- -->, or the build fails.
A6 — Wix media + rich textResolve wix:image:// URIs — never hand-build the CDN URL. SDK media fields (product/blog/CMS images) come back as internal identifiers like wix:image://v1/<hash>/<file>#originWidth=…, not ready URLs. Convert them with the SDK media module — import { media } from '@wix/sdk', then media.getScaledToFillImageUrl(uri, w, h, {}) (returns the URL string directly — do NOT append .url; the 4th options arg is required, pass {}), or media.getImageUrl(uri).url for the original (that one returns a { url } object). The two shapes differ — mixing them (getScaledToFillImageUrl(...).url) resolves every image to undefined. Manually building a static.wixstatic.com/.../v1/fit/... URL gets the format wrong and the image 403s (or silently fails to load). Only wix:image:// values need this — an already-absolute https:// URL (e.g. an Unsplash placeholder) passes straight through. Docs: https://dev.wix.com/docs/sdk/core-modules/sdk/media. Then constrain Wix image URLs (aspect-ratio + object-fit: cover) or they render at intrinsic size and overflow the layout. Rich text: the ban is on dumping raw HTML/Ricos into a text node — when you bind a rich-text field into a layout slot (a card excerpt, a textContent string), use its .plain variant. This is not a "render plain text" rule: a blog post body is richContent (Ricos) and must render formatted — via @wix/ricos, or by converting Ricos → sanitized HTML and rendering with set:html (SDK_HANDOFF §3/§6 require full formatted content, not flattened text). Plain .plain is for short bound fields; formatted Ricos is for the post body.
A7 — clientId is off-path hereIn managed-Astro there is no client, so appId-as-clientId only matters on the self-managed / non-Astro path (see non-astro.md). Don't construct one here.
A8 — Member auth uses the built-in routes, never an OAuthStrategy clientRender account/gated UI behind a login check resolved server-side — in SSR frontmatter (guarded try/catch, A3) or a src/pages/api/*.ts route — and bounce anonymous visitors with /api/auth/login?returnUrl=… (the same shape blog comments already use). Do not build an OAuthStrategy login handshake on Astro — that's the non-Astro path and it 500s under auto-auth. Read the current member with @wix/members getCurrentMember (not the dev-preview @wix/site-members). Full contract: inline-recipes/how-to-code-members-astro.md.
A9 — sharp is dev-only and never used here — pre-empt it, never build or diagnose itsharp is not a declared dependency: it's an optional transitive dep of Astro (astro.optionalDependencies.sharp, absent from your package.json) that powers only Astro's local, build-time image optimization (astro:assets / <Image>). This headless flow serves remote Wix Media URLs (static.wixstatic.com) through plain <img> — it never calls <Image>, so sharp is invoked at neither build nor runtime; it is pure dev-time dead weight here. Its postinstall can try to build from source via node-gyp, fail, and abort the whole npm install, leaving node_modules/ empty. Pre-empt this — don't react to it: always run npm install --ignore-scripts (skips sharp's failing native build; the Wix CLI/SDK packages carry no postinstall that this breaks). Do not reach for --no-optional (deprecated / a silent no-op in npm 7+, so sharp still builds and aborts) or --omit=optional (sharp still resolves and builds). A missing or failed sharp is expected and irrelevant to a site that serves remote image URLs: never retry the install, switch node versions, add node-addon-api, or spend any time diagnosing a sharp error — one --ignore-scripts install, then move straight on.

Seeding token (cross-link, not duplicated): build-time seeding still mints a REST token via the Wix CLI — that token is byte-identical on every re-mint, so mint once and reuse. The full token mechanism lives in managed/AUTHENTICATION.md; don't restate it here.

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 · 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.zip