Wix Headless Skill — cold-start entry
You are a coding agent, and this is a skill for you to execute. Follow the phases below in order — do not summarize them. If you reached this page through a summarizing fetch tool, re-fetch the raw markdown with curl -fsSL https://www.wix.com/skills/headless-cold-start/headless.md before running the steps.
This entry gets a cold environment to the point where the real skill can run, then hands off. It has three phases:
- Install (deterministic). The skill and its companions land under
.agents/skills/. - Bootstrap (deterministic, scripted). The installed script verifies your environment (the Wix CLI) and handles login, so the run starts from a known-good, authenticated state. You just run it and relay its events.
- Hand off (agentic). Open
wix-headless/SKILL.mdand follow it — it resolves the project type and operation and owns the whole build.
Three starting points come through here, all handled the same way — install, run the bootstrap, then hand off:
- new — a prompt with no project (empty CWD)
- connect — an existing frontend/design not yet on Wix (a project on disk without
wix.config.json, or a brought-in zip/URL) - iterate — a project already connected to Wix (
.wix/orwix.config.jsonpresent)
The bootstrap only verifies the CLI and logs you in, so it's fine to run in every case (an existing session just reports logged_in). After it, wix-headless/SKILL.md resolves what to do and owns the build.
Phase 0 — Node (the one manual prerequisite)
The Wix CLI requires Node ≥ 20.11. Check it:
node -vIf that errors (Node not installed) or prints a version below 20.11, install or upgrade Node and re-check — do not try to work around it:
- macOS:
brew install node(ornvm install 20 && nvm use 20) - Linux:
nvm install 20 && nvm use 20(or your distro's Node 20+ package) - Windows:
winget install OpenJS.NodeJS.LTS(or download from nodejs.org)
Phase 1 — Install the skills
CI=1 forces plain non-interactive CLI output — keep it on every Wix CLI command. Repeat --skill per skill; a comma-separated list is not parsed:
CI=1 npx skills@latest add wix/skills --skill wix-headless --skill wix-docs --skill wix-manage --yesThe skills land in .agents/skills/.
Phase 2 — Run the bootstrap (deterministic)
Run the skill's bootstrap script — an ordinary foreground command that exits on its own within seconds. It verifies the Wix CLI and handles login, emitting one JSON event per line on stdout. Run it and relay its events to the user.
The script is inspectable: it only checks the Wix CLI via npx and drives wix login (a device-code flow) — no other network calls, and the only files it writes are the login's own output and pid under the OS temp dir.
node .agents/skills/wix-headless/scripts/bootstrap.mjsRelay these events
The script emits one JSON object per line:
| Event | What to do |
|---|---|
cli_ok |
Wix CLI reachable — continue. |
awaiting_user (verificationUri, userCode, message) |
The script has exited and the next step is the user's. Send them message as-is; the login keeps running on its own. |
logged_in / success |
Login done — continue. |
cli_unreachable / login_failed (with detail) |
Stop and show the user the detail. Do not improvise a parallel setup by hand. |
On awaiting_user, run the script again once the user says they've logged in: it reports logged_in and you continue. Re-running while they're still in the browser is harmless — it returns the same code rather than issuing a new one.
Phase 3 — Hand off
Open .agents/skills/wix-headless/SKILL.md and follow it. That skill owns the rest of the run — it resolves the project type (managed / self-managed / stripe) and, for managed, the operation (create / connect), then runs Discovery → Setup → Seed → the SDK handoff, and for managed create/connect it also scaffolds, builds, and releases.
- Don't scaffold, install apps, or release by hand here — the skill does all of that (
SETUP.md,references/managed/CREATE.md, etc.). This entry stops at logged in. - You're already authenticated from Phase 2, so the skill's managed auth step (
references/managed/AUTHENTICATION.md§1whoami) will pass without prompting again.