Index of every page on this site: llms.txt
All skills
wix avatar

/wix-app

@e2bc48e official
by Wix.comwix/skills40 stars
42
Run it yourself

Build and review Wix CLI app extensions — dashboard pages, modals, plugins, menu plugins, custom element widgets, Editor React components, site plugins, embedded scripts, context providers, function libraries, lightbox (popup) behavior, page onLoad contexts, backend APIs, backend events, service plugins, data collections, and App Market readiness. Use when building ANY feature or extension for a Wix CLI app or preparing a Wix app for App Market review. Triggers on: add, build, create, implement, help me, dashboard, widget, plugin, backend, API, event, collection, embedded script, service plugin, Editor React component, context provider, function library, onLoad, on page load, checkout, shipping, tax, discount, SPI, CMS, schema, tracking, popup, lightbox, admin panel, menu item, modal, validate, test, verify, register extension, App Market, app review, submission readiness.

Use this Skill: https://skilld.dev/gh/wix/skills/wix-app

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencespage-on-loadEXAMPLES.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Page onLoad Examples

Use this table to choose documented Wix SDK imports and methods for the requested page onLoad behavior. Do not add SDK imports or method names that are not documented here or already present in the user's project.

All references assume the provider shape from PROVIDER.md: side-effect logic inside useEffect(() => { ... }, []) and no exposed API. That sample is written for one example task (UtmCapture) — substitute the task-derived name (see Naming) for the actual component/hook/type.

⚠️ Runtime support — NEVER use the @wix/site-* packages. The @wix/site package (analytics) works and is the only @wix/* site module you should import here. The separate @wix/site-* frontend modules — @wix/site-window, @wix/site-location, @wix/site-seo — throw Wix Site SDK only works in a Wix site environment in the Studio 2 runtime, even when the provider is correctly bound to the page and the onLoad effect is firing. That error from a firing provider is the signature of an unsupported runtime, not a binding bug. Use @wix/site analytics plus browser-native APIs (window.location.search, navigator.language) — read browser globals inside the useEffect (never at module scope), defensively guarded with if (typeof window !== 'undefined').

These calls are SDK frontend modules, not Velo-only APIs. Setting SEO tags is out of scope for page onLoad — there is no portable client-side path and a client effect can't reliably reach crawlers; set SEO server-side instead (router response.data / the page's SEO settings).

Documented imports

User request Imports Methods to use (portable default) Notes
Send a BI / analytics event when the page renders import { analytics } from '@wix/site'; analytics.trackEvent(...); read the visitor locale from the global navigator.language analytics.trackEvent() reports standard or custom analytics events to connected tools, and works in all runtimes. navigator.language is the locale source. To gate the event out of Studio/editor preview, use project-specific logic — do not reach for @wix/site-window viewMode() (it throws at runtime).
Capture utm_source, utm_medium, utm_campaign, or other URL campaign params import { analytics } from '@wix/site'; when reporting to connected analytics tools new URLSearchParams(window.location.search) → params.get('utm_source') etc.; analytics.trackEvent(...) Reading UTM params from the global window.location.search needs no @wix/site-location and works in all runtimes. Preview URLs may include extra Editor query params; filter for the requested campaign keys. Use project BI code instead of analytics.trackEvent() if the project already has a BI client.
Record an experiment or A/B exposure before interaction import { analytics } from '@wix/site'; when reporting the exposure to connected analytics tools analytics.trackEvent(...) analytics.trackEvent() is the documented module for reporting the exposure once you know the variant. There is no documented Wix SDK frontend module for assigning / bucketing the A/B variant itself — use the project's real experiment/bucketing API for that, and do not invent getBucketing() or similar helper names.

Never import @wix/site-window, @wix/site-location, or @wix/site-seo. They throw Wix Site SDK only works in a Wix site environment in the runtime Wix CLI apps run in, so there is no case in this skill where they are the right choice. Use @wix/site analytics and browser-native APIs only.

Typing analytics.trackEvent data

A custom event's data is typed TrackingParametersCustomEvent: only eventCategory, eventAction, eventLabel, eventValue and a literal "*" key are known. Free-form keys such as utm_source fail tsc (TS2353) when written inline in the call. Build the data as a variable that carries the typed fields, then pass it:

const eventData = {
  eventCategory: 'campaign',
  eventAction: 'campaign_attribution',
  utm_source: params.get('utm_source') ?? '',
  utm_medium: params.get('utm_medium') ?? '',
  utm_campaign: params.get('utm_campaign') ?? '',
};
analytics.trackEvent('campaign_attribution', eventData);

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

2 warningstoday4 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    This skill provides a comprehensive environment and set of tools for building Wix CLI app extensions. It includes detailed instructions, API references, and local utility scripts for development tasks like SDK lookup and accessibility auditing. All operations and dependencies are standard for the Wix developer platform.

  • Sockettoday

    1 alert: gptAnomaly

  • Snyktoday

    Risk: MEDIUM · 1 issue

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e2bc48e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 6 days ago
compatibility
requires `@wix/cli` >= 1.1.192.

README badge

README badge for wix/skills/wix-app

Builds dashboard pages, modals, plugins, custom widgets, Editor React components, backend APIs, events, service plugins, and data collections for Wix CLI apps. Provides decision logic, API patterns, and validation workflows; scaffolding is owned by the Wix CLI via `wix generate --params`.

Generated from the current SKILL.md.

What extension types does this skill cover?
All Wix CLI app extension types: dashboard pages, modals, plugins, menu plugins, custom element widgets, Editor React components, site plugins, embedded scripts, backend APIs, backend events, service plugins, and data collections.
Does this skill scaffold the extension files for me?
The Wix CLI owns scaffolding via `wix generate --params` for all extension types except Backend API. This skill provides decision logic, API guidance, and business-logic patterns to fill in the generated stubs. Backend API files must be created manually.
What Wix CLI version is required?
The skill requires @wix/cli >= 1.1.192.
Do I need to create a Data Collection extension for app-specific data?
Yes, if you're saving or persisting app-specific data, managing domain entities in a dashboard, or running a service plugin that reads app-configured data. The skill infers this automatically—you don't need to explicitly request it.
Does this skill cover Wix Stores API usage?
Yes. When using any Wix Stores API (products, inventory, orders), the skill requires dual V1/V3 catalog support and references the Stores Versioning guide for module selection and field mapping.

Generated from the current SKILL.md. These answers refresh after source changes.