> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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: Context Provider Resources Reference

## Article: Context Provider Resources Reference

## Article Link: https://dev.wix.com/docs/site-extensions/context-providers/context-provider-resources-reference.md

## Article Content:

# Context Provider Resources Reference

The `resources` section of a context provider manifest identifies the provider component and its context hook. The editor and runtime use this information to load the provider and route its exposed values and functions to connected components.

## Example

The following `resources` section points to a provider in a Studio Two site project:

```ts
resources: {
  client: {
    url: './extensions/site/contexts/team-context/team-context.tsx',
  },
  contextSpecifier: {
    hook: 'useTeamContext',
    moduleSpecifier: '@/team-context',
  },
}
```

## Resources fields

A `resources` section supports the following fields:

| Field | Required | Description |
| --- | --- | --- |
| `client` | Yes | Provider component bundle that runs on the live site. |
| `contextSpecifier` | Yes | Name and module identifier of the provider's context hook. |
| `editor` | No | Separate provider component bundle for design-time behavior. |

## Client resource

The `client` field identifies the provider component that runs on the live site.

| Field | Required | Description |
| --- | --- | --- |
| `url` | Yes | URL or project-relative path to a module whose default export is the provider component. |

The Wix Extension Builder uses a project-relative path for a Studio Two Data Source:

```ts
client: {
  url: './extensions/site/contexts/my-data-source/my-data-source.tsx',
}
```

## Context specifier

The `contextSpecifier` field identifies the hook that the provider component exports.

| Field | Required | Description |
| --- | --- | --- |
| `hook` | Yes | Name of the exported hook. Maximum 100 characters. |
| `moduleSpecifier` | No | Module identifier that Wix registers the context under. Maximum 100 characters. See [Module specifier](#module-specifier). |

Set `hook` to the exact export name. React hook names start with `use`, such as `useTeamContext`.

Connected components receive context values and functions through editor binding as props. They don't call this hook. The provider must still export the hook because the context provider manifest requires it.

### Module specifier

Wix registers the `moduleSpecifier` and maps it to the provider's bundle in the site's import map, so code can import the provider's hook by that name. Wix loads the provider itself from `resources.client.url`. Give every new Data Source in a Studio Two site a `moduleSpecifier` that follows these rules:

- It starts with `@/`, followed by the provider folder name, such as `@/team-context`.
- It's unique in your site. Another Data Source or function library in the site can't use the same value.
- It's 100 characters or fewer, including the prefix.
- You can't change it. After Wix registers a provider with a `moduleSpecifier`, Wix rejects a manifest that sets a different value.

The generated manifest doesn't include `moduleSpecifier`, so add it yourself. When Wix's AI tools create a Data Source, they add it for you.

For a provider published as an npm package, `moduleSpecifier` is the name of the package that exports the context hook.

## Editor resource

The optional `editor` field identifies a provider component that the editor loads at design time instead of the `client` resource. It can provide placeholder values when the live data isn't available in the editor.

| Field | Required | Description |
| --- | --- | --- |
| `url` | Yes | URL or project-relative path to a module whose default export is the design-time provider component. |

## See also

- [About the Context Provider Manifest](https://dev.wix.com/docs/site-extensions/context-providers/about-the-context-provider-manifest.md)
- [Context Reference](https://dev.wix.com/docs/site-extensions/context-providers/context-reference.md)
- [Data Reference](https://dev.wix.com/docs/site-extensions/context-providers/data-reference.md)