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.

referencesdashboard-pageDASHBOARD_API_MEDIA_AND_PLUGINS.md

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

Dashboard API Reference: media and plugins

Part of the Dashboard API Reference.

openMediaManager()

Host Module '@wix/dashboard' 'openMediaManager()' opens the Wix Media Manager in a modal to let users pick media files. Developer Preview.

Method parameters:

  • options?: Options — Optional Media Manager options

Options:

  • category (string, optional): Media type to display. Supported: "IMAGE", "VIDEO", "MUSIC", "DOCUMENT", "VECTOR_ART", "3D_IMAGE". Default: all except "3D_IMAGE"
  • multiSelect (boolean, optional): Whether multiple files can be selected. Default: false

Returns: The published SDK reference declares Promise<{ items: Array<FileDescriptor> }>.

At the host boundary, handle the result defensively as { items: Array<FileDescriptor> } | null | undefined. Treat a missing result or empty items as dismissal and leave the draft unchanged. This guard is defensive handling, not a verified claim about the SDK's cancellation return value.

File descriptor: FileDescriptor is the full schema describing a Media Manager file, including IDs, timestamps, media-type, URLs, status, labels, and a media-specific payload.

Typical fields:

  • _id (string): File GUID
  • _createdDate (Date): Creation time
  • _updatedDate (Date): Last update time
  • displayName (string): File name as shown in Media Manager
  • mediaType (ARCHIVE | AUDIO | DOCUMENT | IMAGE | MODEL3D | OTHER | UNKNOWN | VECTOR | VIDEO): Media file type
  • url (string, optional): Static URL of the file when populated
  • thumbnailUrl (string): Thumbnail URL
  • sizeInBytes (string): File size in bytes
  • parentFolderId (string): ID of the file's parent folder.
  • siteId (string): Site GUID where the media is stored
  • private (boolean): Whether file is private
  • operationStatus (FAILED | READY | PENDING): Upload/processing status
  • state (DELETED | OK): File state
  • hash (string): File hash
  • labels (string[]): User/AI labels
  • sourceUrl (string): URL where the file was uploaded from.
  • media (object): One of the following variants with specific fields
    • archive: { _id: string; filename: string; sizeInBytes: string; url: string; urlExpirationDate: Date }
    • audio: { _id: string; assets: string[]; bitrate: number; duration: number; format: string; sizeInBytes: string }
    • document: string
    • image: { caption: string; colors: { palette: Array<{ hex: string; rgb: { r: number; g: number; b: number } }>; prominent: { hex: string; rgb: { r: number; g: number; b: number } }; }; faces: Array<{ confidence: number; height: number; width: number; x: number; y: number }>; image: string; previewImage: string; }
    • model3d: { _id: string; altText: string; filename: string; sizeInBytes: string; thumbnail: string; url: string; urlExpirationDate: Date }
    • vector: { caption: string; colors: { palette: Array<{ hex: string; rgb: { r: number; g: number; b: number } }>; prominent: { hex: string; rgb: { r: number; g: number; b: number } }; }; faces: Array<{ confidence: number; height: number; width: number; x: number; y: number }>; image: string; previewImage: string; }
    • video: string

Image selection: Read the documented nested image URI from media.image.image, with url as a fallback. The string branch below defensively accepts an adapter returning a direct image value; it is not an additional guarantee of the published SDK contract. Check the installed host callback's types when integrating a different adapter.

import { dashboard } from '@wix/dashboard';

export async function pickImage() {
  const selection = await dashboard.openMediaManager({
    category: 'IMAGE',
    multiSelect: false,
  });
  const file = selection?.items?.[0];
  if (!file) return undefined;

  const image: unknown = file.media?.image;
  const nested = image && typeof image === 'object' && 'image' in image
    ? image.image
    : undefined;
  const source = typeof image === 'string' ? image
    : typeof nested === 'string' ? nested : file.url;
  return source ? { file, source } : undefined;
}

Keep file for its identity and metadata and source for the image value. Update the draft only when this helper returns a selection. The entity save lifecycle is in IMAGE_EDITING.md.

addSitePlugin()

Host Module '@wix/dashboard' 'addSitePlugin()' adds a site plugin to one of the slots supported in an app created by Wix. You can target a specific slot or rely on prioritized slots configured in your app's dashboard.

Notes:

  • Developer Preview. API is subject to change.
  • Requires a site plugin extension to be configured first.

Method parameters:

  • pluginId: string — ID of your site plugin (from the extension's settings in your app's dashboard)
  • options: addSitePluginOptions — Options for adding the site plugin

Add site plugin options:

  • placement?: PluginPlacement — Details of the slot to add the plugin to. If omitted, the plugin is added to the first available slot based on your installation settings. If all prioritized slots are occupied, it won't be added

Plugin placement:

  • appDefinitionId: string — ID of the Wix app hosting the widget and slot (see list of apps created by Wix)
  • widgetId: string — ID of the host widget in which the slot exists
  • slotId: string — ID of the slot in the host widget

Returns: Resolves on success. See Errors for possible rejection reasons Promise<void>

Errors:

  • 3001: Slot occupied
  • 3002: Slot not found
  • 3003: Error adding plugin
  • 3004: Error replacing existing plugin
  • 3005: Error loading modal data
  • 3006: Aborted by user
  • 3007: Site not published yet

Example:

import { dashboard } from '@wix/dashboard';

// Add a site plugin to a specific slot
const pluginId = "975bffb7-3c04-42cc-9840-3d48c24e73d5";
const pluginPlacement = {
  appDefinitionId: "13d21c63-b5ec-5912-8397-c3a5ddb27a97",
  widgetId: "a91a0543-d4bd-4e6b-b315-9410aa27bcde",
  slotId: "slot1",
};

dashboard
  .addSitePlugin(pluginId, { placement: pluginPlacement })
  .then(() => {
    console.log("Plugin added successfully");
  })
  .catch((error) => {
    console.error("Error adding plugin:", error);
  });

// Add a site plugin without specifying a slot (uses prioritized slots)
const pluginId = "975bffb7-3c04-42cc-9840-3d48c24e73d5";

dashboard
  .addSitePlugin(pluginId, {})
  .then(() => {
    console.log("Plugin added successfully");
  })
  .catch((error) => {
    console.error("Error adding plugin:", error);
  });

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.