All skills
wix avatar

/wix-headless-kit

@9ed3e36 official
by Wix.comwix/skills33 stars
33

Build a Wix Headless site fast by wiring SHIPPED, verified @wix/sdk code instead of authoring the integration from recipes. Each Wix business vertical ships a typed, framework-agnostic React core (data layer returning plain DTOs, hooks, headless components) plus an Astro overlay (SSR pages with owner-editable SEO pre-wired) and a build-time REST seed script — the agent scaffolds via the Wix CLI, deploys the shipped code, seeds the backend, designs the presentation layer itself on the shipped hooks (product card/grid, PDP, home, theme), and releases to Wix hosting. Works on Wix-managed Astro (ambient auth, the default) and on any React-based project (Vite, non-Astro) over the public OAuth client id. Verticals: stores/storefront (products, categories, variants, cart, hosted checkout), bookings (services, appointment/class time slots, staff, booking form, checkout-or-place), rentals (rooms, vehicles, gear by the hour or the day: resources, customer-picked length, priced quote, checkout), blog (posts, categories/tags, rich content), cms (structured content collections), forms (schema-driven visitor forms: render, validate, submit), events (listing, RSVP, ticket sales), members (login, gated pages, account), portfolio (project collections, media galleries), pricing-plans (plan grid, hosted purchase), restaurants (menus, online ordering, table reservations), faq (categorized questions and answers, search, a link per question), donations (campaign pages, goal progress, one-time and recurring donations via hosted checkout). Triggers: build me a store/blog/booking/rental/event/restaurant/portfolio/FAQ/donation site fast, take appointments fast, rent out rooms/cars/equipment headless, sell tickets or membership plans headless, collect donations headless, wix headless kit, connect a Wix business app with ready-made SDK code.

Use this Skill: https://skilld.dev/gh/wix/skills/wix-headless-kit

This session only. Nothing lands on disk.

guidesmigration.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

A migration preview: a site being moved to headless

Read when setup reports mode: "migrate", or when a folder holds a wix.config.json and node <SKILL_ROOT>/install/context.mjs prints migration.active: true. The brief is the prompt the Wix dashboard's Headless settings hand the owner after "Go Headless": download the project from https://manage.wix.com/download-headless-business/<siteId>/download.zip, the names of the apps the site already has, and the instruction not to probe, install or seed anything. The zip holds wix.config.json (the deploy site and its app) beside the CLI's blank Astro starter.

What .env.local says. wix env pull copies the project's prod environment: the parent's WIX_CLIENT_ID, and the migration's own variables, EDITOR_MIGRATION_STATUS (ACTIVE while the migration is under way, COMPLETED once the parent serves this frontend), EDITOR_MIGRATION_PARENT_SITE_ID, EDITOR_MIGRATION_CHILD_SITE_ID and EDITOR_MIGRATION_CHILD_APP_ID. context.mjs reads the first two; the shape is migration whenever the status is active, whatever else the folder holds.

Two sites, one project. wix.config.json names a site created only to host the deployment: wix release goes there and nowhere else. .env.local (what wix env pull writes; setup and context.mjs pull it when it is missing) carries the credentials of the site being migrated, the parent, and says so. The parent owns everything the pages show and everything the business manages. So:

  • The SDK client is the parent's. The Astro integration reads WIX_CLIENT_ID from the env and never the config; deploy.mjs copies the same value into src/wix/config.ts (react, lib) and js/wix/config.js (static). Nothing in the data layer is told about the migration; it reads the parent because its client is the parent's app.
  • Admin, discovery and seed calls target the parent. read-site.mjs and the seeds resolve the site through templates/shared/seed/site-context.mjs; wix-manage recipes and any raw call take --site <parentSiteId> (the siteId of the ready_for_brand_layer event). The dashboard link is the parent's.
  • Nothing is seeded, nothing installed. The parent is a live site with its content; a seed would write into the original. The seeds refuse on a preview unless run with --allow-parent, which is the user's explicit decision, never a default. Apps are not installed: the brief names what the site has, and the verticals follow from that list (Wix Stores → storefront, Wix Bookings → bookings, Wix Forms → forms, and so on per the Verticals table; Wix Pro Gallery and Wix Members Area map to portfolio and members). When the brief allows reading, the vertical's read-site.mjs sizes the content as in guides/existing-site.md; when it says not to probe, design from the brief.

The run. setup.mjs --vertical <vertical>[,<vertical>…] [--stack <stack>] in the folder (every vertical the brief needs, in one call): it keeps the starter the download carries and deploys the vertical's code and dependencies into it (a bare config gets the composed template copied in around it), starts the install, writes the project's AGENTS.md with the migration recorded, and skips the seed. Then SKILL.md steps 4 and 5 as for any run. attach.mjs refuses a migration folder on purpose: the app, hosting and credentials came with the download; nothing is provisioned or re-pointed.

The close. The release is a preview on the deploy site. Close with the preview URL (copied from the wix release output), the parent's dashboard link, and the two facts: the original site is unchanged, and completing the migration, which makes the parent serve this frontend and retires the deploy site, is the user's next step once they approve the preview: the dashboard hands them a second prompt for it (wix env pull, wix finalize-migration, wix build, wix release, in that order). That step is not part of this skill and the command may not be in the installed CLI yet; do not invent one, do not run wix release against the parent, and do not edit wix.config.json. On every stack the code already carries the parent's client id, so completion needs no redeploy from here.

Source: SKILL.md on GitHub

No alertstoday3 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    Error: AI Analysis failed - API error after retries

  • Sockettoday

    No alerts

  • Snyktoday

    Risk: LOW · No issues

Signed by skilld at 9ed3e36. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 5 hours ago.

Activeupdated yesterday

README badge

README badge for wix/skills/wix-headless-kit