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.

referencescontext-providerEXAMPLES.md

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

Complete Example

Scaffold each provider with wix generate first (see the Quick Start Checklist); the examples show the finished files.

Counter with a goal-gated banner

From the request "Create a counter that counts how many times a button was clicked and show a congratulations banner only when the count reaches 10. Use context providers and native components, do not create an editor react component."

Every element here is a native Editor element, so every consumer is a binding-only consumer. count >= 10 cannot be evaluated at the binding, and neither can its negation — so the provider resolves both sides itself and exposes one ready-to-bind boolean per gated element. See Derived Values (Mandatory).

src/extensions/site/contexts/click-goal-context/click-goal-context.tsx:

import React, { createContext, useContext, useState } from 'react';
import type { BooleanValue, NumberType, Text } from '@wix/editor-react-types';

export interface ClickGoalContextType {
  count: NumberType;
  isCongratsBannerHidden: BooleanValue;
  isProgressHintHidden: BooleanValue;
  statusMessage: Text;
  increment: () => void;
}

export interface ClickGoalProviderProps {
  children?: React.ReactNode;
  goal: NumberType;
}

const ClickGoalContext = createContext<ClickGoalContextType | null>(null);
ClickGoalContext.displayName = 'ClickGoalContext';

export function useClickGoalContext(): ClickGoalContextType {
  const context = useContext(ClickGoalContext);
  if (!context) {
    throw new Error('useClickGoalContext must be used within a ClickGoalContextProvider');
  }
  return context;
}

export function ClickGoalContextProvider({
  children,
  goal,
}: ClickGoalProviderProps): React.ReactNode {
  const [count, setCount] = useState<NumberType>(0);
  const target = goal ?? 10;

  const increment = (): void => {
    setCount((current) => current + 1);
  };

  // Derived at render time from the state — never stored in a second state value.
  const hasReachedGoal = count >= target;
  const remaining = target - count;
  const statusMessage = hasReachedGoal
    ? 'Goal reached'
    : `${remaining} more ${remaining === 1 ? 'click' : 'clicks'} to go`;

  const api: ClickGoalContextType = {
    count,
    isCongratsBannerHidden: !hasReachedGoal, // hidden until goal is reached
    isProgressHintHidden: hasReachedGoal, // the complement, precomputed
    statusMessage,
    increment,
  };

  return (
    <ClickGoalContext.Provider value={api}>{children}</ClickGoalContext.Provider>
  );
}

ClickGoalContextProvider.displayName = 'ClickGoalContextProvider';
export default ClickGoalContextProvider;

context, data and contextSpecifier in src/extensions/site/contexts/click-goal-context/click-goal-context.extension.ts (the rest of the file is generated by wix generate):

context: {
  items: {
    count: {
      dataType: 'number',
      displayName: 'Click count',
      description: 'How many times the button has been clicked so far. Bind to a text element content.',
    },
    isCongratsBannerHidden: {
      dataType: 'booleanValue',
      displayName: 'Congratulations banner is hidden',
      description: 'True while the click count is below the goal. Bind to the congratulations banner hidden property.',
    },
    isProgressHintHidden: {
      dataType: 'booleanValue',
      displayName: 'Progress hint is hidden',
      description: 'True once the click count reaches the goal. Bind to the progress hint hidden property.',
    },
    statusMessage: {
      dataType: 'text',
      displayName: 'Status message',
      description: 'Reads how many clicks remain, or confirms the goal was reached. Bind to the progress hint content.',
    },
    increment: {
      dataType: 'function',
      displayName: 'Count one click',
      description: 'Adds one to the click count. Bind to the button click handler.',
      function: {
        parameters: [],
        async: false,
      },
    },
  },
},
data: {
  goal: {
    dataType: 'number',
    defaultValue: 10,
    deprecated: false,
    displayName: 'Goal',
  },
},
resources: {
  contextSpecifier: {
    hook: 'useClickGoalContext',
    moduleSpecifier: '<moduleSpecifierPrefix>click-goal-context',
  },
},

The site owner binds the Button's click handler to increment, the banner's hidden property to isCongratsBannerHidden, the hint's hidden property to isProgressHintHidden, and each text element's content to count or statusMessage — the platform converts both to rich text at the binding.

No consumer component and no contextDependencies exist for this section — the provider registration above is the entire implementation.

useClickGoalContext is still exported and contextSpecifier.hook still registered — those are manifest requirements, not a consumer wiring. That is the rule in The Provider's Shape Never Shrinks: "native elements only" constrains which consumers get written, never the provider's shape.

Note also that every bindable item carries a description naming what to bind it to; see The Manifest Is the Binding Contract.

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.