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.

referencesfunction-libraryEXAMPLES.md

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

Complete Examples

Basic Function Library

A string utilities library with sync, async, parameterized, and void functions.

src/extensions/site/function-libraries/string-utils/string-utils.ts:

import type { Text, NumberType, WebUrl } from '@wix/editor-react-types';

export function capitalize(text: Text): Text {
  return text.charAt(0).toUpperCase() + text.slice(1).toLowerCase();
}

export function truncate(text: Text, maxLength: NumberType = 50): Text {
  if (text.length <= maxLength) {
    return text;
  }
  return text.slice(0, maxLength - 3) + '...';
}

export async function fetchText(url: WebUrl): Promise<Text> {
  const response = await fetch(url);
  return await response.text();
}

export function logMessage(message: Text): void {
  console.log(`[app] ${message}`);
}

functions map in src/extensions/site/function-libraries/string-utils/string-utils.extension.ts (the rest of the file is generated by wix generate):

functions: {
  capitalize: {
    parameters: [
      {
        dataType: 'text',
        displayName: 'Text',
        description: 'The text to capitalize',
      },
    ],
    returns: {
      dataType: 'text',
    },
    async: false,
    displayName: 'Capitalize',
    description: 'Capitalizes the first letter and lowercases the rest',
  },
  truncate: {
    parameters: [
      {
        dataType: 'text',
        displayName: 'Text',
        description: 'The text to truncate',
      },
      {
        dataType: 'number',
        displayName: 'Max Length',
        description: 'Maximum number of characters',
        optional: true,
        defaultValue: 50,
      },
    ],
    returns: {
      dataType: 'text',
    },
    async: false,
    displayName: 'Truncate',
    description: 'Truncates text to a maximum length with ellipsis',
  },
  fetchText: {
    parameters: [
      {
        dataType: 'webUrl',
        displayName: 'URL',
        description: 'The URL to fetch text from',
      },
    ],
    returns: {
      dataType: 'text',
    },
    async: true,
    displayName: 'Fetch Text',
    description: 'Fetches text content from a URL',
  },
  logMessage: {
    parameters: [
      {
        dataType: 'text',
        displayName: 'Message',
        description: 'The message to log',
      },
    ],
    async: false,
    displayName: 'Log Message',
    description: 'Logs a message to the console',
  },
},

Complex Parameters

A product utilities library demonstrating complex object params, array params, textEnum, and optional parameters with defaults.

src/extensions/site/function-libraries/product-utils/product-utils.ts:

import type { Text, NumberType } from '@wix/editor-react-types';

interface Product {
  name: Text;
  price: NumberType;
  quantity: NumberType;
}

export function calculateTotal(products: Product[]): NumberType {
  return products.reduce((total, product) => {
    return total + product.price * product.quantity;
  }, 0);
}

export function formatPrice(
  amount: NumberType,
  currency: 'USD' | 'EUR' | 'GBP' = 'USD',
): Text {
  const symbols: Record<string, string> = { USD: '$', EUR: '€', GBP: '£' };
  return `${symbols[currency]}${amount.toFixed(2)}`;
}

export function formatUser(user: { firstName: Text; lastName: Text; age: NumberType }): Text {
  return `${user.firstName} ${user.lastName} (${user.age})`;
}

functions map in src/extensions/site/function-libraries/product-utils/product-utils.extension.ts (the rest of the file is generated by wix generate):

functions: {
  calculateTotal: {
    parameters: [
      {
        dataType: 'arrayItems',
        displayName: 'Products',
        description: 'List of products to total',
        arrayItems: {
          item: {
            dataType: 'data',
            data: {
              items: {
                name: {
                  dataType: 'text',
                  displayName: 'Product Name',
                },
                price: {
                  dataType: 'number',
                  displayName: 'Price',
                },
                quantity: {
                  dataType: 'number',
                  displayName: 'Quantity',
                },
              },
            },
          },
        },
      },
    ],
    returns: {
      dataType: 'number',
      displayName: 'Total',
    },
    async: false,
    displayName: 'Calculate Total',
    description: 'Calculates the total price for a list of products',
  },
  formatPrice: {
    parameters: [
      {
        dataType: 'number',
        displayName: 'Amount',
        description: 'The numeric amount to format',
      },
      {
        dataType: 'textEnum',
        displayName: 'Currency',
        description: 'The currency symbol to use',
        optional: true,
        defaultValue: 'USD',
        textEnum: {
          options: [
            { value: 'USD', displayName: 'US Dollar' },
            { value: 'EUR', displayName: 'Euro' },
            { value: 'GBP', displayName: 'British Pound' },
          ],
        },
      },
    ],
    returns: {
      dataType: 'text',
    },
    async: false,
    displayName: 'Format Price',
    description: 'Formats a number as a currency string',
  },
  formatUser: {
    parameters: [
      {
        dataType: 'data',
        displayName: 'User Data',
        description: 'The user object to format',
        data: {
          items: {
            firstName: {
              dataType: 'text',
              displayName: 'First Name',
            },
            lastName: {
              dataType: 'text',
              displayName: 'Last Name',
            },
            age: {
              dataType: 'number',
              displayName: 'Age',
            },
          },
        },
      },
    ],
    returns: {
      dataType: 'text',
    },
    async: false,
    displayName: 'Format User',
    description: 'Formats a user object as a display string',
  },
},

DOM Event Handlers

An interaction handlers library demonstrating DOM event parameters.

src/extensions/site/function-libraries/interaction-handlers/interaction-handlers.ts:

import type { Text } from '@wix/editor-react-types';

export function handleClick(event: PointerEvent): void {
  console.log(`Clicked at (${event.clientX}, ${event.clientY})`);
}

export function handleKeyPress(event: KeyboardEvent): Text {
  return event.key;
}

export function onSearchChange(event: Event): Text {
  return (event.target as HTMLInputElement).value;
}

export function onToggleChange(event: Event): boolean {
  return (event.target as HTMLInputElement).checked;
}

functions map in src/extensions/site/function-libraries/interaction-handlers/interaction-handlers.extension.ts (the rest of the file is generated by wix generate):

functions: {
  handleClick: {
    parameters: [
      {
        domEvent: 'POINTER',
        displayName: 'Click Event',
      },
    ],
    async: false,
    displayName: 'Handle Click',
    description: 'Handles pointer click events',
  },
  handleKeyPress: {
    parameters: [
      {
        domEvent: 'KEYBOARD',
        displayName: 'Key Event',
      },
    ],
    returns: {
      dataType: 'text',
      displayName: 'Key Pressed',
    },
    async: false,
    displayName: 'Handle Key Press',
    description: 'Returns the key that was pressed',
  },
  onSearchChange: {
    parameters: [
      {
        domEvent: 'CHANGE',
        changeEvent: { inputType: 'text' },
        displayName: 'Search Input Change',
      },
    ],
    returns: {
      dataType: 'text',
      displayName: 'Search Value',
    },
    async: false,
    displayName: 'On Search Change',
    description: 'Handles text input change and returns the current value',
  },
  onToggleChange: {
    parameters: [
      {
        domEvent: 'CHANGE',
        changeEvent: { inputType: 'checkbox' },
        displayName: 'Toggle Change',
      },
    ],
    returns: {
      dataType: 'booleanValue',
      displayName: 'Toggle State',
    },
    async: false,
    displayName: 'On Toggle Change',
    description: 'Handles checkbox toggle and returns the checked state',
  },
},

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.