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.

referencesAPP_TOOLS.md

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

App Tools — Overview

App Tools lets your app expose custom tools that the Wix AI assistant can discover and invoke on behalf of site collaborators. It requires two extensions working together:

Extension What it does Reference
APP_TOOLS Declares your tools (names, descriptions, schemas) so the AI assistant knows they exist app-tools/TOOLS.md
TOOLS_PROVIDER_CONFIG The service plugin handler Wix calls at runtime when the AI assistant invokes a tool service-plugin/TOOLS_PROVIDER.md

How they connect

Developer declares tools in APP_TOOLS
        ↓
AI assistant reads declarations to understand available tools
        ↓
User interacts with Wix AI assistant
        ↓
AI assistant invokes your toolsProvider service plugin (runTool handler)
        ↓
Your handler routes on methodName, runs business logic, returns response
        ↓
AI assistant uses the response to answer the user

The methodName field is the linking key: it must match exactly between the APP_TOOLS declaration and the switch (or routing map) in your runTool handler.

Quick Start

Step 1: Scaffold both extensions via the CLI

Adding another tool to an existing setup? Skip this step. Add the new tool entry to your existing APP_TOOLS .extension.ts file and add a matching case to your existing runTool handler — no new extensions needed.

Run these two commands once — the CLI generates all files and updates src/extensions.ts automatically:

wix generate --params '{"extensionType":"APP_TOOLS","name":"my-tools"}'
wix generate --params '{"extensionType":"SERVICE_PLUGIN","pluginType":"TOOLS_PROVIDER_CONFIG","name":"my-tools-provider"}'

Step 2: Declare your tools (APP_TOOLS)

Open the generated src/extensions/backend/app-tools/my-tools/my-tools.extension.ts and replace the stub tool with your own. Read app-tools/TOOLS.md for the full field reference and constraints.

import { extensions } from '@wix/astro/builders';

export default extensions.appTools({
  id: '<generated-uuid>',
  name: 'my-tools',
  tools: [
    {
      methodName: 'get-order-status',
      displayName: 'Get Order Status',
      description: 'Returns the current fulfillment status, shipping carrier, and tracking number for a customer order. Use this tool when a collaborator or customer asks where their order is, whether it has shipped, when it will arrive, or needs a tracking number. Requires a valid orderId.',
      requestSchema: {
        type: 'object',
        properties: {
          orderId: { type: 'string' }
        },
        required: ['orderId']
      },
      responseSchema: {
        type: 'object',
        properties: {
          status: { type: 'string' }
        }
      },
      activated: true
    }
  ]
});

Step 3: Implement the runtime handler (TOOLS_PROVIDER_CONFIG)

Open the generated src/extensions/backend/service-plugins/my-tools-provider/my-tools-provider.ts and implement the runTool logic. Read service-plugin/TOOLS_PROVIDER.md for the full implementation guide.

import { toolsProvider } from '@wix/app-tools/service-plugins';

toolsProvider.provideHandlers({
  runTool: async ({ request, metadata }) => {
    const { methodName, payload } = request;

    switch (methodName) {
      case 'get-order-status': {
        const orderId = payload?.['orderId'];
        if (typeof orderId !== 'string' || !orderId) {
          throw new Error('orderId is required');
        }
        // your logic here
        return { response: { status: 'shipped' } };
      }
      default:
        throw new Error(`Unknown tool: ${methodName}`);
    }
  }
});

Writing Good Descriptions

The description field is the primary signal the AI assistant uses to decide whether your tool is relevant to a user's request. A one-liner like "Returns order status" works technically but limits relevance matching.

Write descriptions as a short prompt — 2–4 sentences covering:

  1. What it does — the action and data it returns.
  2. When to use it — the user intents or phrases that should trigger it (e.g. "where is my order", "has this shipped", "tracking number").
  3. Key inputs — mention required parameters so the AI knows what to ask for.
// narrow — easy to miss
'Returns order status.'

// wide — reliably matched
'Returns the current fulfillment status, shipping carrier, and tracking number for a customer order.
Use this tool when a collaborator or customer asks where their order is, whether it has shipped,
when it will arrive, or needs a tracking number. Requires a valid orderId.'

Checklist

  • Tool declarations filled in the generated .extension.ts (replace the stub myMethod)
  • Set activated: true on every tool you want the AI assistant to invoke (activated is optional and defaults to false if omitted — an omitted or false tool is declared but never called, with no build error to warn you)
  • runTool handler covers every methodName that has activated: true
  • Inputs validated defensively (schemas are advisory, not enforced by Wix)
  • Wix API calls wrapped with auth.elevate from @wix/essentials
  • App built (wix build) and released (wix release) — changes don't take effect until released

Important Notes

  • The requestSchema and responseSchema in APP_TOOLS are advisory — the AI assistant uses them for context. Wix does NOT validate the payload against the schema before calling your handler.
  • Only tools with activated: true are invoked by the AI assistant.
  • Both extensions must be registered and the app must be released before the feature is live.
  • The methodName must be unique within an APP_TOOLS extension (1–30 characters).

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.