wix-cli-data-collection

Creates CMS data collection schemas for Wix CLI apps using the data collections extension.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/yaelbro/Shelf-Control --skill wix-cli-data-collection-yaelbro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wix-cli-data-collection
Source: https://github.com/yaelbro/Shelf-Control/tree/main/.agents/skills/wix-cli-data-collection
Command: npx skills add https://github.com/yaelbro/Shelf-Control --skill wix-cli-data-collection-yaelbro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @wix/astro/builders, and includes assets (resource) components.

What problem does it solve? Defining structured data storage for Wix CLI apps requires precise collection schemas, permission rules, and namespace handling, and mistakes cause runtime failures or rejected extensions. This Skill generates correct CMS data collection definitions in src/extensions/data/extensions.ts. ## Core Features & Use Cases - Collection Schema Generation: Defines collections with idSuffix, display names, field types (TEXT, NUMBER, REFERENCE, OBJECT, and more), and initial seed data. - Context-Based Permissions: Sets read/write access levels (ANYONE, SITE_MEMBER, CMS_EDITOR, PRIVILEGED) based on where data is consumed, such as site widgets versus dashboard pages. - Relationship Modeling: Creates one-to-one and many-to-many links between custom collections using REFERENCE and MULTI_REFERENCE fields. - Use Case: When building a Wix app with a reviews widget, generate a reviews collection readable by any visitor, writable by members, and moderated from a dashboard page. ## Quick Start Ask the AI to create a Wix data collection for products with fields for title, price, and category, including appropriate permissions for a public site widget.

Frequently Asked Questions about wix-cli-data-collection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a CMS data collection in a Wix CLI app?

Define collections in src/extensions/data/extensions.ts using extensions.genericExtension() from @wix/astro/builders with compType DATA_COMPONENT. Each collection needs an idSuffix, displayName, fields array, and dataPermissions, then register the extension in src/extensions.ts.

What field types are available for Wix data collections?

Wix collections support TEXT, RICH_TEXT, NUMBER, BOOLEAN, DATE, DATETIME, IMAGE, VIDEO, REFERENCE, MULTI_REFERENCE, OBJECT, ARRAY, URL, and more. OBJECT fields require an objectOptions property, and REFERENCE fields can only link to other custom collections in the same app.

How do Wix collection permissions work with site widgets?

Permissions must match the least restrictive access context. If a public site widget reads a collection, itemRead must be ANYONE, otherwise visitors see empty results. Dashboard-only collections can use CMS_EDITOR or PRIVILEGED for all operations.

Can Wix data collections reference Wix business entities like Products or Contacts?

No, REFERENCE and MULTI_REFERENCE fields can only link to other custom CMS collections defined in the same app using their idSuffix. To access Wix business entities like Products, Orders, or Members, use the Wix SDK APIs instead.

When should I use embedded script parameters instead of a CMS collection?

Use embedded script parameters for any configuration controlling how a script behaves or appears, such as colors, headlines, toggles, or thresholds. CMS collections are only for business data, user-generated content, or multi-record relational data, never configuration.

Why is my Wix collection data not updating after schema changes?

Collection changes require releasing a new major app version, and updates only apply to users who upgrade. Changes take up to 5 minutes to propagate, and initialData is ignored for collections that already contain data.