> To build a Wix site agentically, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Build with a Coding Agent

## Article: Build with a Coding Agent

## Article Link: https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/get-started/build-with-a-coding-agent.md

## Article Content:

# Build with a Coding Agent

Go from a single prompt to a deployed Wix-managed Astro project. You describe what you want to build, and a coding agent on your computer creates the business, scaffolds the Astro project, and publishes the site. You continue from the project folder with the Wix CLI.

This is the [Astro path, with the Wix CLI](https://dev.wix.com/docs/go-headless/get-started/choose-your-development-path.md#with-the-wix-cli). 

## What you can build

With a single prompt, your agent can build and deploy a complete, working site backed by Wix business solutions: a store, a booking system, a blog, and more.

Describe what you want in plain language:

- *Build a storefront for handmade ceramics with a product catalog and checkout.* ([Wix Stores](https://dev.wix.com/docs/api-reference/business-solutions/stores/introduction.md))
- *Build a booking site for a yoga studio with class schedules and online payments.* ([Wix Bookings](https://dev.wix.com/docs/api-reference/business-solutions/bookings/introduction.md))
- *Build an events page that sells tickets.* ([Wix Events](https://dev.wix.com/docs/api-reference/business-solutions/events/introduction.md))
- *Build a portfolio site for an architecture firm, with projects managed in a CMS.* ([Wix CMS](https://dev.wix.com/docs/api-reference/business-solutions/cms/introduction.md))
- *Build a membership site for a fitness coach with gated, members-only content.* ([Wix Members](https://dev.wix.com/docs/api-reference/crm/members-contacts/members/introduction.md))

The agent reads your prompt, picks the solutions your site needs, and installs them for you. This is a starting point, not a limit: because the skill reads Wix's live documentation, your agent can discover and wire up any Wix business solution, not just the common ones. If you need something specific, name it in your prompt, or paste a link to the relevant Wix documentation for the agent to read. Learn more about [featured business solutions for Wix Headless](https://dev.wix.com/docs/go-headless/business-solutions/featured-business-solutions.md).

<blockquote classname="tip">

**Tip**: The more detail you give, such as the desired pages, data, and design, the more complete the result. For ready to adapt examples, see the [prompt recipes](#prompt-recipes).

</blockquote>

## Before you begin

Make sure you have:

- A Wix account. If you don't have one, [sign up](https://manage.wix.com/account/custom-apps).
- A coding agent such as Claude Code, Cursor, Codex, or GitHub Copilot in VS Code.
- [Node.js](https://nodejs.org/en/) (v24.22.1 or higher), to continue with the Wix CLI. The agent installs it when it can.

## Step 1 | Build with a single prompt

The [Wix Headless skill](https://wix.com/headless/skill.md) tells your coding agent how to create the business, scaffold an Astro project, and publish it on Wix.

<blockquote class="caution">

__Caution:__ This path always provisions a new business and site. If you already have a project, from the [self-managed quick start](https://dev.wix.com/docs/go-headless/self-managed-headless/get-started/create-a-self-managed-headless-project.md) or a dashboard-created [headless client](https://dev.wix.com/docs/go-headless/authentication/setup/set-up-a-headless-client.md), this flow can't attach to it. If you paste an existing `siteId` or `clientId` into your prompt, the agent won't use it, and you'll end up with 2 separate, unrelated Wix projects. To use a project you already have, leave the skill URL out of your prompt. Call the [JavaScript SDK](https://dev.wix.com/docs/sdk.md) or the [REST API](https://dev.wix.com/docs/rest.md) with that project's site ID and client ID.

</blockquote>

In your coding agent, describe what you want to build and include the skill URL. For example:

```text
Build a storefront for handmade ceramics using https://wix.com/headless/skill.md
```

The agent provisions the business and site, scaffolds the Astro project in a folder on your computer, and publishes the frontend. For more detailed, ready-to-adapt prompts, see [Prompt recipes](#prompt-recipes). To understand what happens between your prompt and the deployed site, see [How it works](#how-it-works).

You can tell the skill is working when the agent asks you to log in to Wix, reports that it provisioned a site, and names the business solutions it installed.

## Step 2 | Find your project

Your project appears in your [Wix dashboard](https://support.wix.com/en/article/about-your-wix-dashboard) alongside your sites. [Open your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fhome) to view the live URL, manage the site, or connect a custom domain.

The agent saves the Astro project in a folder on your computer. Ask it where it saved the project. You continue from that folder with the Wix CLI. **Edit Frontend** doesn't open these Astro sites in another tool.

## Step 3 (Recommended) | Install the Wix plugin for ongoing work

The single-prompt skill is enough to scaffold and deploy. For ongoing development, install the [Wix plugin](https://dev.wix.com/docs/go-headless/get-started/headless-ai-toolkit.md#install-the-wix-plugin) in your AI client. It adds [Wix Skills](https://dev.wix.com/docs/api-reference/articles/ai-tools/about-wix-skills.md) and the [Wix MCP](https://dev.wix.com/docs/api-reference/articles/ai-tools/wix-mcp/about-the-wix-mcp.md) together, giving your agent persistent Wix context so it can search Wix docs, scaffold code, and call Wix APIs directly from your chat.

## Step 4 | Keep building

Keep prompting the agent in the project folder to add features and functionality. Define your data model, add authentication, build UI, and redeploy.

To preview and publish from that folder, run `npx wix preview`, then [`npx wix release`](https://dev.wix.com/docs/wix-cli/cli-for-headless/command-reference/project-commands/release.md).

You don't need to stay in the same chat to keep working. Start a new chat in the project folder and tell the agent what you want to change. **Site Settings** in the dashboard has **Publish** and **Unpublish**. After you release from the project folder, publish further updates with `npx wix release`.

## How it works

A lot happens between your prompt and the deployed result. You don't run any of it yourself, but knowing the sequence helps you follow along, tell when something has gone wrong, and steer the agent toward the site you want.

<details>
<summary>From your prompt to a deployed site</summary>

1. **You describe what you want.** Your prompt, plus the skill URL, is the whole input. The more detail you give about pages, data, and design, the more complete the result.
2. **The agent gets set up.** It checks your environment and installs the skill. If necessary, the agent logs you in to Wix. Logging in happens once in your browser: the agent shows you a link and a code to confirm, then continues on its own.
3. **The agent works out what to build.** In this discovery phase, it reads your prompt and infers the business solutions you need, a brand and tone for the content, and how much example content to create. This is where it might ask you to make a choice.
4. **The agent provisions and builds.** It creates the Wix business and site, installs the business solutions your project needs, seeds realistic example content, and builds the frontend so that every page connects to your live Wix backend instead of to mock data.
5. **The agent deploys.** It publishes the site to Wix hosting and gives you a live URL. It saves the Astro project as a folder on your computer, and you continue from that folder with the Wix CLI.

</details>

<details>
<summary>Questions the agent might ask</summary>

The skill runs with little back-and-forth, but the agent pauses when a choice is genuinely yours to make. Common examples:

- **Imagery.** Choose whether the agent generates AI images for your content and pages or uses styled placeholder graphics instead. Generated images look richer but cost roughly 1 Wix AI credit each. Placeholders are free and easy to replace with your own photos later.
- **An ambiguous request.** If your prompt could point to several business solutions or your intent isn't clear, the agent asks you to clarify rather than guess.

Answer in plain language. If the agent doesn't ask about something you care about, such as a specific business solution, a data schema, or a design direction, say so in your prompt up front instead of waiting for the agent to ask.

</details>

## Best practices

For the best result, follow these best practices:

- **Structure your prompt.** Group your requirements into functionality, pages, and design so the agent can work through them methodically.
- **Name your data and its schema.** Specify required collection names and fields with their types. For example, a 'projects' collection with Project Name (text), Main Image (image), and Location (text).
- **Ask to seed example content.** Request realistic sample data so the site looks complete out of the box and is easy to review.
- **Specify Wix business solutions.** If you know you need Wix Stores, Bookings, Blog, or the CMS, say so to point the agent at the right APIs.
- **Mention authentication early.** If members need to log in, say so up front so the agent sets it up from the start.
- **Describe behavior, not structure.** Tell the agent what site visitors should be able to do, and let it choose the implementation.
- **Call out responsiveness and accessibility.** Ask for a mobile-friendly layout, good color contrast, and alt text so the result is production-ready.
- **Iterate.** Build the smallest working version first, then keep prompting to extend it.

## Troubleshooting

Because the agent infers a lot from a short prompt, the first result doesn't always match what you pictured. These are some common gaps and how to close them:

- **You got a site that isn't connected to Wix.** The skill URL was probably missing from your prompt, so the agent built a generic mockup or a bare scaffold instead. Check your Wix dashboard: if no new site appears, start again with the skill URL included.
- **You got the wrong business solution.** The agent inferred a different solution than you intended, such as a static schedule instead of real bookings. To fix this, follow up in the agent chat and tell it explicitly which solution to use, such as asking it to power the class schedule with Wix Bookings rather than a static list. Naming the solution removes the guesswork.
- **You want to add another solution.** You don't have to start over. Ask the agent to add it, such as a blog or a contact form. It installs the solution, seeds content, and builds the new pages on the existing site. Make that request in the project folder.
- **You're not sure what the agent did.** Ask it. It can tell you which business solutions it installed, what content it seeded, and where it saved the project folder. You can confirm the site from your Wix dashboard.
- **Something else went wrong, or you're stuck.** Ask your agent to help. It has your project context, so it can inspect the code, explain what it did, and often diagnose and fix the problem itself.

## Prompt recipes

A short prompt gets you started, but a detailed one gets you a finished site. The recipes below show how to structure a thorough prompt: group your requirements into functionality, pages, and design, name your data up front, and ask the agent to seed realistic example content.

### Portfolio site with a CMS

```text
Using the Wix Headless skill at https://wix.com/headless/skill.md, create a new site hosted on Wix for an architecture firm named Atelier Mercer to showcase their projects.

FUNCTIONALITY
- Use Wix CMS to store projects in a collection named 'projects' with this schema: Project Name (text), Main Image (image), Description (rich text), Location (text), Image Gallery (media gallery), Architect (text), Display on Site (boolean).
- Seed the collection with 10 realistic example projects so the site looks complete out of the box.
- Anywhere projects are listed, only render items where 'Display on Site' is true.
- Generate a detail page for each project dynamically, using the Project Name for a clean URL slug.

PAGES
- Home: full-bleed hero with the firm name and tagline, then a featured grid of projects.
- Projects: full grid of projects where Display on Site is true (each card shows Main Image, Project Name, and Location).
- Project detail: large image, name, location, architect, description, and the image gallery.
- About and Contact pages, with a contact form.

DESIGN
- Minimalist, editorial, and image-forward, with a near-monochrome palette and one subtle accent color.
- Refined serif headings paired with a clean sans for body text; generous whitespace and a strict grid.
- Fully responsive (single-column grid and hamburger nav on mobile) and accessible (good contrast, alt text driven from project data, keyboard-navigable galleries).
```

### Online store with Wix Stores

```text
Using the Wix Headless skill at https://wix.com/headless/skill.md, create a new site hosted on Wix for a pet shop. Use Wix Stores for the catalog and Wix's native checkout.

FUNCTIONALITY
- Use Wix Stores to manage the catalog. Create 5 example products: dog food, cat food, a bird cage with a "Size" option (Small, Medium, Large, each priced differently), a fish tank with a "Capacity" option (20L, 40L, 60L, each priced differently), and a pet toy bundle.
- Give each product a realistic name, description, price, and at least one image, and assign products to sensible categories (Dogs, Cats, Birds, Fish, Accessories).

PAGES
- Home: hero with the shop name and tagline, a few featured products, and links to categories.
- Shop: product grid with image, name, price, and add-to-cart, filterable by category.
- Product detail: images, name, description, price, variant and quantity selectors, and add-to-cart.
- Cart: line items, quantity controls, subtotal, and a checkout button.
- About and Contact pages.
- Persistent header with logo, nav, and a cart icon showing the item count; footer with contact info.

DESIGN
- Friendly, warm, and approachable, but clean and trustworthy for e-commerce.
- Warm palette (creams, soft neutrals) with one or two cheerful accent colors for buttons and highlights.
- Rounded, friendly heading typeface paired with a clean, legible sans for body text.
- Fully responsive and accessible (good contrast, image alt text, keyboard-navigable nav and cart).
```

## See also

- [Headless AI Toolkit](https://dev.wix.com/docs/go-headless/get-started/headless-ai-toolkit.md)
- [About Wix-Managed Headless](https://dev.wix.com/docs/go-headless/wix-managed-headless/about-wix-managed-headless.md)