All skills
wix avatar

/wix-app

@dc6f1fa official
by Wix.comwix/skills33 stars
33

Build and review Wix CLI app extensions — dashboard pages, modals, plugins, menu plugins, custom element widgets, Editor React components, site plugins, embedded scripts, 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, checkout, shipping, tax, discount, SPI, CMS, schema, tracking, popup, 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

This session only. Nothing lands on disk.

referencesstoresGET_PRODUCT.md

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

Stores — Get Product

Get a single product

if (v === 'V3_CATALOG') {
  const product = await productsV3.getProduct(id);  // returns Product directly
  return product;
}
const { product } = await products.getProduct(id);  // V1 wraps in { product }
return product;

Read product options and choices (V1 vs V3)

V1 and V3 differ in both where choices live and what the choice fields are named. Getting this wrong causes TS2339 at validate time.

V1 V3
Options array on product product.productOptions product.options
Option name option.name option.name
Option type option.optionType ("color" / "drop_down") option.optionRenderType ("SWATCH_CHOICES" / "TEXT_CHOICES")
Choices array option.choices ← directly on the option option.choicesSettings?.choices ← nested
Choice display value choice.value choice.name
Choice color choice.value (hex string) choice.colorCode
if (v === 'V3_CATALOG') {
  const product = await productsV3.getProduct(id);
  for (const option of product.options ?? []) {
    const choices = option.choicesSettings?.choices ?? [];  // ✅ nested — NOT option.choices / option.optionValues (TS2339)
    for (const choice of choices) {
      render(option.name, choice.name, choice.colorCode);   // name = label; colorCode = hex for SWATCH_CHOICES
    }
  }
} else {
  const res = await products.getProduct(id);
  const product = res.product!;  // product is optional in the raw type; ! matches SDK's strict-mode guarantee
  for (const option of product.productOptions ?? []) {
    for (const choice of option.choices ?? []) {           // ✅ direct in V1
      render(option.name, choice.value);                   // value = label or hex string
    }
  }
}

In a site plugin on a product page: get productId from widget.getProp('product-id'), then call the appropriate version's getProduct — same pattern as above.


Modifiers (V1 manageVariants=false options)

In V3, options that don't create variants (V1 manageVariants=false) live on product.modifiers, not product.options. They use the identical choicesSettings.choices pattern. Reading only product.options silently misses these.

if (v === 'V3_CATALOG') {
  const product = await productsV3.getProduct(id);
  // variant-creating options
  for (const option of product.options ?? []) {
    for (const choice of option.choicesSettings?.choices ?? []) {
      render(option.name, choice.name, choice.colorCode);
    }
  }
  // display-only / free-text customizations (formerly manageVariants=false)
  for (const modifier of product.modifiers ?? []) {
    for (const choice of modifier.choicesSettings?.choices ?? []) {
      render(modifier.name, choice.name, choice.colorCode);
    }
  }
}

Variant choices (V1 object map → V3 array)

V1 variant.choices was a plain object map { "Size": "Small" }. V3 restructures it as an array — accessing it with a key returns undefined silently.

if (v === 'V3_CATALOG') {
  const product = await productsV3.getProduct(id);
  // variants are NOT returned by queryProducts — use getProduct or Read-Only Variants API
  for (const variant of product.variantsInfo?.variants ?? []) {
    for (const c of variant.choices ?? []) {
      render(c.optionChoiceNames?.optionName, c.optionChoiceNames?.choiceName);
    }
    // ❌ variant.choices['Size'] — always undefined in V3 (object map is gone)
  }
} else {
  const res = await products.getProduct(id);
  const product = res.product!;  // product is optional in the raw type; ! matches SDK's strict-mode guarantee
  for (const variant of product.variants ?? []) {
    // V1: choices is { [optionName]: value }
    render(Object.entries(variant.choices ?? {}).map(([k, v]) => `${k}:${v}`).join(', '));
  }
}

Source: SKILL.md on GitHub

1 warningtoday4 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    This skill is a specialized development toolkit for building extensions on the Wix platform. It provides comprehensive instructions for creating dashboard pages, backend APIs, and site plugins using the Wix CLI and SDKs. No malicious patterns were detected; the skill's behaviors, such as dependency management, command execution for builds, and local script execution for code reviews, are entirely consistent with its purpose as a developer productivity tool for the Wix ecosystem.

  • Sockettoday

    1 alert: gptAnomaly

  • Snyktoday

    Risk: LOW · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

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

Last checked against GitHub yesterday.

Activeupdated 2 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.