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.

referencesservice-pluginBOOKING-POLICY.md

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

Booking Policy Service Plugin Reference

Overview

The Booking Policy SPI lets you provide dynamic booking policies instead of a service's single static policy. Wix calls your listBookingPolicies handler whenever it needs to know how early/late a service can be booked or whether online booking is allowed — for example, when a customer loads the booking calendar or books a service. Your implementation can return a different policy for the same service based on your own criteria (e.g., customer type, time of year).

Request and Response Schema

Before implementing, call ReadFullDocsMethodSchema on the docs URL to get the full request/response types.

Handler Docs URL
listBookingPolicies https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/booking-policy-service-plugin/list-booking-policies?apiView=SDK

The request's serviceIds array has 1–8 service GUIDs. Your response's bookingPolicies array must contain exactly one policy per requested service, in the same order — all fields are required unless the schema marks them optional.

Example: Different Early-Booking Windows by Service Category

import { bookingPolicy } from "@wix/bookings/service-plugins";
import { auth } from "@wix/essentials";
import { services } from "@wix/bookings";

bookingPolicy.provideHandlers({
  listBookingPolicies: async (payload) => {
    const { request } = payload;
    const { serviceIds } = request;

    // queryServices is a fluent query builder, not a request-object call — it returns { items }, not { services }.
    const elevatedQueryServices = auth.elevate(services.queryServices);
    const { items: matchedServices } = await elevatedQueryServices().in('_id', serviceIds).find();
    const serviceById = new Map((matchedServices ?? []).map((s) => [s._id, s]));

    const bookingPolicies = serviceIds.map((serviceId) => {
      const isPremium = serviceById.get(serviceId)?.category?.name === "Premium";

      return {
        serviceId,
        limitEarlyBooking: {
          enabled: true,
          earliestBookingInMinutes: isPremium ? 20160 : 10080, // 14 vs 7 days
        },
        limitLateBooking: {
          enabled: true,
          latestBookingInMinutes: 1440, // 1 day
        },
        onlineBooking: { enabled: true },
      };
    });

    return { bookingPolicies };
  },
});

Manual Setup Required

None. Confirmed the overall availability/policy pipeline this plugin feeds into is live and enforcing real constraints (a dashboard booking attempt was correctly rejected for being outside staff working hours) — this SPI's own specific early/late-booking window differentiation wasn't isolated independently of that pipeline, but no dashboard configuration is needed beyond having the app installed and released.

Key Implementation Notes

  1. One policy per service, same order — the response array must line up positionally with the request's serviceIds; don't omit or reorder entries.
  2. All fields required unless marked optional — return limitEarlyBooking, limitLateBooking, and onlineBooking fully populated rather than partially.
  3. Called on the hot path — this handler runs whenever availability is queried or a booking is made, so keep it fast and avoid unnecessary external calls.
  4. Elevate permissions — use auth.elevate when querying Wix APIs (e.g., service details) from the handler.

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 yesterday
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.