@wix/agent-skills 1.13.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/package.json +1 -1
- package/skills/README.md +23 -0
- package/skills/wix-app/SKILL.md +10 -2
- package/skills/wix-app/references/AUTO_PATTERNS_DASHBOARD.md +326 -0
- package/skills/wix-app/references/CODE_QUALITY.md +1 -0
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +124 -115
- package/skills/wix-app/references/DASHBOARD_PAGE.md +3 -0
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +23 -9
- package/skills/wix-app/references/SITE_PLUGIN.md +1 -1
- package/skills/wix-app/references/auto-patterns-dashboard/action-cell.md +115 -0
- package/skills/wix-app/references/auto-patterns-dashboard/app-config-structure.md +264 -0
- package/skills/wix-app/references/auto-patterns-dashboard/app-context.md +37 -0
- package/skills/wix-app/references/auto-patterns-dashboard/bulk-actions.md +86 -0
- package/skills/wix-app/references/auto-patterns-dashboard/collection-page-actions.md +119 -0
- package/skills/wix-app/references/auto-patterns-dashboard/collection-page.md +103 -0
- package/skills/wix-app/references/auto-patterns-dashboard/custom-actions-override.md +76 -0
- package/skills/wix-app/references/auto-patterns-dashboard/custom-columns-override.md +82 -0
- package/skills/wix-app/references/auto-patterns-dashboard/custom-components-override.md +89 -0
- package/skills/wix-app/references/auto-patterns-dashboard/custom-header-override.md +124 -0
- package/skills/wix-app/references/auto-patterns-dashboard/custom-sections-override.md +91 -0
- package/skills/wix-app/references/auto-patterns-dashboard/custom-slots-override.md +71 -0
- package/skills/wix-app/references/auto-patterns-dashboard/entity-page-actions.md +70 -0
- package/skills/wix-app/references/auto-patterns-dashboard/entity-page-view-actions.md +73 -0
- package/skills/wix-app/references/auto-patterns-dashboard/entity-page.md +98 -0
- package/skills/wix-app/references/auto-patterns-dashboard/example-patterns.json +278 -0
- package/skills/wix-app/references/auto-patterns-dashboard/pages-configuration.md +94 -0
- package/skills/wix-app/references/auto-patterns-dashboard/resolved-action.md +43 -0
- package/skills/wix-app/references/auto-patterns-dashboard/sdk-utilities.md +66 -0
- package/skills/wix-app/references/auto-patterns-dashboard/views.md +76 -0
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +1 -14
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +54 -29
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +2 -2
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +17 -105
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +127 -0
- package/skills/wix-app/references/editor-react-component/PARTS.md +2 -1
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +15 -15
- package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +25 -53
- package/skills/wix-app/scripts/generate-auto-patterns.js +510 -0
- package/skills/wix-auth/SKILL.md +12 -0
- package/skills/wix-auth/references/device-flow.md +140 -0
- package/skills/wix-docs/SKILL.md +188 -0
- package/skills/wix-docs/references/API_SPEC_SEARCH.md +213 -0
- package/skills/wix-docs/references/EXTRACTING.md +120 -0
- package/skills/wix-headless/SKILL.md +84 -130
- package/skills/wix-headless/entry/bootstrap.mjs +93 -0
- package/skills/wix-headless/entry/skill.md +78 -0
- package/skills/wix-headless/references/AI_FEATURES.md +178 -0
- package/skills/wix-headless/references/CAPABILITIES.md +84 -0
- package/skills/wix-headless/references/DISCOVERY.md +34 -56
- package/skills/wix-headless/references/DOC_DISCOVERY.md +37 -0
- package/skills/wix-headless/references/FEEDBACK.md +118 -0
- package/skills/wix-headless/references/IMAGE_GENERATION.md +69 -0
- package/skills/wix-headless/references/SDK_HANDOFF.md +97 -0
- package/skills/wix-headless/references/SEED.md +44 -188
- package/skills/wix-headless/references/SETUP.md +32 -103
- package/skills/wix-headless/references/astro.md +98 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-blog.md +196 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +236 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-bookings.md +279 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-cms.md +163 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-events.md +203 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +222 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +124 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-custom-login.md +160 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-non-astro.md +118 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-portfolio.md +132 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +124 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +188 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +173 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurants.md +161 -0
- package/skills/wix-headless/references/inline-recipes/setup-blog.md +175 -0
- package/skills/wix-headless/references/inline-recipes/setup-bookings.md +228 -0
- package/skills/wix-headless/references/inline-recipes/setup-cms.md +200 -0
- package/skills/wix-headless/references/inline-recipes/setup-events.md +196 -0
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +174 -0
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +176 -0
- package/skills/wix-headless/references/inline-recipes/setup-portfolio.md +153 -0
- package/skills/wix-headless/references/inline-recipes/setup-pricing-plans.md +229 -0
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-orders.md +161 -0
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-reservations.md +117 -0
- package/skills/wix-headless/references/inline-recipes/setup-restaurants.md +152 -0
- package/skills/wix-headless/references/managed/AUTHENTICATION.md +57 -0
- package/skills/wix-headless/references/managed/CONNECT.md +74 -0
- package/skills/wix-headless/references/managed/CREATE.md +130 -0
- package/skills/wix-headless/references/managed/DEPLOYMENT.md +57 -0
- package/skills/wix-headless/references/non-astro.md +59 -0
- package/skills/wix-headless/references/self-managed/AUTHENTICATION.md +22 -0
- package/skills/wix-headless/references/self-managed/DEPLOYMENT.md +7 -0
- package/skills/wix-headless/references/stripe/AUTHENTICATION.md +55 -0
- package/skills/wix-headless/references/stripe/DEPLOYMENT.md +63 -0
- package/skills/wix-manage/SKILL.md +24 -1
- package/skills/wix-manage/references/analytics/query-site-analytics.md +241 -0
- package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +1 -1
- package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +265 -0
- package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +436 -0
- package/skills/wix-manage/references/marketing/generate-and-publish-marketing-plan.md +209 -0
- package/skills/wix-manage/references/rich-content/author-ricos-rich-content.md +249 -0
- package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +51 -0
- package/skills/wix-vibe-headless/SKILL.md +136 -0
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +128 -0
- package/skills/wix-vibe-headless/references/blog/wix-blog.js +217 -0
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +153 -0
- package/skills/wix-vibe-headless/references/bookings/wix-bookings-checkout.js +147 -0
- package/skills/wix-vibe-headless/references/bookings/wix-bookings-services.js +215 -0
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +154 -0
- package/skills/wix-vibe-headless/references/cms/wix-cms.js +186 -0
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +142 -0
- package/skills/wix-vibe-headless/references/events/wix-events-browse.js +135 -0
- package/skills/wix-vibe-headless/references/events/wix-events-registration.js +187 -0
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +211 -0
- package/skills/wix-vibe-headless/references/members/wix-members-auth.js +387 -0
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +111 -0
- package/skills/wix-vibe-headless/references/portfolio/wix-portfolio.js +194 -0
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +127 -0
- package/skills/wix-vibe-headless/references/pricing-plans/wix-pricing-plans.js +157 -0
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +138 -0
- package/skills/wix-vibe-headless/references/restaurants/wix-restaurants-menu.js +224 -0
- package/skills/wix-vibe-headless/references/restaurants/wix-restaurants-ordering.js +156 -0
- package/skills/wix-vibe-headless/references/restaurants/wix-restaurants-reservations.js +107 -0
- package/skills/wix-vibe-headless/references/shared/wix-client.js +186 -0
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +155 -0
- package/skills/wix-vibe-headless/references/storefront/wix-store-cart.js +147 -0
- package/skills/wix-vibe-headless/references/storefront/wix-store-catalog.js +142 -0
- package/skills/wix-headless/references/BUILD-astro.md +0 -244
- package/skills/wix-headless/references/BUILD-own-build.md +0 -167
- package/skills/wix-headless/references/BUILD.md +0 -105
- package/skills/wix-headless/references/DESIGN_SYSTEM.md +0 -165
- package/skills/wix-headless/references/DISCOVERY-connect.md +0 -55
- package/skills/wix-headless/references/DISCOVERY-create.md +0 -238
- package/skills/wix-headless/references/PLAN-connect.md +0 -19
- package/skills/wix-headless/references/PLAN-create.md +0 -17
- package/skills/wix-headless/references/PLAN.md +0 -92
- package/skills/wix-headless/references/astro/blog/BLOG_PAGES.md +0 -300
- package/skills/wix-headless/references/astro/blog/BLOG_SETUP.md +0 -218
- package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +0 -45
- package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +0 -77
- package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +0 -214
- package/skills/wix-headless/references/astro/cms/FAQ_KNOWLEDGE_BASE.md +0 -231
- package/skills/wix-headless/references/astro/cms/PORTFOLIO.md +0 -453
- package/skills/wix-headless/references/astro/cms/RESOURCE_LIBRARY.md +0 -354
- package/skills/wix-headless/references/astro/cms/TEAM_DIRECTORY.md +0 -299
- package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +0 -351
- package/skills/wix-headless/references/astro/ecom/CART_PAGES.md +0 -119
- package/skills/wix-headless/references/astro/ecom/CART_WIRING.md +0 -103
- package/skills/wix-headless/references/astro/ecom/COMPONENTS_CSS.md +0 -132
- package/skills/wix-headless/references/astro/forms/CONTACT_FORM.md +0 -463
- package/skills/wix-headless/references/astro/gift-cards/COMPONENTS.md +0 -119
- package/skills/wix-headless/references/astro/gift-cards/PAGES.md +0 -129
- package/skills/wix-headless/references/astro/stores/BACK_IN_STOCK.md +0 -178
- package/skills/wix-headless/references/astro/stores/CATEGORY_PAGES.md +0 -85
- package/skills/wix-headless/references/astro/stores/COMPONENTS_CSS.md +0 -129
- package/skills/wix-headless/references/astro/stores/HOME_AND_NAV.md +0 -229
- package/skills/wix-headless/references/astro/stores/PRODUCT_PAGES.md +0 -215
- package/skills/wix-headless/references/astro/stores/SHARED_WIRING.md +0 -165
- package/skills/wix-headless/references/astro/templates/Footer.astro +0 -27
- package/skills/wix-headless/references/astro/templates/Layout.astro +0 -132
- package/skills/wix-headless/references/astro/templates/Navigation.astro +0 -38
- package/skills/wix-headless/references/astro/templates/astro.config.mjs +0 -41
- package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +0 -374
- package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +0 -136
- package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +0 -25
- package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +0 -71
- package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +0 -54
- package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +0 -49
- package/skills/wix-headless/references/astro/templates/bookings/bookingDriver.ts +0 -245
- package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +0 -424
- package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +0 -176
- package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +0 -181
- package/skills/wix-headless/references/astro/templates/ecom/CartBadge.tsx +0 -84
- package/skills/wix-headless/references/astro/templates/ecom/CartView.tsx +0 -543
- package/skills/wix-headless/references/astro/templates/ecom/cart.astro +0 -13
- package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +0 -302
- package/skills/wix-headless/references/astro/templates/ecom/discounts.ts +0 -71
- package/skills/wix-headless/references/astro/templates/ecom/thank-you.astro +0 -24
- package/skills/wix-headless/references/astro/templates/gift-cards/GiftCardPurchase.tsx +0 -172
- package/skills/wix-headless/references/astro/templates/gift-cards/_home-teaser-snippet.astro +0 -42
- package/skills/wix-headless/references/astro/templates/gift-cards/_nav-snippet.astro +0 -11
- package/skills/wix-headless/references/astro/templates/gift-cards/components-gift-cards.css +0 -220
- package/skills/wix-headless/references/astro/templates/gift-cards/gift-cards.astro +0 -51
- package/skills/wix-headless/references/astro/templates/gift-cards/gift-cards.ts +0 -75
- package/skills/wix-headless/references/astro/templates/global.css +0 -288
- package/skills/wix-headless/references/astro/templates/index.astro +0 -56
- package/skills/wix-headless/references/astro/templates/stores/AddToCartButton.tsx +0 -77
- package/skills/wix-headless/references/astro/templates/stores/BackInStockForm.tsx +0 -176
- package/skills/wix-headless/references/astro/templates/stores/CategoryRail.astro +0 -69
- package/skills/wix-headless/references/astro/templates/stores/ProductCard.astro +0 -79
- package/skills/wix-headless/references/astro/templates/stores/ProductPurchase.tsx +0 -397
- package/skills/wix-headless/references/astro/templates/stores/SeoTags.astro +0 -21
- package/skills/wix-headless/references/astro/templates/stores/back-in-stock.ts +0 -67
- package/skills/wix-headless/references/astro/templates/stores/categories.ts +0 -155
- package/skills/wix-headless/references/astro/templates/stores/category/[slug].astro +0 -130
- package/skills/wix-headless/references/astro/templates/stores/components-stores.css +0 -400
- package/skills/wix-headless/references/astro/templates/stores/products/[slug].astro +0 -128
- package/skills/wix-headless/references/astro/templates/stores/products/index.astro +0 -101
- package/skills/wix-headless/references/blog/BLOG_CONTENT.md +0 -161
- package/skills/wix-headless/references/blog/INSTRUCTIONS.md +0 -32
- package/skills/wix-headless/references/bookings/FLOW.md +0 -246
- package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +0 -95
- package/skills/wix-headless/references/bookings/SERVICES_DATA.md +0 -355
- package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +0 -176
- package/skills/wix-headless/references/cms/INSTRUCTIONS.md +0 -71
- package/skills/wix-headless/references/commands/known-apps.json +0 -6
- package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +0 -142
- package/skills/wix-headless/references/custom/INSTRUCTIONS.md +0 -88
- package/skills/wix-headless/references/custom/blog/WIRING.md +0 -52
- package/skills/wix-headless/references/custom/bookings/WIRING.md +0 -197
- package/skills/wix-headless/references/custom/cms/WIRING.md +0 -97
- package/skills/wix-headless/references/custom/ecom/WIRING.md +0 -67
- package/skills/wix-headless/references/custom/forms/WIRING.md +0 -101
- package/skills/wix-headless/references/custom/stores/WIRING.md +0 -80
- package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +0 -59
- package/skills/wix-headless/references/forms/INSTRUCTIONS.md +0 -43
- package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +0 -51
- package/skills/wix-headless/references/images/INSTRUCTIONS.md +0 -357
- package/skills/wix-headless/references/seed-recipes.md +0 -49
- package/skills/wix-headless/references/shared/AGENTS_MD.md +0 -47
- package/skills/wix-headless/references/shared/AUTHENTICATION.md +0 -108
- package/skills/wix-headless/references/shared/BUILD_NOISE.md +0 -8
- package/skills/wix-headless/references/shared/DESIGN_MD.md +0 -84
- package/skills/wix-headless/references/shared/DOCS_SEARCH.md +0 -41
- package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +0 -186
- package/skills/wix-headless/references/shared/IMPLEMENTER.md +0 -206
- package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +0 -97
- package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +0 -143
- package/skills/wix-headless/references/shared/STYLING.md +0 -141
- package/skills/wix-headless/references/stores/INSTRUCTIONS.md +0 -126
- package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +0 -252
- package/skills/wix-headless/references/verticals/_schema.json +0 -74
- package/skills/wix-headless/references/verticals/_schema.md +0 -95
- package/skills/wix-headless/references/verticals/blog.md +0 -31
- package/skills/wix-headless/references/verticals/bookings.md +0 -41
- package/skills/wix-headless/references/verticals/cms.md +0 -30
- package/skills/wix-headless/references/verticals/ecom.md +0 -25
- package/skills/wix-headless/references/verticals/forms.md +0 -26
- package/skills/wix-headless/references/verticals/gift-cards.md +0 -24
- package/skills/wix-headless/references/verticals/stores.md +0 -33
- package/skills/wix-headless/scripts/check-manifest.mjs +0 -335
- package/skills/wix-headless/scripts/compose.mjs +0 -525
- package/skills/wix-headless/scripts/emit-design-tokens.mjs +0 -157
- package/skills/wix-headless/scripts/flatten.sh +0 -61
- package/skills/wix-headless/scripts/generate-images.mjs +0 -242
- package/skills/wix-headless/scripts/patch-decorative-slots.mjs +0 -148
- package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +0 -190
- package/skills/wix-headless/scripts/scaffold.sh +0 -139
- package/skills/wix-headless/scripts/seed-utilities.sh +0 -93
- package/skills/wix-headless/scripts/write-decorative-json.mjs +0 -62
- package/skills/wix-headless/shared-utilities/analytics.ts +0 -40
- package/skills/wix-headless/shared-utilities/ricos.ts +0 -179
- package/skills/wix-headless/shared-utilities/wix-image.ts +0 -72
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wix-headless
|
|
3
|
-
description: "
|
|
3
|
+
description: "Connect Wix business services (Stores, Bookings, CMS, Blog, Events, Forms, and more) to a Wix Headless frontend — infer the needed capabilities, install the apps, seed backend content, and produce an SDK-integration guide. For managed (Wix-hosted) projects it can also build the frontend: scaffold a new site (create) or wire an existing/brought-in design (connect), then build and release. Works across managed, self-managed, and stripe project types. Triggers: set up a Wix Headless backend, add Wix business features to my app, build or host a Wix site, connect/implement this design with Wix."
|
|
4
4
|
allowed-tools:
|
|
5
|
-
- Bash(
|
|
5
|
+
- Bash(curl *)
|
|
6
6
|
- Bash(npx @wix/cli@latest *)
|
|
7
7
|
- Bash(npx @wix/cli *)
|
|
8
8
|
- Bash(npm create @wix/new@latest *)
|
|
@@ -10,176 +10,130 @@ allowed-tools:
|
|
|
10
10
|
- Bash(npm run *)
|
|
11
11
|
- Bash(node *)
|
|
12
12
|
- Bash(bash *)
|
|
13
|
-
- Bash(
|
|
13
|
+
- Bash(cd *)
|
|
14
14
|
- Bash(ls *)
|
|
15
|
-
- Bash(grep *)
|
|
16
|
-
- Bash(find *)
|
|
17
|
-
- Bash(cat *)
|
|
18
|
-
- Bash(head *)
|
|
19
|
-
- Bash(wc *)
|
|
20
15
|
- Bash(mkdir *)
|
|
21
16
|
- Bash(cp *)
|
|
17
|
+
- Bash(mv *)
|
|
18
|
+
- Bash(uuidgen)
|
|
22
19
|
- Read
|
|
23
20
|
- Write
|
|
24
21
|
- Edit
|
|
25
|
-
- Skill
|
|
26
|
-
- Agent
|
|
27
22
|
---
|
|
28
23
|
|
|
29
24
|
# Wix Headless
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
> **Explicit invocation only.** Do not auto-route on generic "build me a site" prompts; production `wix-headless` should win those unless the user names this skill.
|
|
34
|
-
|
|
35
|
-
## Path resolution — read this first
|
|
36
|
-
|
|
37
|
-
Your CWD at runtime is the **project directory, which is also the site-root** — `scaffold.sh` flattens the scaffolded project into the current directory, so the run is a **single folder with a single `.wix/`** (no nested project, no parent/child split). `<site-root>` and `<project-dir>` are the **same path**: the run's CWD. The end-of-run `AGENTS.md` (project root) and the project's own files (`package.json`, `src/`, `wix.config.json`, `.wix/design-tokens.css`, …) all live there — **never `cd` into a subdir, never look in a parent for `.wix`**. Compute `<SKILL_ROOT>` from this file: `<SKILL_ROOT>/SKILL.md` — strip `/SKILL.md`; hold the absolute path in session scratch. (Hold `<site-root>` from `SETUP.md` Step 1; the connect/`init` path is likewise single-folder in CWD.)
|
|
38
|
-
|
|
39
|
-
| What | Absolute path |
|
|
40
|
-
|---|---|
|
|
41
|
-
| Discovery flow (router on OPERATION → operation files) | `<SKILL_ROOT>/references/DISCOVERY.md` → `DISCOVERY-create.md` (create) / `DISCOVERY-connect.md` (connect) |
|
|
42
|
-
| Setup flow | `<SKILL_ROOT>/references/SETUP.md` |
|
|
43
|
-
| Seed flow | `<SKILL_ROOT>/references/SEED.md` |
|
|
44
|
-
| Pre-approval funnel (plan; router on OPERATION → operation files) | `<SKILL_ROOT>/references/PLAN.md` → `PLAN-create.md` (create) / `PLAN-connect.md` (connect) |
|
|
45
|
-
| Post-approval build (router on FRAMEWORK → framework files) | `<SKILL_ROOT>/references/BUILD.md` → `BUILD-astro.md` (`frontendBuild: wix`) / `BUILD-own-build.md` (`frontendBuild: none`/`own`) |
|
|
46
|
-
| Seed recipe map (human ref) | `<SKILL_ROOT>/references/seed-recipes.md` |
|
|
47
|
-
| Auth + REST headers | `<SKILL_ROOT>/references/shared/AUTHENTICATION.md` |
|
|
48
|
-
| Public doc endpoints | `<SKILL_ROOT>/references/shared/DOCS_SEARCH.md` |
|
|
49
|
-
| Return contract | `<SKILL_ROOT>/references/shared/RETURN_CONTRACT.md` |
|
|
50
|
-
| Implementer shared behavior | `<SKILL_ROOT>/references/shared/IMPLEMENTER.md` |
|
|
51
|
-
| Image generation | `<SKILL_ROOT>/references/shared/IMAGE_GENERATION.md` |
|
|
52
|
-
| Design-system Designer (authors the DESIGN.md) | `<SKILL_ROOT>/references/DESIGN_SYSTEM.md` |
|
|
53
|
-
| DESIGN.md format spec (vendored; Designer self-loads) | `<SKILL_ROOT>/references/shared/DESIGN_MD.md` |
|
|
54
|
-
| Design-system Composer — deterministic script (writes the 6 files) | `<SKILL_ROOT>/scripts/compose.mjs` (self-documenting — its header is the spec) |
|
|
55
|
-
| Composer astro skeletons | `<SKILL_ROOT>/references/astro/templates/` |
|
|
56
|
-
| Vertical packs (discovery) | `<SKILL_ROOT>/references/verticals/` |
|
|
57
|
-
| Per-vertical instructions | `<SKILL_ROOT>/references/{stores,ecom,cms,blog,forms,gift-cards,bookings,images}/INSTRUCTIONS.md` |
|
|
58
|
-
| Phase 4 page-designer scopes | `<SKILL_ROOT>/references/astro/designer/INSTRUCTIONS.md` |
|
|
59
|
-
| Templates | `<SKILL_ROOT>/references/astro/templates/` |
|
|
60
|
-
| Shared utilities (copied by seed-utilities) | `<SKILL_ROOT>/shared-utilities/` |
|
|
61
|
-
| Known app IDs | `<SKILL_ROOT>/references/commands/known-apps.json` |
|
|
62
|
-
| Scripts | `<SKILL_ROOT>/scripts/` |
|
|
63
|
-
|
|
64
|
-
**Do NOT Read subagent role/instruction docs in the orchestrator** — pass the absolute path; the subagent opens it. Reading a role doc to "prepare a dispatch" pulls 5–14 KB of subagent-only how-to into the orchestrator's context, which it then has to reason over on the dispatch turn — measurably inflating bridge turns; the orchestrator only needs to know **which inputs to inline** for each dispatch, and that list lives in `BUILD.md`'s dispatch steps, not in the role doc.
|
|
65
|
-
|
|
66
|
-
This covers **every** doc whose body is written *for a subagent to follow*, not just files literally named `INSTRUCTIONS.md`: `DESIGN_SYSTEM.md` (Designer), `astro/designer/INSTRUCTIONS.md` (page designers), the per-vertical `INSTRUCTIONS.md` routers, and the per-vertical guides under `references/astro/`. (There is no Composer doc — the Composer is the deterministic script `scripts/compose.mjs`, self-documenting in its header; the orchestrator never reads compose internals.)
|
|
26
|
+
This skill connects **Wix business services** to a **Wix Headless frontend**. Its core job is to **configure the Wix backend**: infer the needed capabilities, **install the Wix apps**, **seed the backend content**, and produce an SDK-integration guide describing how to call Wix from the frontend.
|
|
67
27
|
|
|
68
|
-
|
|
28
|
+
What happens with the frontend depends on the project type and operation:
|
|
29
|
+
- **Backend-only** (self-managed, stripe, or a managed "just set up the backend" run) — the skill **emits the SDK guide** as its final output; the **host owns** the frontend, build, and hosting.
|
|
30
|
+
- **Managed create / connect** — the skill **also owns the frontend**: it scaffolds a new project (create) or attaches Wix to an existing one (connect), wires it to the backend using that same guide, builds, and releases to Wix. (There is no Designer or template library — the frontend is built ad-hoc to intent.)
|
|
69
31
|
|
|
70
|
-
-
|
|
71
|
-
- `BUILD.md` (+ the one framework build file — `BUILD-astro.md` *or* `BUILD-own-build.md`)
|
|
72
|
-
- `DISCOVERY.md` (+ the one operation discovery file — `DISCOVERY-create.md` *or* `DISCOVERY-connect.md`)
|
|
73
|
-
- `SETUP.md`
|
|
74
|
-
- `SEED.md`
|
|
75
|
-
- `references/verticals/*.md`
|
|
32
|
+
> **On a backend-only run the skill does not own the project scaffolding.** When the work needs a frontend, **scaffold it according to user intent** — framework and structure follow the prompt; the skill's job is the Wix backend plus the **emitted SDK guide** describing how to call Wix from whatever frontend exists, not choosing or generating the app. This is the norm for a **stripe** run: the project is provisioned via Stripe Projects (credentials land in `.env` — see `stripe/AUTHENTICATION.md`), the skill configures the backend and emits the guide, and the live site is finalized per `stripe/DEPLOYMENT.md` — while the frontend is scaffolded and wired to intent, by the host.
|
|
76
33
|
|
|
77
|
-
|
|
34
|
+
## Project types
|
|
78
35
|
|
|
79
|
-
|
|
36
|
+
The skill behaves identically across project types **except for authentication and deployment**, which are isolated in a per-type folder under `references/`:
|
|
80
37
|
|
|
81
|
-
|
|
38
|
+
| Project type | Hosting | Authentication & deployment live in |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `managed` | Wix infrastructure (maintained by Wix) | `references/managed/` |
|
|
41
|
+
| `self-managed` | the user's own host (TBD) | `references/self-managed/` |
|
|
42
|
+
| `stripe` | the user's own host, provisioned via Stripe Projects | `references/stripe/` |
|
|
82
43
|
|
|
83
|
-
|
|
84
|
-
Authorization: Bearer $(npx @wix/cli@latest token --site "$SITE_ID")
|
|
85
|
-
wix-site-id: $SITE_ID
|
|
86
|
-
```
|
|
44
|
+
Everything else — Discovery, Setup, Seed, the SDK handoff — is **project-type-agnostic** and refers to "the provided authentication mechanism" rather than any specific method.
|
|
87
45
|
|
|
88
|
-
|
|
46
|
+
### Resolving the project type
|
|
89
47
|
|
|
90
|
-
|
|
48
|
+
Resolve the type **before Discovery**, in this order — stop at the first that decides:
|
|
91
49
|
|
|
92
|
-
|
|
93
|
-
|
|
50
|
+
1. **Caller-provided.** If the host/caller passed a project type (`managed` | `self-managed` | `stripe`), use it. An explicit value always wins.
|
|
51
|
+
2. **Detect from project signals (on disk).** Check the working directory (read-only):
|
|
52
|
+
- **`stripe`** — `.env` carries `WIX_WIX_CLIENT_ID` / `WIX_WIX_CLIENT_SECRET` / `WIX_WIX_METASITE_ID` (or the plain `WIX_*` fallback). This is the Stripe-Projects fingerprint.
|
|
53
|
+
- **`managed`** — a Wix CLI project: `wix.config.json` present, or a `.wix/` directory, or `@wix/cli` / `@wix/astro` in `package.json`.
|
|
54
|
+
- **`self-managed`** — a frontend project on disk (e.g. `package.json` with a bundler/framework) with **neither** the Stripe `.env` fingerprint **nor** the Wix-CLI markers above.
|
|
55
|
+
3. **Detect from user intent.** If disk is inconclusive, read the prompt:
|
|
56
|
+
- **`managed`** — "managed", "host on Wix", "Wix-hosted", "deploy to Wix", "`wix release`".
|
|
57
|
+
- **`stripe`** — "stripe projects", "I added Wix via Stripe", a Stripe-Projects context.
|
|
58
|
+
- **`self-managed`** — "self-hosted", "my own host", names a non-Wix host, "I'll deploy it myself".
|
|
59
|
+
4. **Ask.** If signals are absent or conflict, **ask the user** which type applies — don't guess.
|
|
94
60
|
|
|
95
|
-
|
|
96
|
-
No source-code authoring, no creative judgment.
|
|
61
|
+
Hold the resolved type in scratch; it selects `<TYPE_DIR>` (see Path resolution). Note `self-managed` is **TBD** — once resolved to it, the auth step will stop with a clear "not wired yet" error.
|
|
97
62
|
|
|
98
|
-
|
|
99
|
-
- Image-generation subagents (while still dispatched as subagents)
|
|
63
|
+
### Resolving the operation (managed only)
|
|
100
64
|
|
|
101
|
-
**
|
|
65
|
+
create/connect/iterate are **managed-only**. For `managed`, resolve the operation **by intent first, directory second** — never let an empty directory override what the user is asking for. Check `iterate` first (it's decided by an unambiguous on-disk signal):
|
|
102
66
|
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
67
|
+
- **`iterate`** → `references/managed/CONNECT.md`. The project is **already connected to Wix** — a `wix.config.json` (or `.wix/`) is already present — and the owner wants to add or change capabilities. Same flow as `connect`, but §1 **skips `init`** and reuses the existing `wix.config.json`; **never re-`init` an already-connected project**.
|
|
68
|
+
- **`connect`** → `references/managed/CONNECT.md`. The user **brings a design not yet connected to Wix and wants it wired**: a frontend project on disk **without** a `wix.config.json`, **or** a brought-in/fetched design (a `.zip`/folder/file you unzip or read, a design-file URL, a Claude-Design/v0/Lovable export), **or** language like "connect this / implement this design (… connecting to Wix) / host this on Wix / deploy this to Wix / add Wix Headless to this project". **A brought-in or fetched design is `connect` even when the current directory is empty** — the design arrives from elsewhere (zip/fetch/URL), so emptiness at trigger time is *not* a create signal. (`CONNECT.md` step 1 places the brought design into CWD, then `init`s it.)
|
|
69
|
+
- **`create`** → `references/managed/CREATE.md`. The user wants a **new site built from a prompt with nothing brought in** — "build me a site / store / blog…", no design file, no project on disk.
|
|
70
|
+
- **`backend-only`** — the user only wants the backend configured (no frontend work). → the shared spine + emit the SDK handoff.
|
|
107
71
|
|
|
108
|
-
|
|
109
|
-
choice is determined by the task type, not by the subject matter of
|
|
110
|
-
the run.
|
|
72
|
+
For `self-managed` and `stripe`, the operation is always **backend-only** (the host owns the frontend). Only when there is **genuinely no brought-in design and no connect language** does directory emptiness decide: empty → `create`; an existing frontend on disk → `connect`.
|
|
111
73
|
|
|
74
|
+
## Preconditions (the host provides these — we read, never create)
|
|
112
75
|
|
|
113
|
-
|
|
76
|
+
1. **The project type** — `managed` | `self-managed` | `stripe` — provided by the caller, else **detected from project signals / user intent** (see Project types § "Resolving the project type"), else asked. It selects `<TYPE_DIR>` (see Path resolution).
|
|
77
|
+
2. **A Wix metasite + a headless OAuth app exist, and credentials are available** — obtained via the project type's `AUTHENTICATION.md`. The skill needs a bearer token authorized for the metasite and the metasite id.
|
|
78
|
+
3. **The user intent** — free text describing what Wix should power ("add a store", "blog + contact form", "persist my app's data").
|
|
79
|
+
4. *(Optional)* the project on disk — read-only, to sharpen brand/capability inference.
|
|
114
80
|
|
|
115
|
-
|
|
81
|
+
If the credentials are absent, the Wix backend isn't reachable — **stop with a clear error**.
|
|
116
82
|
|
|
117
|
-
|
|
83
|
+
## What this skill does
|
|
118
84
|
|
|
119
|
-
|
|
85
|
+
**Always open `DISCOVERY.md` first** (it's agnostic — capability/brand/intent inference + the imagery gate, no auth). Then route by project type + operation:
|
|
120
86
|
|
|
121
|
-
|
|
87
|
+
**Backend-only** (self-managed, stripe, or managed backend-only) — the lean spine:
|
|
88
|
+
1. **Discovery** (`references/DISCOVERY.md`) — infer capabilities + brand + intent + imagery.
|
|
89
|
+
2. **Setup** (`references/SETUP.md`) — **install** the Wix apps those capabilities need.
|
|
90
|
+
3. **Seed** (`references/SEED.md`) — **create** the backend content (+ entity images if imagery is on).
|
|
91
|
+
4. **Handoff** (`references/SDK_HANDOFF.md`) — after Setup and Seed, **emit** the integration guide: SDK bootstrap, per-capability call shapes, the **seeded IDs**, and the `@wix/*` package list.
|
|
92
|
+
5. **Finalize deployment** (`<TYPE_DIR>/DEPLOYMENT.md`) — run the project-type's finalize steps.
|
|
122
93
|
|
|
123
|
-
|
|
94
|
+
**Throughout any run** — if the user asks to send feedback to Wix, complains/gets frustrated, or the run hits substantial friction (repeated API/doc/tooling failures), you may **offer** to relay it to Wix per `references/FEEDBACK.md`. Send only after an explicit yes — never automatically.
|
|
124
95
|
|
|
125
|
-
|
|
96
|
+
**Managed create / connect / iterate** — after Discovery, hand the whole run to the managed flow:
|
|
97
|
+
- **create** → **`references/managed/CREATE.md`** (scaffold → Setup → Seed → build the frontend → release).
|
|
98
|
+
- **connect** → **`references/managed/CONNECT.md`** (init → Setup → Seed → wire the existing UI → release).
|
|
99
|
+
- **iterate** → **`references/managed/CONNECT.md`** — the project is already connected, so it reuses the existing `wix.config.json` (no `init`). Setup / Seed / wiring are **incremental**: it may already be set up and seeded from a prior run, so the agent **checks current state first** (installed apps, already-seeded content, existing wiring) and applies only the delta the new intent needs — never blindly re-installing or re-seeding. Re-release only if the frontend build output changed.
|
|
100
|
+
These reuse the same `SETUP.md`/`SEED.md`/`SDK_HANDOFF.md`, but **apply** the SDK guide to build/wire the frontend themselves rather than emitting it, and release via `managed/DEPLOYMENT.md`.
|
|
126
101
|
|
|
127
|
-
|
|
102
|
+
Each Wix call uses the universal call shape (`SETUP.md` §1) with `$TOKEN`/`$SITE_ID` obtained per `<TYPE_DIR>/AUTHENTICATION.md`. The skill runs non-interactively except for the one imagery question (and asking the project type if it can't be resolved).
|
|
128
103
|
|
|
129
|
-
|
|
104
|
+
> **Don't smoke-test the frontend locally unless the user asks to verify.** The deliverable is the built-and-released site (managed) or the SDK guide (backend-only) — not a local test report. By **default do not** start a dev server (`wix dev` / `astro dev` / `npm run dev`) to curl pages, drive the cart / booking / login flow, or launch a headless browser: correctness comes from following the recipes, real errors surface at `wix build` / `wix release`, and a headless run can't complete an interactive login or a real payment anyway — so these loops routinely burn minutes of wall for little signal (this is distinct from, and in addition to, the "release once at the very end" rule — that one only bans extra *build+release* cycles, not dev-server testing). **Only** spin up a dev server and smoke-test when the user's prompt **explicitly asks to verify / test / confirm it works** — and then keep it to a single lightweight pass (pages compile and render), not a full purchase/booking/login drive. The one post-release check in `<TYPE_DIR>/DEPLOYMENT.md` is the sanctioned verification.
|
|
130
105
|
|
|
131
|
-
|
|
132
|
-
|---|---|
|
|
133
|
-
| Prompt asks to **connect / implement / host an existing or fetched design** (incl. a design-file URL), **even if the CWD is empty** | **B (`operation: connect`)** |
|
|
134
|
-
| A working frontend already on disk (`index.html`, `*.html`/`*.jsx`/`*.tsx`/`*.vue`, a design bundle) | **B (`operation: connect`)** |
|
|
135
|
-
| Empty CWD **and** a create-a-new-site prompt, nothing to connect | A (`operation: create`) |
|
|
136
|
-
| `wix.config.json` present (an existing wix-headless project) | resume/extend |
|
|
137
|
-
|
|
138
|
-
**The connect operation wires a brought-in design to Wix.** When the working directory holds a brought-in site, the run **connects it to a live Wix backend** — parse the site (`DISCOVERY-connect.md`), init + shared Setup/Seed, wire existing dynamic regions to `@wix/sdk` and augment static designs with the connected feature their purpose implies, then no-build release. The frontend-track playbook is `<SKILL_ROOT>/references/custom/INSTRUCTIONS.md`; routing is owned by `PLAN-connect.md`.
|
|
139
|
-
|
|
140
|
-
### Two routing axes: operation (Discovery/Plan) + framework (Build)
|
|
141
|
-
|
|
142
|
-
The skill routes each phase on its own axis — they only *happen* to coincide while there are exactly two modes:
|
|
143
|
-
|
|
144
|
-
- **Operation** (Discovery + Plan route on this) — *create* (scaffold a new site from a prompt) vs *connect* (integrate a brought-in design).
|
|
145
|
-
- **Framework-build-class** (Build routes on this) — `frontendBuild`: `wix` (astro-native, `wix build`) vs `none` (static HTML, no build) vs `own` (own-build SPA, the project's own `npm run build`).
|
|
146
|
-
|
|
147
|
-
These plus `frontend`, `verticals[]`, `designSource`, and `brand` form the **Plan→Build contract** (`PLAN.md` § "The Plan→Build contract"), held in orchestrator scratch and threaded into dispatch prompts. The axes are **orthogonal** — `frontendBuild` is derived inside the operation, not implied by it:
|
|
106
|
+
## Path resolution
|
|
148
107
|
|
|
149
|
-
|
|
150
|
-
|---|---|---|---|
|
|
151
|
-
| `create` (default) | `astro` | `wix` | the skill writes the site, then `wix build` + release (`references/astro/`) |
|
|
152
|
-
| `create` + explicit framework keyword (*"…using vite"*) | `custom` | `own` | scaffold the named framework (vite/vue/svelte) → minimal app → connect via the SPA spine → the project's own `npm run build` + release (companion case) |
|
|
153
|
-
| `connect` (brought static HTML) | `custom` | `none` | connect a brought-in HTML+CSS/JS site; init + Setup/Seed + connect/augment + **no-build** release (`references/custom/`) |
|
|
154
|
-
| `connect` (brought framework SPA) | `custom` | `own` | connect a brought-in Vite/React/Vue/Svelte SPA; bundled `@wix/sdk` + source-edit wiring (persistence swap) + the project's own build + release |
|
|
108
|
+
Compute `<SKILL_ROOT>` from this file (`<SKILL_ROOT>/SKILL.md` — strip `/SKILL.md`); hold the absolute path in scratch. Then resolve the project type to its folder and hold it too:
|
|
155
109
|
|
|
156
|
-
|
|
110
|
+
> **`<TYPE_DIR>` = `<SKILL_ROOT>/references/<projectType>/`** — one of `managed/`, `self-managed/`, `stripe/`.
|
|
157
111
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
The skill runs two semi-independent tracks (business = frontend-blind site/app/seed work; frontend = scaffold/design/components/pages/build) that the orchestrator interleaves for wall-time. **The track model and interleaving are owned by `PLAN.md` § "Two tracks".**
|
|
161
|
-
|
|
162
|
-
### When NOT to use this skill
|
|
163
|
-
|
|
164
|
-
| Scenario | Use instead |
|
|
112
|
+
| What | Path |
|
|
165
113
|
|---|---|
|
|
166
|
-
|
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
114
|
+
| Vertical index (intent matching + per-vertical site spec) | `<SKILL_ROOT>/references/CAPABILITIES.md` |
|
|
115
|
+
| Discovery (infer capabilities + brand + intent) | `<SKILL_ROOT>/references/DISCOVERY.md` |
|
|
116
|
+
| Setup (install apps) | `<SKILL_ROOT>/references/SETUP.md` |
|
|
117
|
+
| Seed (create backend content) | `<SKILL_ROOT>/references/SEED.md` |
|
|
118
|
+
| SDK-integration handoff (emitted, or applied by create/connect) | `<SKILL_ROOT>/references/SDK_HANDOFF.md` |
|
|
119
|
+
| Image generation (opt-in; agnostic) | `<SKILL_ROOT>/references/IMAGE_GENERATION.md` |
|
|
120
|
+
| AI features — text/chat + embeddings (opt-in; agnostic) | `<SKILL_ROOT>/references/AI_FEATURES.md` |
|
|
121
|
+
| Feedback — relay the user's headless-experience feedback to Wix (opt-in; user-approved) | `<SKILL_ROOT>/references/FEEDBACK.md` |
|
|
122
|
+
| **Authentication** — obtain `$TOKEN`/`$SITE_ID`/`clientId` (project-type-specific) | `<TYPE_DIR>/AUTHENTICATION.md` |
|
|
123
|
+
| **Deployment** — finalize the live site (project-type-specific) | `<TYPE_DIR>/DEPLOYMENT.md` |
|
|
124
|
+
| Managed **create** flow (scaffold a new project) | `<SKILL_ROOT>/references/managed/CREATE.md` |
|
|
125
|
+
| Managed **connect** flow (wire an existing project) | `<SKILL_ROOT>/references/managed/CONNECT.md` |
|
|
126
|
+
| Frontend-axis references (how a frontend wires to Wix) | `<SKILL_ROOT>/references/astro.md`, `non-astro.md` |
|
|
174
127
|
|
|
175
|
-
|
|
128
|
+
**Start a run by opening `DISCOVERY.md`.** The flow files (`CAPABILITIES`, `DISCOVERY`, `SETUP`, `SEED`, `SDK_HANDOFF`, `IMAGE_GENERATION`, `AI_FEATURES`) are project-type-agnostic; the per-type specifics live under `<TYPE_DIR>/` (`AUTHENTICATION.md`, `DEPLOYMENT.md`, and — managed only — `CREATE.md`/`CONNECT.md`).
|
|
176
129
|
|
|
177
|
-
|
|
130
|
+
## Where the *how* comes from
|
|
178
131
|
|
|
179
|
-
|
|
132
|
+
This skill has **no skill upstream** — the *how* is read from the **live Wix docs** at `dev.wix.com/docs`. **Read-priority: a page this skill links is read by `curl`-ing its `.md` twin directly (first priority — don't re-discover a curated link with search); the Wix MCP doc/search tools are second priority, for finding pages the skill doesn't link or as a fallback if a fetch fails.** (Append `.md` to any docs URL for raw markdown; menu pages list child links, content pages carry the schema.)
|
|
180
133
|
|
|
181
|
-
|
|
134
|
+
**Doc discovery is the shared fallback for both tracks — never the first move.** Each track's *primary* source is its pinned material (below); when that doesn't cover what you need, fall back to `references/DOC_DISCOVERY.md` — a semantic doc-search + schema lookup that works with or without the Wix MCP.
|
|
182
135
|
|
|
183
|
-
|
|
136
|
+
- **Seed** reads each capability's create flow from its **inline recipe** — a **self-contained local `inline-recipes/setup-*.md`** (mapped per capability in `SEED.md` § "What to seed per capability") that inlines the calls and **supersedes** the REST doc pages, so read it and seed from it alone. Only a capability with **no** inline recipe (e.g. `coupons`) falls back to doc discovery (`DOC_DISCOVERY.md`).
|
|
137
|
+
- **Handoff** links the **SDK docs** for each capability's API shape, and supplies the runtime package set from the inlined map in `SDK_HANDOFF.md` (the SDK `.md` pages don't expose `@wix/*` import strings to navigation, so packages are mapped, not navigated).
|
|
184
138
|
|
|
185
|
-
|
|
139
|
+
Setup carries its app-install call (and the appDefId constants) inline in `SETUP.md`; `CAPABILITIES.md` is the vertical index that lets Discovery match intent **and** declares, per built vertical, the *Required site features* + *Implementation checklist* that Seed enables (backend-backed features) and the Handoff carries into the guide (so the host builds a complete site, not a bare data dump). This skill carries the *what* (which capabilities, how much content, what a finished site includes) and reads the *how* off the docs.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawn, spawnSync } from 'node:child_process';
|
|
3
|
+
import readline from 'node:readline';
|
|
4
|
+
|
|
5
|
+
// ── tiny event protocol (one JSON object per line) ───────────────────────────
|
|
6
|
+
const emit = (event, extra = {}) =>
|
|
7
|
+
process.stdout.write(JSON.stringify({ event, ...extra }) + '\n');
|
|
8
|
+
const fail = (event, extra = {}) => {
|
|
9
|
+
emit(event, { ok: false, ...extra });
|
|
10
|
+
process.exit(1);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// ── platform-safe binary names (npm/npx are .cmd on Windows) ─────────────────
|
|
14
|
+
const isWin = process.platform === 'win32';
|
|
15
|
+
const bin = (name) => (isWin ? `${name}.cmd` : name);
|
|
16
|
+
const WIX = [bin('npx'), '-y', '@wix/cli@latest']; // run the CLI via npx — no global install/mutation
|
|
17
|
+
|
|
18
|
+
// Force the CLI into non-interactive "agent" mode. Without an agent signal in
|
|
19
|
+
// the env, `wix login` renders an interactive Ink TUI (device code + keypress)
|
|
20
|
+
// that needs a raw TTY and crashes in an agent sandbox — and it never emits the
|
|
21
|
+
// JSON login events this script forwards. The CLI uses @vercel/detect-agent,
|
|
22
|
+
// whose first check is the AI_AGENT env var, so setting it guarantees agent mode
|
|
23
|
+
// (and the awaiting_user/success/logged_in events) for every child we spawn.
|
|
24
|
+
// Respect an existing value so a known runner (claude, cursor, …) keeps its name.
|
|
25
|
+
const AGENT_ENV = { ...process.env, AI_AGENT: process.env.AI_AGENT || 'wix-headless-skill' };
|
|
26
|
+
|
|
27
|
+
// run a command, capture stdout+stderr (combined), return {status, out}
|
|
28
|
+
function capture(cmd, args, opts = {}) {
|
|
29
|
+
const r = spawnSync(cmd, args, { encoding: 'utf8', shell: false, env: AGENT_ENV, ...opts });
|
|
30
|
+
return { status: r.status ?? 1, out: `${r.stdout || ''}${r.stderr || ''}`, error: r.error };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// ── 1. CLI reachable (via npx — no install) ──────────────────────────────────
|
|
34
|
+
function checkCli() {
|
|
35
|
+
const r = capture(WIX[0], [...WIX.slice(1), '--version']);
|
|
36
|
+
if (r.status !== 0) fail('cli_unreachable', { detail: r.out.trim().slice(0, 400) });
|
|
37
|
+
// npx interleaves "npm notice …" lines with the version, so don't just take the
|
|
38
|
+
// last line — pick the first semver-looking token, falling back to the last line.
|
|
39
|
+
const version = (r.out.match(/\d+\.\d+\.\d+[^\s]*/) || [])[0] || r.out.trim().split('\n').pop();
|
|
40
|
+
emit('cli_ok', { version });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ── 2. Login (human-in-the-loop device code; forward the CLI's own events) ───
|
|
44
|
+
function login() {
|
|
45
|
+
return new Promise((resolve) => {
|
|
46
|
+
const child = spawn(WIX[0], [...WIX.slice(1), 'login'], { shell: false, env: AGENT_ENV });
|
|
47
|
+
const rl = readline.createInterface({ input: child.stdout });
|
|
48
|
+
let loggedIn = false;
|
|
49
|
+
// Buffer the CLI's own diagnostics (stderr + any non-event stdout chatter) so a
|
|
50
|
+
// failure reports the REAL cause — network/proxy error, expired code, etc. — not
|
|
51
|
+
// a guess. Keep only the tail so a chatty CLI can't blow up memory, and draining
|
|
52
|
+
// stderr also avoids the pipe filling up and stalling the child.
|
|
53
|
+
let diag = '';
|
|
54
|
+
const collect = (chunk) => {
|
|
55
|
+
diag = (diag + chunk).slice(-2000);
|
|
56
|
+
};
|
|
57
|
+
child.stderr?.on('data', collect);
|
|
58
|
+
rl.on('line', (line) => {
|
|
59
|
+
const t = line.trim();
|
|
60
|
+
if (!t) return;
|
|
61
|
+
// In agent mode the CLI emits {event:"awaiting_user"|"success"|"logged_in", ...}
|
|
62
|
+
// — pass those straight through so the agent can relay the device code.
|
|
63
|
+
try {
|
|
64
|
+
const ev = JSON.parse(t);
|
|
65
|
+
if (ev && ev.event) {
|
|
66
|
+
process.stdout.write(t + '\n');
|
|
67
|
+
if (ev.event === 'success' || ev.event === 'logged_in') {
|
|
68
|
+
loggedIn = true;
|
|
69
|
+
resolve();
|
|
70
|
+
}
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
collect(line + '\n'); // JSON, but not an event — keep for diagnostics
|
|
74
|
+
} catch {
|
|
75
|
+
collect(line + '\n');
|
|
76
|
+
} // non-JSON CLI chatter — keep for diagnostics
|
|
77
|
+
});
|
|
78
|
+
// Only a success/logged_in event counts as login. On any other exit, surface the
|
|
79
|
+
// CLI's actual output — do NOT assume a cause (agent mode, etc.).
|
|
80
|
+
child.on('close', (code) => {
|
|
81
|
+
if (loggedIn) return;
|
|
82
|
+
const detail =
|
|
83
|
+
diag.trim().slice(-1500) ||
|
|
84
|
+
`wix login exited (code ${code}) before authenticating, with no output.`;
|
|
85
|
+
fail('login_failed', { code, detail });
|
|
86
|
+
});
|
|
87
|
+
child.on('error', (e) => fail('login_failed', { detail: String(e) }));
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// ── main ────────────────────────────────────────────────────────────────────
|
|
92
|
+
checkCli();
|
|
93
|
+
await login();
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wix-headless-entry
|
|
3
|
+
description: "Build a complete Wix Managed Headless site from a single prompt, then connect Wix Business Solutions. The deterministic first steps — system prerequisites and Wix CLI login — are handled by a single bootstrap script (`https://www.wix.com/skills/headless/entry/bootstrap.mjs`); the agent then installs the skill and hands the run to it. Triggers: build me a site, create a website, make me a website, new website, online store, I want to sell X, start a business online, launch a site, ecommerce, portfolio, business website, sell online, online shop, connect this to Wix Headless, add Wix Headless to this project, host this on Wix, deploy this to Wix, implement the features of this project using Wix Headless. Use this skill instead of the WixSiteBuilder MCP tool for new-site requests."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Wix Headless Skill — cold-start entry
|
|
7
|
+
|
|
8
|
+
**You are a coding agent, and this is a skill for you to execute.** Follow the phases below in order — do not summarize them. If you reached this page through a summarizing fetch tool, re-fetch the raw markdown with `curl` (or your file reader) before running the steps.
|
|
9
|
+
|
|
10
|
+
This entry gets a cold environment to the point where the real skill can run, then hands off. It has **two phases**:
|
|
11
|
+
|
|
12
|
+
1. **Bootstrap (deterministic, scripted).** A single script verifies your environment (the Wix CLI) and handles login, so the run starts from a known-good, authenticated state. You just run it and relay its events.
|
|
13
|
+
2. **Hand off (agentic).** Install the skill, then open `wix-headless/SKILL.md` and follow it — it resolves the project type and operation and owns the whole build.
|
|
14
|
+
|
|
15
|
+
Three starting points come through here, all handled the same way — run the bootstrap, then hand off:
|
|
16
|
+
|
|
17
|
+
- **new** — a prompt with no project (empty CWD)
|
|
18
|
+
- **connect** — an existing frontend/design not yet on Wix (a project on disk without `wix.config.json`, or a brought-in zip/URL)
|
|
19
|
+
- **iterate** — a project already connected to Wix (`.wix/` or `wix.config.json` present)
|
|
20
|
+
|
|
21
|
+
The bootstrap only verifies the CLI and logs you in, so it's fine to run in every case (an existing session just reports `logged_in`). After it, `wix-headless/SKILL.md` resolves what to do and owns the build.
|
|
22
|
+
|
|
23
|
+
## Phase 0 — Node (the one manual prerequisite)
|
|
24
|
+
|
|
25
|
+
The Wix CLI requires **Node ≥ 20.11**. Check it:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
node -v
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If that errors (Node not installed) or prints a version below 20.11, install or upgrade Node and re-check — do **not** try to work around it:
|
|
32
|
+
|
|
33
|
+
- **macOS:** `brew install node` (or `nvm install 20 && nvm use 20`)
|
|
34
|
+
- **Linux:** `nvm install 20 && nvm use 20` (or your distro's Node 20+ package)
|
|
35
|
+
- **Windows:** `winget install OpenJS.NodeJS.LTS` (or download from nodejs.org)
|
|
36
|
+
|
|
37
|
+
## Phase 1 — Run the bootstrap (deterministic)
|
|
38
|
+
|
|
39
|
+
Download the bootstrap script, then run it. It verifies the Wix CLI and handles login, emitting **one JSON event per line** on stdout. **Run it as a background/streaming process and relay its events to the user.**
|
|
40
|
+
|
|
41
|
+
The script is safe and inspectable: it only checks the Wix CLI via `npx` and drives `wix login` (a device-code flow) — no other network calls, no filesystem writes. Read it first if your sandbox flags externally-downloaded code — either at the URL below or after downloading; both are the same file.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# macOS/Linux:
|
|
45
|
+
curl -fsSL -O https://www.wix.com/skills/headless/entry/bootstrap.mjs
|
|
46
|
+
# Windows PowerShell:
|
|
47
|
+
iwr https://www.wix.com/skills/headless/entry/bootstrap.mjs -OutFile bootstrap.mjs
|
|
48
|
+
|
|
49
|
+
node bootstrap.mjs
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Relay these events
|
|
53
|
+
|
|
54
|
+
The script emits one JSON object per line:
|
|
55
|
+
|
|
56
|
+
| Event | What to do |
|
|
57
|
+
|---|---|
|
|
58
|
+
| `cli_ok` | Wix CLI reachable — continue. |
|
|
59
|
+
| `awaiting_user` (`verificationUri`, `userCode`) | Show the URL and code in plain prose; wait for the user to finish the login in their browser. |
|
|
60
|
+
| `logged_in` / `success` | Login done — continue. |
|
|
61
|
+
| `cli_unreachable` / `login_failed` (with `detail`) | Stop and show the user the `detail`. **Do not** improvise a parallel setup by hand. |
|
|
62
|
+
|
|
63
|
+
## Phase 2 — Install the skill and hand off
|
|
64
|
+
|
|
65
|
+
Install the Wix Headless skills (`CI=1` forces plain non-interactive CLI output — keep it on every Wix CLI command):
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
CI=1 wix skills add
|
|
69
|
+
# Fallback if 'wix skills' isn't registered for this project type:
|
|
70
|
+
CI=1 npx skills@latest add wix/skills --yes
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The skills land in `.agents/skills/`.
|
|
74
|
+
|
|
75
|
+
Then **open `wix-headless/SKILL.md` and follow it.** That skill owns the rest of the run — it resolves the **project type** (`managed` / `self-managed` / `stripe`) and, for managed, the **operation** (create / connect), then runs Discovery → Setup → Seed → the SDK handoff, and for managed create/connect it also scaffolds, builds, and releases.
|
|
76
|
+
|
|
77
|
+
- **Don't** scaffold, install apps, or release by hand here — the skill does all of that (`SETUP.md`, `references/managed/CREATE.md`, etc.). This entry stops at *logged in*.
|
|
78
|
+
- You're already authenticated from Phase 1, so the skill's managed auth step (`references/managed/AUTHENTICATION.md` §1 `whoami`) will pass without prompting again.
|