@wix/agent-skills 1.21.0 → 1.23.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.
Files changed (269) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +71 -7
  3. package/skills/wix-app/references/APP_VALIDATION.md +16 -10
  4. package/skills/wix-app/references/DASHBOARD_PAGE.md +11 -25
  5. package/skills/wix-app/references/DATA_COLLECTION.md +16 -219
  6. package/skills/wix-app/references/SDK_MODULE_MAP.md +2 -0
  7. package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +182 -0
  8. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +97 -0
  9. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_COLLECTION.md +184 -0
  10. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +203 -0
  11. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_SETTINGS.md +44 -0
  12. package/skills/wix-app/references/dashboard-page/QUERY_AND_PAGING.md +182 -0
  13. package/skills/wix-app/references/dashboard-page/TABLE_STATE.md +133 -0
  14. package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +10 -5
  15. package/skills/wix-app/references/data-collection/LIFECYCLE.md +68 -0
  16. package/skills/wix-app/references/data-collection/PERMISSIONS.md +47 -0
  17. package/skills/wix-app/references/data-collection/SCHEMA.md +181 -0
  18. package/skills/wix-app/references/data-collection/WIX_DATA.md +38 -66
  19. package/skills/wix-headless-fast/SKILL.md +95 -230
  20. package/skills/wix-headless-fast/cold-start/bootstrap.mjs +156 -0
  21. package/skills/wix-headless-fast/{entry/skill.md → cold-start/cold-start.md} +17 -14
  22. package/skills/wix-headless-fast/guides/existing-site.md +78 -0
  23. package/skills/wix-headless-fast/guides/migration.md +43 -0
  24. package/skills/wix-headless-fast/guides/reference-mode.md +100 -0
  25. package/skills/wix-headless-fast/install/AGENTS.md +9 -4
  26. package/skills/wix-headless-fast/install/agents-md.mjs +5 -1
  27. package/skills/wix-headless-fast/install/attach.mjs +25 -47
  28. package/skills/wix-headless-fast/install/check.mjs +87 -0
  29. package/skills/wix-headless-fast/install/context.mjs +126 -0
  30. package/skills/wix-headless-fast/install/deploy.mjs +106 -80
  31. package/skills/wix-headless-fast/install/lock.mjs +55 -0
  32. package/skills/wix-headless-fast/install/setup.mjs +83 -23
  33. package/skills/wix-headless-fast/install/templates.mjs +168 -0
  34. package/skills/wix-manage/SKILL.md +3 -3
  35. package/skills/wix-manage/references/app-installation/install-wix-apps.md +68 -2
  36. package/skills/wix-manage/references/contacts/bulk-label-and-unlabel-contacts.md +37 -4
  37. package/skills/wix-manage/references/ecommerce/ecom-pricing.md +29 -3
  38. package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +27 -0
  39. package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +83 -37
  40. package/skills/wix-manage/references/sites/site-import.md +101 -37
  41. package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +0 -303
  42. package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +0 -136
  43. package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +0 -112
  44. package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +0 -42
  45. package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +0 -31
  46. package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +0 -22
  47. package/skills/wix-headless-fast/references/blog/app/wix/blog/blog-feed-store.ts +0 -137
  48. package/skills/wix-headless-fast/references/blog/app/wix/blog/post-store.ts +0 -78
  49. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts-core.ts +0 -117
  50. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +0 -52
  51. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy-core.ts +0 -47
  52. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +0 -58
  53. package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +0 -62
  54. package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +0 -40
  55. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +0 -97
  56. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +0 -24
  57. package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +0 -16156
  58. package/skills/wix-headless-fast/references/blog/rest/posts.ts +0 -42
  59. package/skills/wix-headless-fast/references/blog/rest/taxonomy.ts +0 -62
  60. package/skills/wix-headless-fast/references/blog/seed/SEED.md +0 -81
  61. package/skills/wix-headless-fast/references/blog/seed/read-site.mjs +0 -22
  62. package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +0 -287
  63. package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +0 -277
  64. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +0 -144
  65. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +0 -119
  66. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +0 -32
  67. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +0 -23
  68. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-core.ts +0 -218
  69. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-flow-store.ts +0 -169
  70. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +0 -121
  71. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-core.ts +0 -92
  72. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-store.ts +0 -90
  73. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +0 -57
  74. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +0 -72
  75. package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +0 -40
  76. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +0 -76
  77. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +0 -22
  78. package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +0 -11962
  79. package/skills/wix-headless-fast/references/bookings/rest/booking.ts +0 -113
  80. package/skills/wix-headless-fast/references/bookings/rest/services.ts +0 -55
  81. package/skills/wix-headless-fast/references/bookings/seed/SEED.md +0 -71
  82. package/skills/wix-headless-fast/references/bookings/seed/read-site.mjs +0 -28
  83. package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +0 -302
  84. package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +0 -355
  85. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +0 -50
  86. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +0 -37
  87. package/skills/wix-headless-fast/references/cms/app/wix/cms/collection-store.ts +0 -158
  88. package/skills/wix-headless-fast/references/cms/app/wix/cms/item-store.ts +0 -93
  89. package/skills/wix-headless-fast/references/cms/app/wix/cms/items-core.ts +0 -177
  90. package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +0 -123
  91. package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +0 -75
  92. package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +0 -41
  93. package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +0 -11262
  94. package/skills/wix-headless-fast/references/cms/rest/items.ts +0 -125
  95. package/skills/wix-headless-fast/references/cms/seed/SEED.md +0 -112
  96. package/skills/wix-headless-fast/references/cms/seed/read-site.mjs +0 -20
  97. package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +0 -324
  98. package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +0 -307
  99. package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +0 -66
  100. package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +0 -178
  101. package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +0 -118
  102. package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +0 -35
  103. package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +0 -24
  104. package/skills/wix-headless-fast/references/events/app/wix/events/events-core.ts +0 -130
  105. package/skills/wix-headless-fast/references/events/app/wix/events/events-store.ts +0 -97
  106. package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +0 -55
  107. package/skills/wix-headless-fast/references/events/app/wix/events/registration-core.ts +0 -113
  108. package/skills/wix-headless-fast/references/events/app/wix/events/registration-store.ts +0 -156
  109. package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +0 -97
  110. package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +0 -61
  111. package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +0 -40
  112. package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +0 -12
  113. package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +0 -80
  114. package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +0 -21
  115. package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +0 -11884
  116. package/skills/wix-headless-fast/references/events/rest/events.ts +0 -57
  117. package/skills/wix-headless-fast/references/events/rest/registration.ts +0 -83
  118. package/skills/wix-headless-fast/references/events/seed/SEED.md +0 -95
  119. package/skills/wix-headless-fast/references/events/seed/read-site.mjs +0 -26
  120. package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +0 -276
  121. package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +0 -340
  122. package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +0 -85
  123. package/skills/wix-headless-fast/references/forms/app/wix/forms/form-store.ts +0 -332
  124. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms-core.ts +0 -238
  125. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +0 -54
  126. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions-core.ts +0 -216
  127. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +0 -59
  128. package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +0 -135
  129. package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +0 -10593
  130. package/skills/wix-headless-fast/references/forms/rest/forms.ts +0 -34
  131. package/skills/wix-headless-fast/references/forms/rest/submissions.ts +0 -56
  132. package/skills/wix-headless-fast/references/forms/seed/SEED.md +0 -116
  133. package/skills/wix-headless-fast/references/forms/seed/read-site.mjs +0 -20
  134. package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +0 -327
  135. package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +0 -316
  136. package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +0 -60
  137. package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +0 -155
  138. package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +0 -78
  139. package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +0 -47
  140. package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +0 -66
  141. package/skills/wix-headless-fast/references/members/app/wix/members/auth-core.ts +0 -105
  142. package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +0 -59
  143. package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +0 -53
  144. package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +0 -122
  145. package/skills/wix-headless-fast/references/members/app/wix/members/members-core.ts +0 -43
  146. package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +0 -29
  147. package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +0 -21
  148. package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +0 -42
  149. package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +0 -10
  150. package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +0 -11
  151. package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +0 -10329
  152. package/skills/wix-headless-fast/references/members/rest/auth.ts +0 -215
  153. package/skills/wix-headless-fast/references/members/rest/members.ts +0 -26
  154. package/skills/wix-headless-fast/references/members/seed/SEED.md +0 -39
  155. package/skills/wix-headless-fast/references/members/seed/read-site.mjs +0 -15
  156. package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +0 -94
  157. package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +0 -315
  158. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +0 -110
  159. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +0 -90
  160. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/GalleryMedia.tsx +0 -35
  161. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +0 -85
  162. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +0 -32
  163. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +0 -21
  164. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +0 -31
  165. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collection-projects-store.ts +0 -82
  166. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collections-store.ts +0 -58
  167. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio-core.ts +0 -177
  168. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +0 -78
  169. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/project-detail-store.ts +0 -81
  170. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +0 -55
  171. package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +0 -40
  172. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +0 -30
  173. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +0 -21
  174. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +0 -29
  175. package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +0 -10197
  176. package/skills/wix-headless-fast/references/portfolio/rest/portfolio.ts +0 -75
  177. package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +0 -86
  178. package/skills/wix-headless-fast/references/portfolio/seed/read-site.mjs +0 -20
  179. package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +0 -256
  180. package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +0 -296
  181. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +0 -47
  182. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +0 -101
  183. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +0 -41
  184. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +0 -16
  185. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +0 -22
  186. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +0 -54
  187. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-core.ts +0 -106
  188. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-store.ts +0 -64
  189. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +0 -27
  190. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase-core.ts +0 -43
  191. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +0 -22
  192. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +0 -30
  193. package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +0 -41
  194. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +0 -40
  195. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +0 -21
  196. package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +0 -11226
  197. package/skills/wix-headless-fast/references/pricing-plans/rest/plans.ts +0 -31
  198. package/skills/wix-headless-fast/references/pricing-plans/rest/purchase.ts +0 -20
  199. package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +0 -79
  200. package/skills/wix-headless-fast/references/pricing-plans/seed/read-site.mjs +0 -21
  201. package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +0 -279
  202. package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +0 -360
  203. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +0 -142
  204. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +0 -26
  205. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +0 -121
  206. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +0 -155
  207. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +0 -34
  208. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +0 -43
  209. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +0 -34
  210. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-core.ts +0 -155
  211. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-store.ts +0 -89
  212. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +0 -71
  213. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +0 -103
  214. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering-core.ts +0 -124
  215. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +0 -185
  216. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservation-store.ts +0 -193
  217. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations-core.ts +0 -94
  218. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +0 -74
  219. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +0 -168
  220. package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +0 -47
  221. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +0 -22
  222. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +0 -12
  223. package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +0 -12560
  224. package/skills/wix-headless-fast/references/restaurants/rest/menu.ts +0 -60
  225. package/skills/wix-headless-fast/references/restaurants/rest/ordering.ts +0 -169
  226. package/skills/wix-headless-fast/references/restaurants/rest/reservations.ts +0 -68
  227. package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +0 -89
  228. package/skills/wix-headless-fast/references/restaurants/seed/read-site.mjs +0 -25
  229. package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +0 -499
  230. package/skills/wix-headless-fast/references/shared/CONTENT.md +0 -22
  231. package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +0 -73
  232. package/skills/wix-headless-fast/references/shared/DESIGN.md +0 -26
  233. package/skills/wix-headless-fast/references/shared/SUPPLIED-CONTENT.md +0 -23
  234. package/skills/wix-headless-fast/references/shared/app/styles/global.css +0 -52
  235. package/skills/wix-headless-fast/references/shared/app/wix/config.ts +0 -15
  236. package/skills/wix-headless-fast/references/shared/app/wix/media.ts +0 -81
  237. package/skills/wix-headless-fast/references/shared/app/wix/money.ts +0 -24
  238. package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +0 -89
  239. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +0 -46
  240. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +0 -46
  241. package/skills/wix-headless-fast/references/shared/rest/client.ts +0 -155
  242. package/skills/wix-headless-fast/references/shared/rest/config.ts +0 -3
  243. package/skills/wix-headless-fast/references/shared/rest/media.ts +0 -65
  244. package/skills/wix-headless-fast/references/shared/seed/images.mjs +0 -145
  245. package/skills/wix-headless-fast/references/shared/seed/read-site.mjs +0 -99
  246. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +0 -612
  247. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +0 -26
  248. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +0 -155
  249. package/skills/wix-headless-fast/references/storefront/app/components/storefront/FilterPanel.tsx +0 -266
  250. package/skills/wix-headless-fast/references/storefront/app/components/storefront/OptionPicker.tsx +0 -95
  251. package/skills/wix-headless-fast/references/storefront/app/components/storefront/QuickAdd.tsx +0 -136
  252. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +0 -48
  253. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +0 -39
  254. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +0 -34
  255. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-core.ts +0 -121
  256. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +0 -107
  257. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +0 -138
  258. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog-core.ts +0 -314
  259. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +0 -133
  260. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/product-detail-store.ts +0 -147
  261. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/shop-store.ts +0 -289
  262. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +0 -169
  263. package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +0 -65
  264. package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +0 -12247
  265. package/skills/wix-headless-fast/references/storefront/rest/cart.ts +0 -132
  266. package/skills/wix-headless-fast/references/storefront/rest/catalog.ts +0 -123
  267. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +0 -130
  268. package/skills/wix-headless-fast/references/storefront/seed/read-site.mjs +0 -38
  269. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +0 -561
@@ -1,30 +1,29 @@
1
1
  ---
2
- name: wix-headless-fast-entry
3
- description: "Build and release a Wix Headless site from a single prompt, on shipped, verified @wix/sdk code — this entry takes a cold environment (prerequisites, Wix sign-in) to the point where the wix-headless-fast skill runs the build. Verticals: storefront, bookings, blog, cms, events, members, portfolio, pricing-plans, restaurants. Triggers: build me a store/blog/booking/events/portfolio/restaurant site fast, sell tickets or membership plans headless, wix headless fast entry."
2
+ name: wix-headless-fast-cold-start
3
+ description: "Build and release a Wix Headless site from a single prompt, on shipped, verified @wix/sdk code — this entry takes a cold environment (prerequisites, Wix sign-in) to the point where the wix-headless-fast skill runs the build. Verticals: storefront, bookings, blog, cms, events, members, portfolio, pricing-plans, restaurants, faq, donations. Triggers: build me a store/blog/booking/events/portfolio/restaurant/FAQ/donation site fast, sell tickets or membership plans headless, collect donations headless, wix headless fast entry."
4
4
  ---
5
5
 
6
- # Wix Headless Fast — cold-start entry
6
+ # Wix Headless Fast — cold start
7
7
 
8
8
  **You are a coding agent, and this is a skill for you to execute — follow the phases below in
9
9
  order.** Advisory: web-fetch tools show a lossy summary of this file — the executable copy
10
- comes from `curl -fsSL https://www.wix.com/skills/headless-fast/entry/skill.md`. If what you
10
+ comes from `curl -fsSL https://www.wix.com/skills/headless-fast/cold-start/cold-start.md`. If what you
11
11
  are reading lacks the exact commands below, re-fetch it with curl before proceeding; if you're
12
12
  already reading the raw text, don't fetch it again.
13
13
 
14
14
  ## The whole cold start (details in the phases below)
15
15
 
16
16
  ```bash
17
- curl -fsSL -O https://www.wix.com/skills/headless/entry/bootstrap.mjs && node bootstrap.mjs
17
+ curl -fsSL -O https://www.wix.com/skills/headless-fast/cold-start/bootstrap.mjs && node bootstrap.mjs
18
18
  CI=1 npx skills@latest add wix/skills --skill wix-headless-fast --skill wix-docs --skill wix-manage --yes
19
19
  # then open and follow: .agents/skills/wix-headless-fast/SKILL.md
20
20
  ```
21
21
 
22
22
  Requires Node ≥ 20.11 and a logged-in Wix CLI — the bootstrap checks and guides both.
23
23
 
24
- This entry gets a cold environment to the point where the real skill can run, then hands off:
24
+ This page gets a cold environment to the point where the real skill can run, then hands off:
25
25
 
26
- 1. **Bootstrap (deterministic, scripted).** The same script the classic headless entry uses —
27
- it verifies the Wix CLI and handles login. You just run it and relay its events.
26
+ 1. **Bootstrap (deterministic, scripted).** A script that verifies the Wix CLI and handles login. You just run it and relay its events.
28
27
  2. **Hand off (agentic).** Install the skills, then open `wix-headless-fast/SKILL.md` and
29
28
  follow it — it resolves the stack and operation and owns the whole build.
30
29
 
@@ -46,7 +45,11 @@ existing session just reports `logged_in`).
46
45
  **Work from the folder that holds the project, or that will.** For a **new** build: an empty folder
47
46
  is the project; if the current folder holds unrelated things, make one named for the business and
48
47
  `cd` into it. For **connect**, **iterate** and **existing site**: you are already in it — the
49
- project's root, where its `package.json` or `index.html` is. Everything below — the
48
+ project's root, where its `package.json` or `index.html` is. For a **project downloaded from Wix**
49
+ (the brief gives a zip URL or path, typically a site being migrated to headless): download it and
50
+ extract it into the working folder first, so that `wix.config.json` sits at the root, and work from
51
+ there — the skill reads the folder and knows what it is; do not create a site, install apps or seed.
52
+ Everything below — the
50
53
  bootstrap, the skills, the scaffold — lands in this folder, so a later session opened in the project
51
54
  finds all of it.
52
55
 
@@ -70,9 +73,9 @@ externally-downloaded code.
70
73
 
71
74
  ```bash
72
75
  # macOS/Linux:
73
- curl -fsSL -O https://www.wix.com/skills/headless/entry/bootstrap.mjs
76
+ curl -fsSL -O https://www.wix.com/skills/headless-fast/cold-start/bootstrap.mjs
74
77
  # Windows PowerShell:
75
- iwr https://www.wix.com/skills/headless/entry/bootstrap.mjs -OutFile bootstrap.mjs
78
+ iwr https://www.wix.com/skills/headless-fast/cold-start/bootstrap.mjs -OutFile bootstrap.mjs
76
79
 
77
80
  node bootstrap.mjs
78
81
  ```
@@ -108,10 +111,10 @@ CI=1 npx skills@latest add wix/skills \
108
111
  They land under `.agents/skills/`. Then **open
109
112
  `.agents/skills/wix-headless-fast/SKILL.md` and follow it** — it owns the rest of the run:
110
113
  resolve the stack, scaffold, deploy the shipped code, seed, build the brand layer, release.
111
- (If the request needs a vertical the skill doesn't ship yet — see its SKILL.md § Verticals —
112
- say so plainly and point the user at the `wix-headless` skill instead of improvising.)
114
+ (A request outside the shipped verticals — see its SKILL.md § Verticals — is built from the Wix
115
+ API reference through `wix-docs`, on the same project; SKILL.md says how.)
113
116
 
114
117
  - **Don't** scaffold, install apps, or seed by hand here — the skill does all of that. This
115
- entry stops at *logged in*.
118
+ page stops at *logged in*.
116
119
  - You're already authenticated from Phase 1, so the skill's CLI auth step will pass without
117
120
  prompting again.
@@ -0,0 +1,78 @@
1
+ # An existing site: a new frontend for a site that already has its content
2
+
3
+ Read when the brief names a Wix site by its id. Nothing here is seeded: the site owns its content
4
+ and the frontend reads it live. (A project downloaded from Wix whose `.env.local` declares a
5
+ migration is the other way to arrive at an existing site: `guides/migration.md`; the reading
6
+ part below applies there too, against the migrated site.) `<SKILL_ROOT>` is the installed skill folder; the shipped code is
7
+ under `<SKILL_ROOT>/templates/` (SKILL.md, "The run").
8
+
9
+ **Read the site, then run attach.** First, one call tells you what
10
+ the site is — its name, currency, and the Wix apps installed on it:
11
+
12
+ ```bash
13
+ curl -sS -X POST 'https://www.wixapis.com/_api/dynamic-context/v1/dynamic-context/markdown' \
14
+ -H "Authorization: $(npx -y @wix/cli@latest token)" -H 'Content-Type: application/json' \
15
+ -d '{"siteId": "<siteId>"}'
16
+ ```
17
+
18
+ The installed apps name the verticals (Wix Stores → storefront, Wix Bookings → bookings, and
19
+ so on per the Verticals table); the brief picks among them. Then one deterministic call, same
20
+ shape as setup (SKILL.md step 3):
21
+
22
+ ```bash
23
+ node <SKILL_ROOT>/install/attach.mjs --site <siteId> --business-name "<site name>" --vertical <vertical>[,<vertical>]
24
+ ```
25
+
26
+ `init`/`wix create` always create a site, so they are not used here. attach does what they do
27
+ after creating one — the site's OAuth app, Wix hosting, `wix.config.json` — against the site
28
+ given, copies the first vertical's composed template, deploys the rest, and starts the install
29
+ detached. No seed runs and nothing on the site changes: the content is the site's own, read
30
+ live through the deployed data layer. `attached` also says whether a frontend is already
31
+ serving at the site's address (`frontend.serving`, with the release date). When it is, a
32
+ `wix release` from this project replaces it — the old deployment keeps its own address and
33
+ production can be pointed back, but the user's site changes. Tell the user before you release,
34
+ with the address and the date; if the brief did not ask for a new frontend, ask first and
35
+ wait. Say it again when you close.
36
+
37
+ **Get the measure of the site before you design.** Enough to know what you are building
38
+ for: what the chosen verticals will render, roughly how much of it, and what it is like —
39
+ six items in three groups design differently from six hundred. Run the vertical's reader:
40
+
41
+ ```bash
42
+ node <SKILL_ROOT>/templates/<vertical>/seed/read-site.mjs --site <siteId> [--limit <n>]
43
+ ```
44
+
45
+ It prints one JSON: whether the vertical's app is installed, counts, one page of each entity
46
+ with the fields the pages render, and `calls`, the requests it made with their documentation
47
+ URLs. The lists are one page; the counts are the site.
48
+
49
+ When the brief needs a read the script does not make, it is a build-time call with the
50
+ **site's** token, sent raw as the `Authorization` header (the account token from the call
51
+ above does not scope to a site), minted inline in each command —
52
+ `-H "Authorization: $(npx -y @wix/cli@latest token --site <siteId>)"` — and never written to
53
+ a file, not in the project and not in `/tmp`.
54
+ **The rule above applies in full: not one of these calls comes from memory.** Read the
55
+ request where it is written, then call. Where to read, in this order:
56
+ - **The reader**, `templates/<vertical>/seed/read-site.mjs` — the reads the pages make, as
57
+ literal calls with their documentation URLs.
58
+ - **`wix-manage`**, at `.agents/skills/wix-manage/` — REST recipes for managing a site's
59
+ business solutions: exact endpoint, method and payload per operation, curl included. Its
60
+ SKILL.md is the index, by solution; open the recipe for the vertical's solution.
61
+ - **`wix-docs`**, at `.agents/skills/wix-docs/` — the Wix API reference, reached by
62
+ **search, not by browsing files**: the skill folder holds the how-to, not the pages. Open
63
+ its SKILL.md; it gives one `curl` to semantic search (`POST
64
+ /mcp-docs-search/v1/docs/search/markdown`, natural-language `search_term`) that returns
65
+ condensed method docs — endpoint, request example, response shape — and the rule that any
66
+ `dev.wix.com/docs/…` URL plus `.md` is the full page. Progressive: search first, read the
67
+ full document only when the hit lacks what you need.
68
+ If what you opened does not have the call, go to the next; do not try a variant, and do not
69
+ build one from a call you did find: the path and body you send are copied from the output
70
+ you read or they are not sent.
71
+
72
+ **In a folder that already holds a project** (a `package.json` or `index.html`, no
73
+ `wix.config.json`), attach writes the config into it and deploys for `--stack` instead of
74
+ scaffolding; pass the stack resolved in SKILL.md step 1. **A frontend that will be hosted
75
+ elsewhere** (Vercel, your own server) runs attach with `--hosting self --origin <url>[,<url>]`: no
76
+ Wix hosting is created, and the origins go on the OAuth app's allow-list so checkout can return
77
+ to them; add the public origin when it goes live. Then SKILL.md steps 4 and 5 as for any run,
78
+ with the install marker the only one to wait on.
@@ -0,0 +1,43 @@
1
+ # A migration preview: a site being moved to headless
2
+
3
+ Read when setup reports `mode: "migrate"`, or when a folder holds a `wix.config.json` and
4
+ `node <SKILL_ROOT>/install/context.mjs` prints `migration.active: true`. The brief usually arrives
5
+ as a project to download from Wix (a zip with the config), the names of the apps the site already
6
+ has, and a request not to probe, install or seed anything.
7
+
8
+ **Two sites, one project.** `wix.config.json` names a site created only to host the deployment:
9
+ `wix release` goes there and nowhere else. `.env.local` (what `wix env pull` writes; setup and
10
+ `context.mjs` pull it when it is missing) carries the credentials of the site being migrated, the
11
+ **parent**, and says so. The parent owns everything the pages show and everything the business
12
+ manages. So:
13
+
14
+ - **The SDK client is the parent's.** The Astro integration reads `WIX_CLIENT_ID` from the env and
15
+ never the config; `deploy.mjs` copies the same value into `src/wix/config.ts` (react, lib) and
16
+ `js/wix/config.js` (static). Nothing in the data layer is told about the migration; it reads the
17
+ parent because its client is the parent's app.
18
+ - **Admin, discovery and seed calls target the parent.** `read-site.mjs` and the seeds resolve the
19
+ site through `templates/shared/seed/site-context.mjs`; `wix-manage` recipes and any raw call take
20
+ `--site <parentSiteId>` (the `siteId` of the `ready_for_brand_layer` event). The dashboard link
21
+ is the parent's.
22
+ - **Nothing is seeded, nothing installed.** The parent is a live site with its content; a seed
23
+ would write into the original. The seeds refuse on a preview unless run with `--allow-parent`,
24
+ which is the user's explicit decision, never a default. Apps are not installed: the brief names
25
+ what the site has, and the verticals follow from that list (Wix Stores → storefront, Wix
26
+ Bookings → bookings, Wix Forms → forms, and so on per the Verticals table; Wix Pro Gallery and
27
+ Wix Members Area map to portfolio and members). When the brief allows reading, the vertical's
28
+ `read-site.mjs` sizes the content as in `guides/existing-site.md`; when it says not to probe,
29
+ design from the brief.
30
+
31
+ **The run.** `setup.mjs --vertical <vertical> [--stack <stack>]` in the folder: it copies the
32
+ vertical's composed template around the config (managed Astro), deploys the code, starts the
33
+ install, writes the project's AGENTS.md with the migration recorded, and skips the seed. Then
34
+ SKILL.md steps 4 and 5 as for any run. `attach.mjs` refuses a migration folder on purpose: the
35
+ app, hosting and credentials came with the download; nothing is provisioned or re-pointed.
36
+
37
+ **The close.** The release is a **preview** on the deploy site. Close with the preview URL (copied
38
+ from the `wix release` output), the parent's dashboard link, and the two facts: the original site
39
+ is unchanged, and completing the migration, which makes the parent serve this frontend and retires
40
+ the deploy site, is the user's next step in the Wix CLI once they approve the preview. That
41
+ command is not part of this skill; do not invent one, do not run `wix release` against the parent,
42
+ and do not edit `wix.config.json`. On every stack the code already carries the parent's client id,
43
+ so completion needs no redeploy from here.
@@ -0,0 +1,100 @@
1
+ # Reference mode: a static site, or a server-rendered app in another language
2
+
3
+ Read when SKILL.md step 1 resolves to a stack that cannot run `app/`. `<SKILL_ROOT>` is the
4
+ installed skill folder; the shipped code is under `<SKILL_ROOT>/templates/`. Steps 2 to 5 of
5
+ SKILL.md still apply; this file is the mechanics that differ.
6
+
7
+ The data layer ships a second time as a **REST layer**: `templates/shared/rest/` (the auth seam
8
+ `client.ts`, `media.ts`, `config.ts`) and `templates/<vertical>/rest/` (the same exports as the
9
+ vertical's `app/wix/<vertical>/` data layer, over `fetch`), typed against the same `types.ts` and
10
+ importing the same `*-core.ts` rule files as the SDK layer — one implementation of the rules, two
11
+ transports. The vertical's `INSTRUCTIONS.md` names its modules and what each surface does with
12
+ them; this section is the mechanics, the same for every vertical. The site-search capability
13
+ (`templates/shared/capabilities/site-search/`, on from `plan.capabilities.siteSearch`) has the same
14
+ two transports: with `--plan` its REST twin and stores land in `js/wix/` beside the vertical's
15
+ (`search.js`, `search-store.js`, `suggest-store.js`), and its `INSTRUCTIONS.md` applies.
16
+
17
+ - **Static site (no bundler).** Step 3's setup with `--stack static` runs `init` in the project
18
+ folder (site, OAuth app, `wix.config.json`), points `site.outputDirectory` at `"./site"`, and
19
+ runs `deploy.mjs <vertical> --stack static --out site`, which composes the REST layer and the
20
+ vertical's framework-free stores flat into `site/js/wix/` and strips them to browser ESM
21
+ (comments kept, the `.ts` kept beside the `.js` to read). The site lives in that **subfolder**,
22
+ `site/`, holding only the pages, styles, assets and `js/`: `wix release` uploads it whole, so the
23
+ project root (config, `plan.json`, seed output, the skills) must not be it; move the pages in.
24
+ (On a project that already has its config, the same `deploy.mjs` call does the deploy.) Pages
25
+ import the vertical's modules from `./js/wix/` in a `<script type="module">`: the stores hold
26
+ the state machines (subscribe, render from `getState()`, call actions), the page holds the
27
+ rendering. The visitor token lives in `localStorage` and is the
28
+ visitor's identity across Wix — never mint one per page. A route is a page plus a query-string
29
+ slug (`item.html?slug=…`). Wix static hosting serves files, not directories: `/shop` does not
30
+ resolve to `shop/index.html`, and there is no routes configuration — name the file and link
31
+ to it. Seed per the vertical's `SEED.md` (Node + the CLI token, no project dependencies).
32
+ Release with `npx @wix/cli@latest release` — no build. Item-page tags come from the entity's
33
+ `seoData`, set after the fetch (`document.title`, the meta description).
34
+ - **Server-rendered, another language (Flask, Laravel, Rails, …).** The same shape as managed
35
+ Astro — pages rendered on the server, the interactive surfaces in the browser — with hosting and
36
+ SEO plumbing theirs. `init` still runs in the project folder; run `deploy.mjs <vertical> --stack
37
+ static` there too: it only needs `wix.config.json` and writes `js/wix/`. Split by where the call
38
+ runs:
39
+ - **Reads render on the server.** Port the vertical's `rest/` read module and its `*-core.ts` to
40
+ the server language: each function is one HTTP call with a literal URL and JSON body, and the
41
+ core carries the rules. That code is tested and proven against live sites — carry its bodies
42
+ over as they are, `fields` arrays and filter keys included (they are not guessable, and a
43
+ near-miss returns empty or unformatted data with no error), and render what Wix returns
44
+ (`formattedAmount`, never a number you format yourself). The shipped JS runs: when in doubt,
45
+ run the module with Node against the same site and compare one entity with your port. Public
46
+ reads need no visitor identity — one anonymous visitor token per server process, refreshed per
47
+ `client.ts`, is enough for them.
48
+ - **Visitor-specific state runs in the browser.** Whatever the vertical does on the visitor's
49
+ behalf (a store's cart and checkout, a booking, an RSVP, a form submit) loads the vertical's
50
+ `js/wix/` module in the templates and talks to Wix from the page, exactly as a static site
51
+ does: the browser owns the visitor token in `localStorage`, so the server handles no
52
+ per-visitor tokens. If that state must run server-side anyway, `client.ts`'s header applies:
53
+ one token set per visitor in the visitor's session, never one process-wide token (that is one
54
+ identity shared by everyone).
55
+ - **A Wix-hosted flow returns to the origin that started it, and only to one it knows.**
56
+ Checkout, a booking payment, a plan purchase all open on Wix and come back to your server;
57
+ the return works only for an origin on the site's OAuth app allow-list. Add the server's
58
+ origin — the dev one while verifying (`http://localhost:<port>`), the public https one when it
59
+ goes live — before the first checkout test: wix-manage's *Manage OAuth Apps* recipe, "Update an
60
+ OAuth App", field `allowedRedirectDomains`, on the app whose id is `appId` in
61
+ `wix.config.json`. Without it the Wix page opens and cannot return. Do it; do not only say it.
62
+ - **Pre-rendered → Wix-hosted.** If the project builds to static HTML (Frozen-Flask, Pelican,
63
+ Hugo, Eleventy, any static-site generator), Wix can host the output: run `deploy.mjs
64
+ <vertical> --stack static --out <build dir>` so `js/wix/` lands inside the build output (or
65
+ copy it there after each build), make the generator emit a page for **every** entity slug the
66
+ vertical's list read returns (walk it by cursor, never only the first page), point
67
+ `site.outputDirectory` at the build folder, `wix release`. The build's own reads use one
68
+ anonymous visitor token for the duration of the build. What Wix hosts is exactly the contents
69
+ of that folder after your last build, served as files: every asset a page references must be
70
+ in there and current — if the pipeline has more than one build step (templates, then a CSS or
71
+ asset bundle), they all run, in order, on every rebuild, or the release carries a stale piece.
72
+ a clean path does not resolve to a folder's `index.html`; name the file and link to it. Generated pages
73
+ sit at different depths, so reference `js/wix/` through one base path (a template variable,
74
+ or root-relative `/js/wix/…`), never `./js/wix/` — a relative path breaks one level down. **The generated page
75
+ is the first paint, not the whole surface**: the vertical's interactive behaviour (a store's
76
+ sort, filters, and cart; a blog's search; a booking flow) still runs client-side on top of it
77
+ from the same `js/wix/` modules, so the vertical's surface contracts in `INSTRUCTIONS.md`
78
+ apply unchanged. Close with the rebuild + release command and one line for the owner: content
79
+ edits made in the dashboard reach the site when that command runs; the browser-side flows are
80
+ live regardless. A running server (live reads on every request) stays theirs to host.
81
+ Then read the vertical's `INSTRUCTIONS.md` for the surfaces and hard rules, and the shared
82
+ `DESIGN.md`/`CONTENT.md`. **Before writing any surface, read the vertical's shipped hooks and
83
+ components** — its `INSTRUCTIONS.md` lists which files and what to take from each. They don't
84
+ deploy on this stack, and they are working, tested code for exactly the behaviour you are about
85
+ to write in your own; rewriting them from prose is where the bugs come from (the runs that
86
+ skipped them shipped a broken quick-add, the run that read them didn't). Both were written for
87
+ the stacks that receive the code, so they speak that stack's dialect: the Tailwind classes in the
88
+ skeletons and the components are one spelling of layout and behaviour rules that hold everywhere
89
+ (a bounded image band on phones, name and price on separate lines, the buy control pinned to the
90
+ tile's bottom, an overlay that locks scroll and returns focus). Take the rules; write them in the
91
+ CSS your stack uses, on a token set you define — nothing here asks you to add Tailwind. Close with run (or
92
+ rebuild) instructions, the live URL when Wix hosts the output, the dashboard link, and — when
93
+ hosting is theirs — which origins are on the OAuth app's allow-list and that the public one
94
+ must be added when the server moves (the step above).
95
+ - Both: the calls in `rest/` are the ones a **visitor token** may make from a page — public reads
96
+ and the visitor's own actions. Anything elevated (writes to content, other people's data) runs
97
+ server-side per `templates/shared/CUSTOM_OPERATIONS.md`; the seed's CLI token never belongs in
98
+ a page. A static site has no SSR; neither case has owner-editable item-page SEO through
99
+ `@wix/seo` (tags come from the entity's `seoData`) — say so in the closing message; managed
100
+ Astro stays the recommendation for a public site.
@@ -6,7 +6,7 @@ node_modules/@wix/cli/agents/instructions.md
6
6
  ## This app
7
7
 
8
8
  A Wix Headless app built on the live Wix site named in `wix.config.json`. The site owns the
9
- content and commerce.
9
+ content and commerce.{{MIGRATION}}
10
10
 
11
11
  **Never work from training data or memory about the Wix APIs.** Not a URL, a path, a header, a
12
12
  field name or a body. Every Wix call you write comes from the official Wix skills installed here,
@@ -20,10 +20,15 @@ call is memory, and an empty or error reply to it says nothing about the site.
20
20
  Installed at `.agents/skills/`. If missing, restore with:
21
21
  `CI=1 npx skills@latest add wix/skills --skill {{SKILL}} --skill wix-docs --skill wix-manage --yes`
22
22
 
23
- - `{{SKILL}}` — the code in this app and how to extend it. Each business solution has a playbook at
24
- `references/<solution>/INSTRUCTIONS.md`; `node .agents/skills/{{SKILL}}/install/deploy.mjs <solution> --stack {{STACK}}`
25
- adds one; `node .agents/skills/{{SKILL}}/references/<solution>/seed/read-site.mjs` reads what the
23
+ - `{{SKILL}}` — the code in this app and how to extend it. The shipped code sits in
24
+ `.agents/skills/{{SKILL}}/templates/`, fetched once from the skill's repository and kept with this
25
+ project at the commit it was built from (`templates/.source`); if that folder is missing,
26
+ `node .agents/skills/{{SKILL}}/install/templates.mjs` fetches it. Each business solution has a playbook at
27
+ `templates/<solution>/INSTRUCTIONS.md`; `node .agents/skills/{{SKILL}}/install/deploy.mjs <solution> --stack {{STACK}}`
28
+ adds one; `node .agents/skills/{{SKILL}}/templates/<solution>/seed/read-site.mjs` reads what the
26
29
  site holds for it, with the documentation URL of every call it made. A code change ends with a release; the live URL shows it, the dev server does not count.
30
+ `node .agents/skills/{{SKILL}}/install/check.mjs` says whether the skill or its templates have a newer
31
+ version and prints the update commands; an update touches the skill folder or `templates/`, never `src/`.
27
32
  - `wix-docs` — how to discover the Wix APIs and their docs: search first, then read only the page
28
33
  you need. Every endpoint, body, field and enum you did not get from the deployed code or a recipe
29
34
  is confirmed there before you write it.
@@ -21,7 +21,11 @@ export function writeAgentsMd(projectDir, vars) {
21
21
  const agents = join(projectDir, "AGENTS.md");
22
22
  if (existsSync(agents)) kept.push("AGENTS.md");
23
23
  else {
24
- const text = readFileSync(TEMPLATE, "utf8").replace(/\{\{(\w+)\}\}/g, (_, k) => vars[k.toLowerCase()] ?? "");
24
+ // {{MIGRATION}} is a paragraph on a migration preview (vars.migration = { parentSiteId, deploySiteId }), else nothing.
25
+ const migration = vars.migration
26
+ ? `\n\n**Under migration.** \`wix.config.json\` names site ${vars.migration.deploySiteId}, which only hosts this deployment; the site being migrated is ${vars.migration.parentSiteId} — its content is what the pages show and its dashboard (\`https://manage.wix.com/dashboard/${vars.migration.parentSiteId}\`) is where the business is managed. \`.env.local\` (\`wix env pull\`) carries that site's app: the SDK client and every admin, discovery and seed call run against it; only \`wix release\` goes to the deploy site. Completing the migration is a separate Wix CLI step, run by the user after approving the preview.`
27
+ : "";
28
+ const text = readFileSync(TEMPLATE, "utf8").replace(/\{\{(\w+)\}\}/g, (_, k) => (k === "MIGRATION" ? migration : (vars[k.toLowerCase()] ?? "")));
25
29
  writeFileSync(agents, text); written.push("AGENTS.md");
26
30
  }
27
31
  const claude = join(projectDir, "CLAUDE.md");
@@ -21,8 +21,8 @@
21
21
  // --business-name the site's name (names the folder, the hosting slug and the app project).
22
22
  // --vertical which shipped code deploys (no seed runs — the site owns its content). Both are
23
23
  // the caller's decision, read off the site before calling this (SKILL.md step 3).
24
- // --stack astro (default) in a folder without a project: scaffolds the CLI's blank Astro
25
- // template with the hosting adapter. react|static there: writes wix.config.json
24
+ // --stack astro (default) in a folder without a project: copies the first vertical's
25
+ // composed template (templates/<vertical>/project). react|static there: writes wix.config.json
26
26
  // and stops — the caller scaffolds (Vite / plain HTML) per SKILL.md. In a folder
27
27
  // that holds a project, --stack is required and nothing is scaffolded.
28
28
  //
@@ -41,18 +41,20 @@
41
41
  // ready_for_brand_layer, or error). Requires a logged-in Wix CLI (`npx @wix/cli@latest whoami`)
42
42
  // whose account owns or co-manages the site.
43
43
  import { spawn, spawnSync, execFileSync } from "node:child_process";
44
- import { cpSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
45
- import { tmpdir } from "node:os";
44
+ import { cpSync, existsSync, mkdirSync, openSync, readFileSync, writeFileSync } from "node:fs";
46
45
  import { basename, dirname, join, resolve } from "node:path";
47
46
  import { fileURLToPath } from "node:url";
48
47
  import { writeAgentsMd } from "./agents-md.mjs";
48
+ import { siteContext } from "./context.mjs";
49
+ import { listVerticals, templatesDir } from "./templates.mjs";
49
50
 
50
51
  const SKILL_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..");
51
52
  const MANAGE = "https://manage.wix.com";
52
53
  const API = "https://www.wixapis.com";
53
54
  const HEADLESS_PROJECT_TYPE_ID = "eb363dea-85a0-4159-9b05-949542be5079";
54
- const TEMPLATES_REPO = "https://github.com/wix/headless-templates.git";
55
- const TEMPLATE_PATH = "astro/blank";
55
+ // The shipped code: the repository's templates/ (a checkout, the cache, or fetched now, in a second).
56
+ let TEMPLATES;
57
+ try { TEMPLATES = templatesDir(); } catch (e) { fail("templates", e.message); }
56
58
 
57
59
  const emit = (event, extra = {}) => console.log(JSON.stringify({ event, ...extra }));
58
60
  const fail = (step, detail) => {
@@ -75,11 +77,18 @@ const cwd = process.cwd();
75
77
  const has = (p) => existsSync(join(cwd, p));
76
78
  const cwdConfig = has("wix.config.json") ? JSON.parse(readFileSync(join(cwd, "wix.config.json"), "utf8")) : null;
77
79
  const hasProject = has("package.json") || has("index.html");
80
+ // A migration preview (wix.config.json names a deploy-only site, .env.local names the site being
81
+ // migrated) is already provisioned: its app, hosting and credentials came with the folder. Nothing
82
+ // here applies — setup.mjs takes it (SKILL.md step 3).
83
+ if (cwdConfig) {
84
+ const ctx = siteContext({ cwd });
85
+ if (ctx.migration.active) {
86
+ fail("place", `this folder deploys a migration preview of site ${ctx.migration.parentSiteId} (deploy site ${ctx.deploy.siteId}): the app and hosting are provisioned already — run setup.mjs --vertical <vertical> [--stack <stack>] here instead; nothing is attached or re-pointed`);
87
+ }
88
+ }
78
89
  const siteId = flag("site") ?? cwdConfig?.siteId ?? cwdConfig?.projectId ?? null;
79
90
  const stack = stackFlag ?? "astro";
80
- const knownVerticals = readdirSync(join(SKILL_ROOT, "references"), { withFileTypes: true })
81
- .filter((d) => d.isDirectory() && d.name !== "shared" && existsSync(join(SKILL_ROOT, "references", d.name, "app")))
82
- .map((d) => d.name);
91
+ const knownVerticals = listVerticals(TEMPLATES);
83
92
  const verticals = argv
84
93
  .flatMap((a, i) => (a === "--vertical" && argv[i + 1] ? argv[i + 1].split(",") : []))
85
94
  .map((v) => v.trim())
@@ -246,46 +255,15 @@ emit("attached", { siteId, appId, baseUrl, hosting, frontend, origins: hosting0
246
255
  // ---- 2 · scaffold (only where there is no project) -------------------------------------------------
247
256
  mkdirSync(projectDir, { recursive: true });
248
257
  if (stack === "astro" && mode === "scaffold") {
249
- // The CLI's own blank template (what `wix create` copies), then what its extender adds: the
250
- // hosting adapter, React islands, the `wix` scripts. Pinned like a freshly created project.
251
- const tmp = mkdtempSync(join(tmpdir(), "wix-template-"));
252
- const clone = spawnSync("git", ["clone", "--quiet", "--depth", "1", "--filter=blob:none", "--sparse", TEMPLATES_REPO, tmp], { encoding: "utf8", timeout: 120_000 });
253
- if (clone.status !== 0) fail("scaffold", clone.stderr || "git clone of the template repo failed");
254
- const sparse = spawnSync("git", ["-C", tmp, "sparse-checkout", "set", TEMPLATE_PATH], { encoding: "utf8", timeout: 60_000 });
255
- if (sparse.status !== 0 || !existsSync(join(tmp, TEMPLATE_PATH, "package.json"))) fail("scaffold", sparse.stderr || `template ${TEMPLATE_PATH} not found in ${TEMPLATES_REPO}`);
256
- cpSync(join(tmp, TEMPLATE_PATH), projectDir, { recursive: true, force: false, errorOnExist: false });
257
- rmSync(tmp, { recursive: true, force: true });
258
+ // The first vertical's composed template: the CLI's blank scaffold with the vertical deployed
259
+ // and its lockfile, the same folder `wix create --template-path` copies for a new site. Copied
260
+ // here because the CLI's create makes a new site and this folder gets an existing one. Further
261
+ // verticals are deployed below.
262
+ cpSync(join(templatesDir({ need: `${verticals[0]}/project` }), verticals[0], "project"), projectDir, { recursive: true, force: false, errorOnExist: false });
258
263
  const pkgPath = join(projectDir, "package.json");
259
264
  const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
260
265
  pkg.name = folderName;
261
- pkg.scripts = { astro: "astro", dev: "wix dev", build: "wix build", wix: "wix", preview: "wix preview", release: "wix release", generate: "wix generate", env: "wix env", skills: "wix skills" };
262
- pkg.devDependencies = {
263
- ...(pkg.devDependencies ?? {}),
264
- "@astrojs/react": "^4.3.0",
265
- "@types/react": "^18.3.1",
266
- "@types/react-dom": "^18.3.1",
267
- "@wix/cli": "^1.1.92",
268
- "@wix/astro-wix-hosting-adapter": "^2.0.0",
269
- react: "18.3.1",
270
- "react-dom": "18.3.1",
271
- };
272
266
  writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
273
- writeFileSync(join(projectDir, "astro.config.mjs"), `// @ts-check
274
- import { defineConfig } from "astro/config";
275
- import wix from "@wix/astro";
276
- import wixPages from "@wix/astro-pages";
277
- import react from "@astrojs/react";
278
- import wixHostingAdapter from "@wix/astro-wix-hosting-adapter";
279
-
280
- // https://astro.build/config
281
- export default defineConfig({
282
- integrations: [wix(), wixPages(), react()],
283
- security: { checkOrigin: false },
284
- adapter: wixHostingAdapter(),
285
- image: { domains: ["static.wixstatic.com"] },
286
- output: "server",
287
- });
288
- `);
289
267
  const gi = join(projectDir, ".gitignore");
290
268
  const cur = existsSync(gi) ? readFileSync(gi, "utf8") : "";
291
269
  if (!/\.env/.test(cur)) writeFileSync(gi, cur + "\n# local env (pulled from Wix)\n.env.local\n.env\n");
@@ -302,7 +280,7 @@ writeFileSync(join(projectDir, ".env.local"), [
302
280
  `WIX_CLIENT_SECRET=${quote(secrets.appSecret)}`,
303
281
  "",
304
282
  ].join("\n"));
305
- emit(mode === "link" ? "linked" : mode === "config-only" ? "configured" : "scaffolded", { folder: folderName, stack, template: mode === "scaffold" && stack === "astro" ? `${TEMPLATES_REPO}#${TEMPLATE_PATH}` : null });
283
+ emit(mode === "link" ? "linked" : mode === "config-only" ? "configured" : "scaffolded", { folder: folderName, stack, template: mode === "scaffold" && stack === "astro" ? join(TEMPLATES, verticals[0], "project") : null });
306
284
  // the agent config files `wix create` writes (attach never runs the CLI's scaffold at all); fill-only
307
285
  emit("agent_configs", writeAgentsMd(projectDir, { skill: basename(SKILL_ROOT), stack }));
308
286
 
@@ -313,7 +291,7 @@ if (mode !== "link" && (stack !== "astro" || mode === "config-only")) {
313
291
  process.exit(0);
314
292
  }
315
293
 
316
- // ---- 3 · deploy shipped code + deps + lockfile ---------------------------------------------------
294
+ // ---- 3 · deploy shipped code + deps (adds nothing to a scaffold from the template) --------------
317
295
  let deployResult = {};
318
296
  {
319
297
  const deploy = spawnSync("node", [join(SKILL_ROOT, "install", "deploy.mjs"), ...verticals, "--stack", stack], { cwd: projectDir, encoding: "utf8", timeout: 60_000 });
@@ -0,0 +1,87 @@
1
+ // Is there a newer version? Read-only: compares this installed skill and its templates with the
2
+ // repository they came from and prints one JSON. It changes nothing and runs no update; the
3
+ // commands that would are in the output.
4
+ //
5
+ // node <SKILL_ROOT>/install/check.mjs
6
+ //
7
+ // Two layers, two answers:
8
+ // skill the installed skill folder (SKILL.md, guides/, install/, cold-start/) against the
9
+ // repository head: `current`, `behind` (with the files that differ), or `unknown`.
10
+ // templates `templates/.source` commit against the head: `current` or `behind`, with the
11
+ // verticals touched and the commit messages in between.
12
+ // Updating the skill changes how the agent works, not the project. Refreshing the templates changes
13
+ // what future deploys copy and what the agent reads, not `src/`. Nothing here touches `src/`.
14
+ import { mkdtempSync, readdirSync, rmSync } from "node:fs";
15
+ import { tmpdir } from "node:os";
16
+ import { join, relative } from "node:path";
17
+ import { spawnSync } from "node:child_process";
18
+ import { SKILL_ROOT, installSource, templatesDir, templatesSource } from "./templates.mjs";
19
+
20
+ const git = (args, opts = {}) => spawnSync("git", args, { encoding: "utf8", timeout: 120_000, ...opts });
21
+ const skillName = SKILL_ROOT.split("/").pop();
22
+ const { repo } = installSource();
23
+
24
+ const out = { skill: {}, templates: {}, update: {} };
25
+
26
+ // ---- the repository: one clone of its history without file contents (small), read for both layers
27
+ const tmp = mkdtempSync(join(tmpdir(), "wix-headless-fast-check-"));
28
+ const clone = git(["clone", "--quiet", "--filter=blob:none", "--no-checkout", "--single-branch", repo, tmp]);
29
+ if (clone.status !== 0) {
30
+ rmSync(tmp, { recursive: true, force: true });
31
+ console.log(JSON.stringify({ error: `could not reach ${repo}: ${(clone.stderr || "").trim().slice(-200)}` }));
32
+ process.exit(1);
33
+ }
34
+ const head = git(["-C", tmp, "rev-parse", "HEAD"]).stdout.trim();
35
+
36
+ // ---- skill folder: every installed file's blob hash against the head's tree -------------------
37
+ {
38
+ const tree = git(["-C", tmp, "ls-tree", "-r", head, "--", `skills/${skillName}`]).stdout;
39
+ const remote = new Map(tree.split("\n").filter(Boolean).map((l) => { const [meta, path] = l.split("\t"); return [path.slice(`skills/${skillName}/`.length), meta.split(" ")[2]]; }));
40
+ const local = [];
41
+ const walk = (dir) => {
42
+ for (const e of readdirSync(dir, { withFileTypes: true })) {
43
+ const p = join(dir, e.name);
44
+ if (e.name === "templates" && dir === SKILL_ROOT) continue; // the templates are the other layer
45
+ if (e.isDirectory()) walk(p); else local.push(relative(SKILL_ROOT, p));
46
+ }
47
+ };
48
+ walk(SKILL_ROOT);
49
+ const differs = [], missingHere = [];
50
+ for (const f of local) if (remote.get(f) !== git(["hash-object", join(SKILL_ROOT, f)]).stdout.trim()) differs.push(f);
51
+ for (const f of remote.keys()) if (!local.includes(f)) missingHere.push(f);
52
+ out.skill = differs.length || missingHere.length
53
+ ? { status: "behind", differs, ...(missingHere.length ? { missingHere } : {}), note: "a file that differs may also be one edited here; the update reinstalls the skill folder" }
54
+ : { status: "current" };
55
+ }
56
+
57
+ // ---- templates: the recorded commit against the head ------------------------------------------
58
+ let dir = null;
59
+ try { dir = templatesDir(); } catch (e) { out.templates = { status: "unknown", detail: e.message }; }
60
+ if (dir) {
61
+ const src = templatesSource(dir);
62
+ if (src.checkout) out.templates = { status: "checkout", dir };
63
+ else if (!src.commit) out.templates = { status: "unknown", detail: "no commit recorded in templates/.source" };
64
+ else if (src.commit === head) out.templates = { status: "current", commit: src.commit };
65
+ else {
66
+ out.templates = { status: "behind", commit: src.commit, head };
67
+ const files = git(["-C", tmp, "diff", "--name-only", `${src.commit}..${head}`, "--", "templates"]).stdout.split("\n").filter(Boolean);
68
+ const log = git(["-C", tmp, "log", "--format=%s", `${src.commit}..${head}`, "--", "templates"]).stdout.split("\n").filter(Boolean);
69
+ if (files.length || log.length) {
70
+ out.templates.commitsBehind = log.length;
71
+ out.templates.verticals = [...new Set(files.map((f) => f.split("/")[1]).filter((v) => v && !v.endsWith(".mjs")))].sort();
72
+ out.templates.commits = log.slice(0, 20);
73
+ } else {
74
+ out.templates.detail = git(["-C", tmp, "cat-file", "-e", src.commit]).status === 0 ? "no template changes between the two commits" : "the recorded commit is not in the repository's history (a branch that was deleted?)";
75
+ }
76
+ }
77
+ }
78
+ rmSync(tmp, { recursive: true, force: true });
79
+
80
+ // ---- what would act on each ------------------------------------------------------------------
81
+ const rel = relative(process.cwd(), SKILL_ROOT) || ".";
82
+ out.update = {
83
+ skill: `CI=1 npx skills@latest update ${skillName} --yes (or: gh skill update ${skillName})`,
84
+ templates: `node ${rel}/install/templates.mjs --refresh (then commit the changed files under ${rel}/templates)`,
85
+ note: "neither touches src/; a shipped fix reaches the project by comparing its copy with the template",
86
+ };
87
+ console.log(JSON.stringify(out, null, 2));