wix-cli-context-provider
Wix Context Provider Builder
Creates production-quality context provider components for Wix CLI applications. Context providers are logical components (no UI) that can be added to any page, container, or section in the Editor. They expose shared state and functionality that child components consume via a React hook.
You MUST read CONTEXT_PROVIDER_SPEC.md before implementing a context provider. It contains the complete manifest structure, all data types, and type constraints.
Consumer Constraint
⚠️ Only site components (wix-cli-site-component) can consume context provider extensions. Site widgets, site plugins, and all other extension types are NOT supported as consumers.
⚠️ Consumer site components require valid manifests. When creating a site component to consume this context provider, you MUST follow the wix-cli-site-component skill, including its Hard Constraints.
Quick Start Checklist
Follow these steps in order when creating a context provider:
- Ask the user for the app's code identifier (
<codeIdentifier>) — this is configured in the Wix Dev Center and cannot be derived from the code. It is used as the namespace in thetypefield (e.g.,<codeIdentifier>.CounterContext) - Install
@wix/public-schemasas a devDependency - Install
@wix/services-manager-reactand@wix/services-definitionsif not already present
More from wix/skills
wds-docs
Wix Design System component reference. Use when building UI with @wix/design-system, choosing components, or checking props and examples. Triggers on "what component", "how do I make", "WDS", "show me props", or component names like Button, Card, Modal, Box, Text.
329wix-cli-dashboard-page
Use when building admin interfaces, management pages, CRUD operations, or dashboard configuration UIs. Triggers include dashboard, admin panel, data management, settings pages.
289wix-cli-embedded-script
Use when adding tracking code, advertising pixels, third-party integrations, popups, banners, or client-side JavaScript to sites. Triggers include embed, inject, script, third-party integration, DOM injection, Google Analytics, Facebook Pixel, tracking pixel, chat widget, popup, coupon popup, custom JavaScript, site script.
289wix-cli-dashboard-modal
Use when adding popup forms, confirmations, or detail views to Wix dashboards; creating reusable dialog components across dashboard pages; showing context-specific information in overlays; opening modals from dashboard pages; or passing data between dashboard pages and modals. Do NOT use for static content (use dashboard pages instead) or site-facing UI (use site widgets/embedded scripts).
289wix-cli-service-plugin
Use when implementing service plugin extensions that inject custom backend logic into existing Wix business solution flows or introduce new flows to Wix sites (eCommerce, Bookings, etc.). Triggers include SPI, service plugin, backend flow, business logic, custom shipping rates, additional fees, tax calculation, checkout validation, discount triggers, gift cards, eCommerce customization, bookings staff sorting.
289wix-cli-site-widget
Use when building interactive widgets, custom data displays, or configurable site components with settings panels. Triggers include widget, custom element, interactive component, editor component, configurable widget, web component.
289