SKILL.md

Wix Vibe Headless — client-only REST connectors

Wire an existing front end to a live Wix site from the browser, over the site's public WIX_CLIENT_ID, using hand-rolled REST — no @wix/sdk, no backend, no build step, no dependencies. One skill, one shared transport, and a copy-as-is REST layer per Wix business solution. Everything is read-only over the owner's content: render live Wix data or an honest empty state — never mock, never provision, never invent products, posts, events, menus, plans, reviews, or counts.

When to use this skill

When NOT to use this skill

Scenario Use instead
Build a new Wix site end-to-end from one prompt (discovery → design → build → host) wix-headless
The project should use the Wix SDK (@wix/sdk) and/or the Wix CLI, or be hosted on Wix wix-headless
Manage/configure the site via REST (install apps, seed catalogs, set up business solutions) wix-manage
Build a Wix app extension (dashboard page, widget, backend, plugin) wix-app

This skill is the deliberately client-only, REST-only path. It is independent from wix-headless (which is SDK + CLI + hosting) — do not mix the two in one project.

The shared model (applies to every vertical)

How this skill is structured

<SKILL_ROOT> is this file's directory (strip /SKILL.md). Two files make up each vertical's runtime:

  1. The shared transportreferences/shared/wix-client.js. Identical for every vertical. Copy it once into the app's src/rest/ and set WIX_CLIENT_ID in it.
  2. The vertical helperreferences/<vertical>/<helper>.js. Copy it into the same src/rest/ folder (it does import { wixApiRequest } from "./wix-client.js", so the two files must sit side by side).

Each vertical's INSTRUCTIONS.md is the full playbook for that solution: when to use it, prerequisites, the exported API, how to wire it, the hard rules, and a verification checklist. Open the relevant INSTRUCTIONS.md before wiring — the shapes and gotchas live there.

Routing — pick the vertical(s) from the request

Load the vertical(s) the user's app needs; a project may combine several (e.g. a restaurant with a blog, or a store with pricing plans).

The user wants… Vertical Read Helper(s) to copy (+ shared/wix-client.js)
Online store: products, categories, cart, checkout storefront references/storefront/INSTRUCTIONS.md wix-store-catalog.js + wix-store-cart.js
Appointments: services, time slots, booking, checkout bookings references/bookings/INSTRUCTIONS.md wix-bookings-services.js + wix-bookings-checkout.js
Blog/news: post feed, post pages, categories, tags blog references/blog/INSTRUCTIONS.md references/blog/wix-blog.js
Events: browse, event page, RSVP, ticketing events references/events/INSTRUCTIONS.md wix-events-browse.js (always) + wix-events-registration.js (RSVP/tickets)
Portfolio/showcase: collections, projects, media galleries portfolio references/portfolio/INSTRUCTIONS.md references/portfolio/wix-portfolio.js
Restaurant: menu, online ordering, table reservations restaurants references/restaurants/INSTRUCTIONS.md wix-restaurants-menu.js (always) + wix-restaurants-ordering.js + wix-restaurants-reservations.js as needed
CMS content: list/detail, filter/search, forms, data CRUD cms references/cms/INSTRUCTIONS.md references/cms/wix-cms.js
Plans & pricing: memberships/subscriptions, subscribe, my plans pricing-plans references/pricing-plans/INSTRUCTIONS.md references/pricing-plans/wix-pricing-plans.js
Member accounts: custom login/sign-up (email+password, Google/Facebook, SSO), account area, gated content members references/members/INSTRUCTIONS.md references/members/wix-members-auth.js

The run

  1. Get WIX_CLIENT_ID. It comes from the user (the handoff prompt from their Wix/vibe platform carries it). If it's missing, ask for it before wiring — nothing works without it.
  2. Pick the vertical(s) from the routing table and open each one's INSTRUCTIONS.md.
  3. Copy the two files per verticalshared/wix-client.js (once) + the vertical helper — into the app's src/rest/ (adjust only the import path if the app uses a different folder), and set WIX_CLIENT_ID.
  4. Wire the UI to the exported helpers following the vertical's INSTRUCTIONS. Build the UI however the project wants — these scaffolds ship the REST layer only, no components.
  5. Verify against the vertical's checklist before declaring done: token persists across reload, live data renders (or a real empty state), and purchases go through the Wix redirect.

Some flows need Wix-side setup the user completes later (payments connected, the deployed domain allow-listed on the OAuth client for hosted-checkout return, collection permissions). Those are out of scope here — if a call fails for that reason, flag it and continue; don't fall back to mock data.