wix-cli-data-collection

Creates CMS data collection schemas for Wix CLI apps using TypeScript extension definitions.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/nirganon/nir-beauty --skill wix-cli-data-collection-nirganon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wix-cli-data-collection
Source: https://github.com/nirganon/nir-beauty/tree/main/.agents/skills/wix-cli-data-collection
Command: npx skills add https://github.com/nirganon/nir-beauty --skill wix-cli-data-collection-nirganon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @wix/astro, 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 API calls. This Skill generates correct data collection extensions so apps can store and query structured data reliably. ## Core Features & Use Cases - Collection Schema Generation: Defines collections in src/extensions/data/extensions.ts with fields, types, display names, and initial seed data using extensions.genericExtension(). - Permission Configuration: Applies context-based access rules (ANYONE, SITE_MEMBER, CMS_EDITOR, PRIVILEGED) matched to where data is read or written, such as site widgets versus dashboard pages. - Relationship Modeling: Creates REFERENCE and MULTI_REFERENCE fields linking custom collections while enforcing constraints against referencing Wix business entities. - Use Case: When building a Wix app with a reviews widget, generate a reviews collection with public read access, member insert permissions, and a reference to a custom products collection. ## 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 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, plus a static UUID as compId.

What permissions should a Wix collection have for a site widget?

Collections read by site widgets need `itemRead: ANYONE` because widgets serve public visitors. If visitors submit data, set `itemInsert` to ANYONE or SITE_MEMBER, while dashboard-managed updates can stay at CMS_EDITOR.

Can Wix data collections reference Wix Products or Contacts?

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

Why does my OBJECT field get rejected in a Wix collection?

OBJECT fields require the `objectOptions` property or the API rejects them. Use an empty object `{}` for unstructured data, or define nested fields inside `objectOptions.fields` for structured schemas.

When should I use embedded script parameters instead of CMS collections?

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