@wix/agent-skills 1.7.0 → 1.9.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 (126) hide show
  1. package/README.md +3 -7
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +2 -0
  4. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +2 -1
  5. package/skills/wix-app/references/STORES_VERSIONING.md +1 -0
  6. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +14 -0
  7. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +11 -6
  8. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +3 -17
  9. package/skills/wix-app/references/editor-react-component/SSR.md +119 -0
  10. package/skills/wix-design-system/SKILL.md +5 -1
  11. package/skills/wix-headless/SKILL.md +55 -32
  12. package/skills/wix-headless/references/BUILD-astro.md +244 -0
  13. package/skills/wix-headless/references/BUILD-own-build.md +167 -0
  14. package/skills/wix-headless/references/BUILD.md +50 -252
  15. package/skills/wix-headless/references/DESIGN_SYSTEM.md +94 -34
  16. package/skills/wix-headless/references/DISCOVERY-connect.md +55 -0
  17. package/skills/wix-headless/references/DISCOVERY-create.md +238 -0
  18. package/skills/wix-headless/references/DISCOVERY.md +41 -422
  19. package/skills/wix-headless/references/PLAN-connect.md +19 -0
  20. package/skills/wix-headless/references/PLAN-create.md +17 -0
  21. package/skills/wix-headless/references/PLAN.md +37 -27
  22. package/skills/wix-headless/references/SEED.md +27 -18
  23. package/skills/wix-headless/references/SETUP.md +32 -213
  24. package/skills/wix-headless/references/astro/blog/BLOG_PAGES.md +5 -4
  25. package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +45 -0
  26. package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +58 -0
  27. package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +5 -5
  28. package/skills/wix-headless/references/astro/cms/FAQ_KNOWLEDGE_BASE.md +10 -10
  29. package/skills/wix-headless/references/astro/cms/PORTFOLIO.md +12 -13
  30. package/skills/wix-headless/references/astro/cms/RESOURCE_LIBRARY.md +10 -12
  31. package/skills/wix-headless/references/astro/cms/TEAM_DIRECTORY.md +8 -8
  32. package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +47 -27
  33. package/skills/wix-headless/references/astro/ecom/CART_PAGES.md +7 -8
  34. package/skills/wix-headless/references/astro/ecom/CART_WIRING.md +5 -5
  35. package/skills/wix-headless/references/astro/ecom/COMPONENTS_CSS.md +3 -3
  36. package/skills/wix-headless/references/astro/forms/CONTACT_FORM.md +5 -19
  37. package/skills/wix-headless/references/astro/gift-cards/COMPONENTS.md +2 -2
  38. package/skills/wix-headless/references/astro/gift-cards/PAGES.md +1 -1
  39. package/skills/wix-headless/references/astro/stores/BACK_IN_STOCK.md +6 -6
  40. package/skills/wix-headless/references/astro/stores/CATEGORY_PAGES.md +4 -4
  41. package/skills/wix-headless/references/astro/stores/COMPONENTS_CSS.md +3 -3
  42. package/skills/wix-headless/references/astro/stores/HOME_AND_NAV.md +3 -3
  43. package/skills/wix-headless/references/astro/stores/PRODUCT_PAGES.md +9 -9
  44. package/skills/wix-headless/references/astro/stores/SHARED_WIRING.md +5 -4
  45. package/skills/wix-headless/references/astro/templates/Footer.astro +1 -1
  46. package/skills/wix-headless/references/astro/templates/Layout.astro +1 -1
  47. package/skills/wix-headless/references/astro/templates/Navigation.astro +1 -1
  48. package/skills/wix-headless/references/astro/templates/astro.config.mjs +1 -1
  49. package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +233 -0
  50. package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +136 -0
  51. package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +25 -0
  52. package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +54 -0
  53. package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +45 -0
  54. package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +49 -0
  55. package/skills/wix-headless/references/astro/templates/bookings/bookingDriver.ts +245 -0
  56. package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +356 -0
  57. package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +133 -0
  58. package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +73 -0
  59. package/skills/wix-headless/references/astro/templates/global.css +2 -2
  60. package/skills/wix-headless/references/astro/templates/index.astro +1 -1
  61. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +19 -9
  62. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +3 -3
  63. package/skills/wix-headless/references/bookings/FLOW.md +185 -0
  64. package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +90 -0
  65. package/skills/wix-headless/references/bookings/SERVICES_DATA.md +295 -0
  66. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +4 -2
  67. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +27 -1
  68. package/skills/wix-headless/references/commands/known-apps.json +2 -1
  69. package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +142 -0
  70. package/skills/wix-headless/references/custom/INSTRUCTIONS.md +71 -21
  71. package/skills/wix-headless/references/custom/blog/WIRING.md +52 -0
  72. package/skills/wix-headless/references/custom/bookings/WIRING.md +146 -0
  73. package/skills/wix-headless/references/custom/cms/WIRING.md +97 -0
  74. package/skills/wix-headless/references/custom/ecom/WIRING.md +67 -0
  75. package/skills/wix-headless/references/custom/forms/WIRING.md +101 -0
  76. package/skills/wix-headless/references/custom/stores/WIRING.md +80 -0
  77. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +5 -5
  78. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +2 -2
  79. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +3 -3
  80. package/skills/wix-headless/references/images/INSTRUCTIONS.md +16 -15
  81. package/skills/wix-headless/references/seed-recipes.md +2 -2
  82. package/skills/wix-headless/references/shared/AGENTS_MD.md +47 -0
  83. package/skills/wix-headless/references/shared/AUTHENTICATION.md +3 -5
  84. package/skills/wix-headless/references/shared/DESIGN_MD.md +85 -0
  85. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +29 -28
  86. package/skills/wix-headless/references/shared/IMPLEMENTER.md +87 -27
  87. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +2 -2
  88. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +24 -313
  89. package/skills/wix-headless/references/shared/STYLING.md +8 -18
  90. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +39 -9
  91. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +17 -14
  92. package/skills/wix-headless/references/verticals/_schema.json +1 -1
  93. package/skills/wix-headless/references/verticals/_schema.md +3 -3
  94. package/skills/wix-headless/references/verticals/blog.md +1 -1
  95. package/skills/wix-headless/references/verticals/bookings.md +39 -0
  96. package/skills/wix-headless/references/verticals/cms.md +1 -1
  97. package/skills/wix-headless/references/verticals/ecom.md +2 -2
  98. package/skills/wix-headless/references/verticals/gift-cards.md +1 -1
  99. package/skills/wix-headless/references/verticals/stores.md +1 -1
  100. package/skills/wix-headless/scripts/check-manifest.mjs +143 -6
  101. package/skills/wix-headless/scripts/compose.mjs +540 -0
  102. package/skills/wix-headless/scripts/emit-design-tokens.mjs +128 -51
  103. package/skills/wix-headless/scripts/flatten.sh +61 -0
  104. package/skills/wix-headless/scripts/generate-images.mjs +242 -0
  105. package/skills/wix-headless/scripts/scaffold.sh +47 -16
  106. package/skills/wix-headless/scripts/write-decorative-json.mjs +62 -0
  107. package/skills/wix-manage/SKILL.md +13 -1
  108. package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -27
  109. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +1 -1
  110. package/skills/wix-manage/references/bookings/create-appointment-service.md +266 -0
  111. package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +37 -0
  112. package/skills/wix-manage/references/bookings/create-class-service.md +245 -0
  113. package/skills/wix-manage/references/bookings/create-course-service.md +249 -0
  114. package/skills/wix-manage/references/cms/cms-data-items-crud.md +3 -2
  115. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +1 -1
  116. package/skills/wix-manage/references/cms/cms-schema-management.md +2 -2
  117. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +10 -7
  118. package/skills/wix-manage/references/forms/create-form.md +49 -1
  119. package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +1 -1
  120. package/skills/wix-manage/references/stores/create-product-from-image.md +154 -2
  121. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +1 -1
  122. package/skills/wix-headless/references/astro/COMPOSE.md +0 -142
  123. package/skills/wix-headless/scripts/finalize-run-json.mjs +0 -141
  124. package/skills/wix-headless/scripts/init-site-json.mjs +0 -101
  125. package/skills/wix-headless/scripts/preview.sh +0 -45
  126. package/skills/wix-headless/scripts/release.sh +0 -73
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env node
2
+ // Write the decorative slot→URL map to src/decorative-images.json for a
3
+ // framework-SPA (`own`) frontend. This is the `own`-branch analog of
4
+ // patch-decorative-slots.mjs (which injects <img> into .astro source) — but
5
+ // instead of patching framework source, the generated SPA *imports* this JSON
6
+ // and its hero/about components read it, with a themed-block fallback when a
7
+ // slot is empty/absent. This avoids fragile JSX/Vue/Svelte string-patching and
8
+ // mirrors how the SPA already imports .wix/design-tokens.css.
9
+ //
10
+ // It is called twice in the `own` flow (BUILD-own-build.md):
11
+ // 1. At bootstrap, with EMPTY stdin → writes `{}` (placeholder), so the app
12
+ // builds + renders themed blocks even if Image Phase 1 never runs.
13
+ // 2. At the seed gate (ai-generated only), with Image Phase 1's data.slots
14
+ // piped in → OVERWRITES the file with the real URLs. This MUST happen
15
+ // before `npm run build` (Vite resolves the JSON import at build time).
16
+ //
17
+ // Writes to src/decorative-images.json (inside the Vite root, so it is always
18
+ // importable — unlike .wix/, which may sit outside the bundler root).
19
+ //
20
+ // Usage:
21
+ // echo '{"hero":"https://...","about":"https://..."}' \
22
+ // | node write-decorative-json.mjs <project-dir>
23
+ // : | node write-decorative-json.mjs <project-dir> # placeholder {}
24
+
25
+ import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
26
+ import { join } from "node:path";
27
+
28
+ const projectDir = process.argv[2] ?? process.cwd();
29
+
30
+ let slots = {};
31
+ if (!process.stdin.isTTY) {
32
+ const raw = readFileSync(0, "utf8").trim();
33
+ if (raw) {
34
+ try {
35
+ slots = JSON.parse(raw);
36
+ } catch (e) {
37
+ console.error(JSON.stringify({ status: "error", reason: `stdin is not valid JSON (${e.message})` }));
38
+ process.exit(2);
39
+ }
40
+ if (!slots || typeof slots !== "object" || Array.isArray(slots)) {
41
+ console.error(JSON.stringify({ status: "error", reason: "expected a JSON object mapping slot keys to URLs" }));
42
+ process.exit(2);
43
+ }
44
+ }
45
+ }
46
+
47
+ // Drop empty/falsy URLs so the component's themed-block fallback kicks in.
48
+ const clean = {};
49
+ for (const [k, v] of Object.entries(slots)) {
50
+ if (typeof v === "string" && v.trim()) clean[k] = v.trim();
51
+ }
52
+
53
+ const srcDir = join(projectDir, "src");
54
+ mkdirSync(srcDir, { recursive: true });
55
+ const dest = join(srcDir, "decorative-images.json");
56
+ writeFileSync(dest, JSON.stringify(clean, null, 2) + "\n");
57
+
58
+ console.log(JSON.stringify({
59
+ status: Object.keys(clean).length ? "ok" : "placeholder",
60
+ file: dest,
61
+ slots: Object.keys(clean),
62
+ }, null, 2));
@@ -6,7 +6,7 @@ compatibility: Requires Wix REST API access (API key or OAuth).
6
6
 
7
7
  # Management Recipes Index
8
8
 
9
- > **Standard call shape for every curl example across these recipes.** The `<AUTH>` placeholder in example curls is shorthand for the `Authorization` header only; every actual call ALSO needs `wix-site-id: <SITE_ID>` and `Content-Type: application/json`. **POST/PATCH against `wix-data/*`, `form-schema-service/*`, `stores/v3/*`, `blog/v3/*`, and other site-scoped REST families return 403 without `wix-site-id`** — observed seeder regression cost ~100 s rediscovering this on a 2026-05-24 run. Mint the token via `npx @wix/cli@latest token --site "$SITE_ID"`.
9
+ > **Standard call shape for every curl example across these recipes.** The `<AUTH>` placeholder in example curls is shorthand for the `Authorization` header only; body-bearing calls also need `Content-Type: application/json`.
10
10
 
11
11
  ## What Are Management Recipes?
12
12
 
@@ -52,6 +52,18 @@ These recipes do NOT cover frontend development or SDK usage for displaying data
52
52
  ### [Create and Update Booking Services](references/bookings/create-and-update-booking-services.md)
53
53
  **Technical:** Full CRUD operations for Wix Bookings services using Services API. Covers service types (APPOINTMENT, CLASS, COURSE), pricing configuration, location setup, and schedule management.
54
54
 
55
+ ### [Create Booking Service from Prompt](references/bookings/create-booking-service-from-prompt.md)
56
+ **Technical:** Use when the user wants to create a booking service — e.g. "create a yoga class for $50", "set up consultations", "add a personal training appointment". Routes to the correct type-specific recipe (APPOINTMENT, CLASS, or COURSE), gathers business context, applies defaults, and creates the service.
57
+
58
+ ### [Create Appointment Service](references/bookings/create-appointment-service.md)
59
+ **Technical:** Use when the user wants to create an appointment/consultation/1-on-1 service — e.g. "set up consultations for $75", "create a meeting service". Handles staff assignment, session duration, and pricing via bulkCreateServices API.
60
+
61
+ ### [Create Class Service](references/bookings/create-class-service.md)
62
+ **Technical:** Use when the user wants to create a group class — e.g. "create a yoga class for $50", "set up a pilates class". Handles group capacity, recurring sessions, and pricing via bulkCreateServices API.
63
+
64
+ ### [Create Course Service](references/bookings/create-course-service.md)
65
+ **Technical:** Use when the user wants to create a multi-session course — e.g. "create a 6-week workshop", "set up a training program for $300". Handles group capacity, full-course pricing, and fixed series via bulkCreateServices API.
66
+
55
67
  ### [End-to-End Booking Flow](references/bookings/end-to-end-booking-flow.md)
56
68
  **Technical:** Complete booking flow from service discovery to payment. Query services, check availability with Time Slots V2, create bookings, and process payment via eCommerce checkout.
57
69
 
@@ -4,7 +4,7 @@ description: Installs Wix apps on a site using Apps Installer API. Covers enabli
4
4
  ---
5
5
  # Install Wix Apps on a Site
6
6
 
7
- This recipe guides you through installing Wix apps on a site using the Apps Installer REST API, including enabling Velo (Wix Code) when needed.
7
+ This recipe guides you through installing Wix apps on a site using the Apps Installer REST API.
8
8
 
9
9
  ## Prerequisites
10
10
 
@@ -51,30 +51,8 @@ Use the returned `appId` as the `appDefId` in Step 2.
51
51
  - The `appDefId` field in the install request and the `appId` field returned here are the same value
52
52
  - If multiple results come back, match on `basicInfo.name` to confirm you have the right app before installing
53
53
  - Only listings with `status: "PUBLISHED"` can be installed
54
- ## Step 1: Enable Velo (Wix Code) if Needed
55
54
 
56
- If you receive the error `WDE0110: Wix Code not enabled`, you must first enable Velo on the site.
57
-
58
- **Endpoint**: `POST https://www.wixapis.com/mcp-serverless/v1/velo/provision`
59
-
60
- **Request**:
61
- ```bash
62
- curl -X POST \
63
- 'https://www.wixapis.com/mcp-serverless/v1/velo/provision/' \
64
- -H 'Authorization: <AUTH>' \
65
- -H 'Content-Type: application/json' \
66
- -d '{}'
67
- ```
68
-
69
- **Response**: Empty body on success.
70
-
71
- ### IMPORTANT NOTES:
72
- - Only call this endpoint if you receive the `WDE0110` error
73
- - This is a one-time operation per site
74
-
75
- ---
76
-
77
- ## Step 2: Install the Wix App
55
+ ## Install the Wix App
78
56
 
79
57
  Use the Apps Installer API to install any Wix app on a site.
80
58
 
@@ -122,6 +100,7 @@ Some common apps:
122
100
  | Wix Blog | `14bcded7-0066-7c35-14d7-466cb3f09103` |
123
101
  | Wix Events | `140603ad-af8d-84a5-2c80-a0f60cb47351` |
124
102
  | Wix Pricing Plans | `1522827f-c56c-a5c9-2ac9-00f9e6ae12d3` |
103
+ | Wix CMS | `e593b0bd-b783-45b8-97c2-873d42aacaf4` |
125
104
 
126
105
  ### IMPORTANT NOTES:
127
106
  - NEVER guess the `appDefId`. For Wix-built apps, use the table above. For any other app, resolve the ID using Step 0 (Search Market Listings).
@@ -135,9 +114,6 @@ Some common apps:
135
114
  ### App Not Installed Error
136
115
  If you receive an error indicating a required app is not installed, use this recipe to install it before proceeding.
137
116
 
138
- ### WDE0110: Wix Code not enabled
139
- Call the Velo provision endpoint (Step 1) first, then retry the original operation.
140
-
141
117
  ---
142
118
 
143
119
  ## Next Steps
@@ -5,7 +5,7 @@ description: Creates and publishes blog posts using Blog Posts API. Covers Ricos
5
5
 
6
6
  **Article: Create and Publish Blog Posts with Rich Content and Images**
7
7
 
8
- > **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Every actual call ALSO needs `wix-site-id: <SITE_ID>` and (for body-bearing requests) `Content-Type: application/json`. **POST against `blog/v3/*` returns 403 without `wix-site-id`** — recipe examples below show `<AUTH>` only for brevity, but the header is required on every call you make. Token: `npx @wix/cli@latest token --site "$SITE_ID"`.
8
+ > **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`.
9
9
 
10
10
  ---
11
11
 
@@ -0,0 +1,266 @@
1
+ ---
2
+ name: "Create Appointment Service"
3
+ description: "Create an appointment booking service — e.g. 'set up consultations', 'create a 1-on-1 session', 'add a personal training appointment', 'create a meeting service for $25'. Handles staff assignment (required), session duration, pricing, and 1-on-1 capacity defaults via bulkCreateServices API."
4
+ ---
5
+
6
+ # Create Appointment Service from Prompt
7
+
8
+ ## When to Use
9
+
10
+ - User wants to create an appointment-based service: "set up consultations", "create a 1-on-1 session", "add a personal training appointment", "create a meeting service"
11
+ - The service type is APPOINTMENT — customer picks an available time slot during staff working hours
12
+ - For general service creation where the type is ambiguous, see [Create Booking Service from Prompt](./create-booking-service-from-prompt.md)
13
+
14
+ ## Prerequisites
15
+
16
+ - **Wix Bookings app installed** (App ID: `13d21c63-b5ec-5912-8397-c3a5ddb27a97`). Use [List Installed Apps](../app-installation/list-installed-apps.md) to verify, and [Install Wix Apps](../app-installation/install-wix-apps.md) to install if missing.
17
+ - For full API field definitions, validation rules, and troubleshooting, see [Create and Update Booking Services](./create-and-update-booking-services.md)
18
+
19
+ ---
20
+
21
+ ## Step 1: Gather Business Context
22
+
23
+ Run these queries to collect site data for informed defaults.
24
+
25
+ ### 1a. Query Staff Members (CRITICAL for Appointments)
26
+
27
+ ```bash
28
+ curl -X POST 'https://www.wixapis.com/bookings/v1/staff-members/query' \
29
+ -H 'Authorization: <AUTH>' \
30
+ -H 'Content-Type: application/json' \
31
+ -d '{
32
+ "query": {},
33
+ "fields": ["RESOURCE_DETAILS"]
34
+ }'
35
+ ```
36
+
37
+ Save each staff member's `resourceId` (not `id`). Note which one has `default: true`.
38
+
39
+ **APPOINTMENT services REQUIRE at least one staff member.** If no staff members exist, create one first using [Bookings Staff Setup](./bookings-staff-setup.md).
40
+
41
+ ### 1b. Query Service Categories
42
+
43
+ ```bash
44
+ curl -X POST 'https://www.wixapis.com/bookings/v2/categories/query' \
45
+ -H 'Authorization: <AUTH>' \
46
+ -H 'Content-Type: application/json' \
47
+ -d '{ "query": {} }'
48
+ ```
49
+
50
+ ### 1c. Get Site Currency
51
+
52
+ ```bash
53
+ curl -X GET 'https://www.wixapis.com/site-properties/v4/properties' \
54
+ -H 'Authorization: <AUTH>'
55
+ ```
56
+
57
+ Extract `properties.paymentCurrency`. Fall back to `USD` if unavailable.
58
+
59
+ ### 1d. Query Existing Services (Duplicate Check)
60
+
61
+ ```bash
62
+ curl -X POST 'https://www.wixapis.com/bookings/v2/services/query' \
63
+ -H 'Authorization: <AUTH>' \
64
+ -H 'Content-Type: application/json' \
65
+ -d '{ "query": { "paging": { "limit": 100 } } }'
66
+ ```
67
+
68
+ Warn the user if a service with a similar name already exists.
69
+
70
+ ---
71
+
72
+ ## Step 2: Apply Appointment Defaults
73
+
74
+ For any fields the user did not explicitly specify:
75
+
76
+ | Field | Default | Notes |
77
+ |---|---|---|
78
+ | Duration | 60 minutes | Set via `schedule.availabilityConstraints.sessionDurations` |
79
+ | Capacity | 1 | Appointments are typically 1-on-1 |
80
+ | Staff | Auto-assign | Use `default: true` staff, or first available |
81
+ | Online booking | Enabled | `onlineBooking.enabled: true` |
82
+
83
+ ### Pricing (if not specified)
84
+
85
+ - Use the site's currency from Step 1c
86
+ - If user specifies a price → `rateType: "FIXED"`
87
+ - If user says "free" → `rateType: "NO_FEE"`, `options.inPerson: true`, `options.online: false`
88
+ - If no price mentioned → infer from context (consultations ~$50-100, sessions ~$30-60) or default to free
89
+
90
+ ### Staff Assignment
91
+
92
+ - **1 staff member** → auto-assign using their `resourceId`
93
+ - **Multiple staff members** → use the one with `default: true`, or the first one
94
+ - **No staff members** → create one first using [Bookings Staff Setup](./bookings-staff-setup.md), then proceed
95
+
96
+ ### Category
97
+
98
+ - If categories exist → assign the most relevant one
99
+ - If no categories exist → create a "General" category:
100
+ ```bash
101
+ curl -X POST 'https://www.wixapis.com/bookings/v2/categories' \
102
+ -H 'Authorization: <AUTH>' \
103
+ -H 'Content-Type: application/json' \
104
+ -d '{ "category": { "name": "General" } }'
105
+ ```
106
+
107
+ ### Service Name & Description
108
+
109
+ - Use the user's wording for the service name
110
+ - Generate a brief, professional description (1-2 sentences)
111
+
112
+ ---
113
+
114
+ ## Step 3: Create the Appointment Service
115
+
116
+ **Paid appointment:**
117
+
118
+ ```bash
119
+ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
120
+ -H 'Authorization: <AUTH>' \
121
+ -H 'Content-Type: application/json' \
122
+ -d '{
123
+ "services": [{
124
+ "name": "<SERVICE_NAME>",
125
+ "description": "<GENERATED_DESCRIPTION>",
126
+ "type": "APPOINTMENT",
127
+
128
+ "onlineBooking": { "enabled": true },
129
+ "staffMemberIds": ["<RESOURCE_ID>"],
130
+ "schedule": {
131
+ "availabilityConstraints": {
132
+ "sessionDurations": [<DURATION_MINUTES>]
133
+ }
134
+ },
135
+ "payment": {
136
+ "rateType": "FIXED",
137
+ "options": { "online": true, "inPerson": false },
138
+ "fixed": {
139
+ "price": { "value": "<PRICE>", "currency": "<CURRENCY>" }
140
+ }
141
+ },
142
+ "category": {
143
+ "id": "<CATEGORY_ID>"
144
+ }
145
+ }]
146
+ }'
147
+ ```
148
+
149
+ **Free appointment:**
150
+
151
+ ```bash
152
+ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
153
+ -H 'Authorization: <AUTH>' \
154
+ -H 'Content-Type: application/json' \
155
+ -d '{
156
+ "services": [{
157
+ "name": "<SERVICE_NAME>",
158
+ "description": "<GENERATED_DESCRIPTION>",
159
+ "type": "APPOINTMENT",
160
+
161
+ "onlineBooking": { "enabled": true },
162
+ "staffMemberIds": ["<RESOURCE_ID>"],
163
+ "schedule": {
164
+ "availabilityConstraints": {
165
+ "sessionDurations": [<DURATION_MINUTES>]
166
+ }
167
+ },
168
+ "payment": {
169
+ "rateType": "NO_FEE",
170
+ "options": { "online": false, "inPerson": true }
171
+ },
172
+ "category": {
173
+ "id": "<CATEGORY_ID>"
174
+ }
175
+ }]
176
+ }'
177
+ ```
178
+
179
+ ### APPOINTMENT-Specific Reminders
180
+
181
+ - `staffMemberIds` is **required** — uses `resourceId` values, not staff member `id`
182
+ - `schedule.availabilityConstraints.sessionDurations` sets the appointment length
183
+ - Availability is based on the assigned staff member's working hours schedule
184
+
185
+ Save the `serviceId` from the response: `results[0].item.service.id`
186
+
187
+ ---
188
+
189
+ ## Step 4: Navigate to Service Form
190
+
191
+ Use the **RUN_IN_BROWSER** tool to navigate the user to the service form for final review:
192
+
193
+ ```javascript
194
+ window.location.href = `/bookings/services/form/${serviceId}?fromAria=true`;
195
+ ```
196
+
197
+ This executes in the user's browser and redirects them to the service editing page.
198
+
199
+ ---
200
+
201
+ ## Step 5: Summary Message
202
+
203
+ Provide a summary including:
204
+
205
+ 1. **What was created** — service name, price, duration, assigned staff member
206
+ 2. **Assumptions made** — list defaults used (e.g., "I set the duration to 60 minutes since you didn't specify")
207
+ 3. **Next steps** — "Click Save to finalize, then set up your availability"
208
+ 4. **Offer to adjust** — "Want me to change the price, duration, or staff assignment?"
209
+
210
+ **Example:**
211
+
212
+ > I created **"Strategy Consultation"**:
213
+ >
214
+ > - **Type**: Appointment (1-on-1)
215
+ > - **Price**: $75 per session
216
+ > - **Duration**: 60 minutes
217
+ > - **Staff**: Assigned to Sarah Johnson
218
+ > - **Category**: Consulting
219
+ >
220
+ > I assumed a 60-minute duration since you didn't specify. You can review and adjust the details in the service form.
221
+
222
+ ---
223
+
224
+ ## Error Handling
225
+
226
+ | Error | Cause | Action |
227
+ |---|---|---|
228
+ | 428 "App not installed" | Bookings not installed | Install using [Install Wix Apps](../app-installation/install-wix-apps.md) |
229
+ | 400 "staffMemberIds required" | No staff assigned | Query staff; if none exist, create one via [Bookings Staff Setup](./bookings-staff-setup.md) |
230
+ | 400 "INVALID_PAYMENT_OPTIONS" | Payment misconfigured | Free: `inPerson: true`, `online: false`. Paid: price > 0 |
231
+ | 403 | Permission denied | Inform user they lack permission |
232
+
233
+ ---
234
+
235
+ ## Payment Validation Quick Reference
236
+
237
+ | rateType | `options.online` | `options.inPerson` | Valid? |
238
+ |----------|------------------|-------------------|--------|
239
+ | FIXED | true | false | ✓ |
240
+ | FIXED | false | true | ✓ |
241
+ | FIXED | true | true | ✓ |
242
+ | NO_FEE | false | true | ✓ |
243
+ | NO_FEE | true | false | ✗ |
244
+ | Any | false | false | ✗ |
245
+
246
+ ---
247
+
248
+ ## What This Skill Does NOT Cover
249
+
250
+ - **Schedule/availability setup** — staff working hours need separate configuration. See [Bookings Staff Setup](./bookings-staff-setup.md)
251
+ - **Pricing plans** — memberships and session packs are separate. See [Create and Update Pricing Plans](../pricing-plans/create-and-update-pricing-plans.md)
252
+ - **Service images** — requires Media Manager API (see [create-and-update-booking-services.md](./create-and-update-booking-services.md))
253
+
254
+ ---
255
+
256
+ ## API Documentation Reference
257
+
258
+ - [Bulk Create Services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/bulk-create-services)
259
+ - [Query Services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/query-services)
260
+ - [Query Categories](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/categories-v2/query-categories)
261
+ - [Create Category](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/categories-v2/create-category)
262
+ - [Query Staff Members](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/query-staff-members)
263
+ - [Create Staff Member](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/create-staff-member)
264
+ - [Site Properties](https://dev.wix.com/docs/api-reference/business-management/site-management/site-properties/properties/read)
265
+ - [About Service Types](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-types)
266
+ - [About Service Payments](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-payments)
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: "Create Booking Service from Prompt"
3
+ description: "Create a booking service from a user prompt — e.g. 'create a yoga class for $50', 'set up consultations for $75', 'add a personal training appointment', 'create a 6-week photography workshop'. Determines the service type (APPOINTMENT, CLASS, or COURSE) and delegates to the type-specific recipe."
4
+ ---
5
+
6
+ # Create Booking Service from Natural Language Prompt
7
+
8
+ ## When to Use
9
+
10
+ - User describes a service they want to create using natural language (e.g., "create a yoga class for $50", "set up consultation sessions", "add a personal training appointment")
11
+ - The intent is autonomous creation — fill in reasonable defaults rather than asking the user for every field
12
+
13
+ ## Prerequisites
14
+
15
+ - **Wix Bookings app installed** (App ID: `13d21c63-b5ec-5912-8397-c3a5ddb27a97`)
16
+ - If Bookings is not installed, use [Install Wix Apps](../app-installation/install-wix-apps.md) to install it first
17
+
18
+ ---
19
+
20
+ ## Step 1: Determine Service Type
21
+
22
+ | User mentions | Type | Recipe |
23
+ |---|---|---|
24
+ | consultation, appointment, meeting, 1-on-1, one-on-one, session | `APPOINTMENT` | [Create Appointment Service](./create-appointment-service.md) |
25
+ | class, yoga, pilates, group session, group workout, bootcamp class | `CLASS` | [Create Class Service](./create-class-service.md) |
26
+ | workshop, program, course, training program, multi-session | `COURSE` | [Create Course Service](./create-course-service.md) |
27
+ | (unclear or unspecified) | `APPOINTMENT` | [Create Appointment Service](./create-appointment-service.md) |
28
+
29
+ ## Step 2: Follow the Type-Specific Recipe
30
+
31
+ Once the service type is determined, follow the corresponding recipe linked above. Each recipe covers:
32
+
33
+ 1. Gathering business context (staff, categories, currency, duplicate check)
34
+ 2. Applying type-specific defaults (pricing, capacity, duration, staff assignment)
35
+ 3. Creating the service via `bulkCreateServices`
36
+ 4. Navigating to the service form for user review
37
+ 5. Providing a summary of what was created and assumptions made