@respira/wordpress-mcp-server 7.3.0 → 7.4.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 (88) hide show
  1. package/dist/acf-tools.d.ts +0 -10
  2. package/dist/acf-tools.d.ts.map +1 -1
  3. package/dist/acf-tools.js +0 -15
  4. package/dist/acf-tools.js.map +1 -1
  5. package/dist/config.d.ts.map +1 -1
  6. package/dist/config.js +31 -36
  7. package/dist/config.js.map +1 -1
  8. package/dist/server.d.ts +0 -47
  9. package/dist/server.d.ts.map +1 -1
  10. package/dist/server.js +404 -462
  11. package/dist/server.js.map +1 -1
  12. package/dist/wordpress-client.d.ts +26 -29
  13. package/dist/wordpress-client.d.ts.map +1 -1
  14. package/dist/wordpress-client.js +115 -148
  15. package/dist/wordpress-client.js.map +1 -1
  16. package/package.json +2 -2
  17. package/skills/activity-report-composer/README.md +38 -0
  18. package/skills/activity-report-composer/SKILL.md +167 -0
  19. package/skills/activity-report-composer/metadata.json +42 -0
  20. package/skills/brand-voice-synthesizer/README.md +43 -0
  21. package/skills/brand-voice-synthesizer/SKILL.md +259 -0
  22. package/skills/brand-voice-synthesizer/metadata.json +46 -0
  23. package/skills/build-oxygen6-page/SKILL.md +59 -0
  24. package/skills/conversion-audit/README.md +37 -0
  25. package/skills/conversion-audit/SKILL.md +185 -0
  26. package/skills/conversion-audit/metadata.json +46 -0
  27. package/skills/custom-post-type-architect/README.md +34 -0
  28. package/skills/custom-post-type-architect/SKILL.md +158 -0
  29. package/skills/custom-post-type-architect/metadata.json +39 -0
  30. package/skills/design-system-synthesizer/README.md +46 -0
  31. package/skills/design-system-synthesizer/SKILL.md +395 -0
  32. package/skills/design-system-synthesizer/metadata.json +57 -0
  33. package/skills/figma-to-elementor/SKILL.md +204 -0
  34. package/skills/html-to-bricks/README.md +43 -0
  35. package/skills/html-to-bricks/SKILL.md +135 -0
  36. package/skills/html-to-bricks/metadata.json +41 -0
  37. package/skills/internal-link-builder/SKILL.md +258 -0
  38. package/skills/internal-link-builder/metadata.json +46 -0
  39. package/skills/migrate-beaver-builder-to-bricks/SKILL.md +251 -0
  40. package/skills/migrate-beaver-builder-to-gutenberg/SKILL.md +248 -0
  41. package/skills/migrate-brizy-to-gutenberg/SKILL.md +248 -0
  42. package/skills/migrate-divi-to-breakdance/SKILL.md +312 -0
  43. package/skills/migrate-divi-to-bricks/SKILL.md +321 -0
  44. package/skills/migrate-divi-to-gutenberg/SKILL.md +328 -0
  45. package/skills/migrate-elementor-to-breakdance/SKILL.md +287 -0
  46. package/skills/migrate-elementor-to-bricks/SKILL.md +289 -0
  47. package/skills/migrate-elementor-to-gutenberg/SKILL.md +327 -0
  48. package/skills/migrate-elementor-to-oxygen/SKILL.md +300 -0
  49. package/skills/migrate-oxygen-to-breakdance/SKILL.md +235 -0
  50. package/skills/migrate-oxygen-to-bricks/SKILL.md +237 -0
  51. package/skills/migrate-thrive-architect-to-gutenberg/SKILL.md +257 -0
  52. package/skills/migrate-visual-composer-to-gutenberg/SKILL.md +261 -0
  53. package/skills/migrate-wpbakery-to-bricks/SKILL.md +336 -0
  54. package/skills/migrate-wpbakery-to-gutenberg/SKILL.md +345 -0
  55. package/skills/mobile-experience-report/SKILL.md +719 -0
  56. package/skills/mobile-experience-report/telemetry.ts +137 -0
  57. package/skills/page-template-library/README.md +41 -0
  58. package/skills/page-template-library/SKILL.md +175 -0
  59. package/skills/page-template-library/metadata.json +44 -0
  60. package/skills/prime-the-agent/README.md +49 -0
  61. package/skills/prime-the-agent/SKILL.md +225 -0
  62. package/skills/prime-the-agent/metadata.json +46 -0
  63. package/skills/respira-setup-assistant/SKILL.md +386 -0
  64. package/skills/respira-setup-assistant/metadata.json +36 -0
  65. package/skills/seo-aeo-amplifier/README.md +61 -0
  66. package/skills/seo-aeo-amplifier/SKILL.md +277 -0
  67. package/skills/seo-aeo-amplifier/metadata.json +62 -0
  68. package/skills/stale-content-detector/README.md +41 -0
  69. package/skills/stale-content-detector/SKILL.md +156 -0
  70. package/skills/stale-content-detector/metadata.json +43 -0
  71. package/skills/technical-debt-audit/SKILL.md +691 -0
  72. package/skills/technical-debt-audit/telemetry.ts +142 -0
  73. package/skills/woocommerce-health-check/SKILL.md +719 -0
  74. package/skills/woocommerce-health-check/telemetry.ts +137 -0
  75. package/skills/wordpress-ai-image-optimizer/README.md +49 -0
  76. package/skills/wordpress-ai-image-optimizer/SKILL.md +232 -0
  77. package/skills/wordpress-ai-image-optimizer/metadata.json +63 -0
  78. package/skills/wordpress-site-dna/README.md +81 -0
  79. package/skills/wordpress-site-dna/SKILL.md +669 -0
  80. package/skills/wordpress-site-dna/telemetry.ts +137 -0
  81. package/dist/__tests__/acf-tool-routing.test.d.ts +0 -2
  82. package/dist/__tests__/acf-tool-routing.test.d.ts.map +0 -1
  83. package/dist/__tests__/acf-tool-routing.test.js +0 -37
  84. package/dist/__tests__/acf-tool-routing.test.js.map +0 -1
  85. package/dist/__tests__/cowork-bootstrap.test.d.ts +0 -2
  86. package/dist/__tests__/cowork-bootstrap.test.d.ts.map +0 -1
  87. package/dist/__tests__/cowork-bootstrap.test.js +0 -61
  88. package/dist/__tests__/cowork-bootstrap.test.js.map +0 -1
@@ -0,0 +1,395 @@
1
+ # Design System Synthesizer
2
+
3
+ **Version:** 1.2.0
4
+ **Updated:** 2026-06-30
5
+ **Freshly updated:** v1.2.0 makes the synthesis safe and source-traceable end to end. Reads tokens from the actual builder content (`respira_extract_builder_content`) and theme files (`respira_read_theme_file` on style.css / theme.json) rather than guessing. Persists the design_system JSON via `respira_get_option` (diff first) + `respira_update_option`, and takes a `respira_get_snapshot` checkpoint before building the visible style-guide page with `respira_build_page` so the write is explicitly reversible (restore the snapshot, delete the draft). Applying tokens to a builder's global colors and typography is described in plain words since there is no confirmed MCP tool name for that path yet.
6
+ **Category:** intelligence
7
+ **Status:** stable
8
+ **Requires:** Respira for WordPress plugin 7.1+ + MCP server
9
+
10
+ ---
11
+
12
+ ## Description
13
+
14
+ Read a WordPress site's representative pages, theme files, and media library to extract a complete, reusable **design system** — logo, color palette, typography, spacing scale, component patterns. Persist it to the site so every future content-creation skill references it, and every new page Claude builds matches the existing brand.
15
+
16
+ This is the foundation for on-brand AI-generated content. Without a design system, the agent guesses at colors, fonts, and spacing — and the result looks like every other AI-generated WordPress page. With a design system, the agent has explicit tokens to use, and new pages snap to the brand.
17
+
18
+ ---
19
+
20
+ ## What it produces
21
+
22
+ A structured `design_system` artifact stored at the site level. Schema:
23
+
24
+ ```json
25
+ {
26
+ "version": "1.2.0",
27
+ "synthesized_at": "2026-05-24T14:30:00Z",
28
+ "synthesized_from": ["/", "/about/", "/services/web-design/", "/blog/sample-post/", "/contact/"],
29
+ "brand": {
30
+ "logo_url": "https://example.com/wp-content/uploads/2025/logo.svg",
31
+ "logo_dark_url": null,
32
+ "favicon_url": "https://example.com/favicon.ico",
33
+ "social_card_url": "https://example.com/wp-content/uploads/2025/og-default.jpg",
34
+ "wordmark_text": "Acme Studio"
35
+ },
36
+ "colors": {
37
+ "primary": "#2563EB",
38
+ "secondary": "#0F172A",
39
+ "accent": "#F59E0B",
40
+ "neutral_900": "#0F172A",
41
+ "neutral_700": "#334155",
42
+ "neutral_500": "#64748B",
43
+ "neutral_300": "#CBD5E1",
44
+ "neutral_100": "#F1F5F9",
45
+ "background": "#FFFFFF",
46
+ "background_alt": "#F8FAFC",
47
+ "text_primary": "#0F172A",
48
+ "text_secondary": "#475569",
49
+ "link": "#2563EB",
50
+ "success": "#10B981",
51
+ "warning": "#F59E0B",
52
+ "error": "#EF4444"
53
+ },
54
+ "typography": {
55
+ "heading_family": "Söhne, ui-sans-serif, system-ui, sans-serif",
56
+ "heading_weight": 700,
57
+ "h1_size": "3.5rem",
58
+ "h2_size": "2.5rem",
59
+ "h3_size": "1.875rem",
60
+ "h4_size": "1.5rem",
61
+ "h5_size": "1.25rem",
62
+ "h6_size": "1rem",
63
+ "body_family": "Söhne, ui-sans-serif, system-ui, sans-serif",
64
+ "body_weight": 400,
65
+ "body_size": "1rem",
66
+ "body_line_height": 1.65,
67
+ "mono_family": "JetBrains Mono, ui-monospace, monospace",
68
+ "letter_spacing_heading": "-0.02em",
69
+ "letter_spacing_body": "0"
70
+ },
71
+ "spacing": {
72
+ "scale_base": 4,
73
+ "scale_steps": [4, 8, 12, 16, 24, 32, 48, 64, 96, 128],
74
+ "section_padding_y": "96px",
75
+ "section_padding_x": "24px",
76
+ "container_max_width": "1280px"
77
+ },
78
+ "components": {
79
+ "button_primary": {
80
+ "background": "primary",
81
+ "color": "#FFFFFF",
82
+ "padding": "12px 24px",
83
+ "border_radius": "8px",
84
+ "font_weight": 600
85
+ },
86
+ "button_secondary": { /* ... */ },
87
+ "card": {
88
+ "background": "background",
89
+ "border": "1px solid neutral_300",
90
+ "border_radius": "12px",
91
+ "padding": "32px",
92
+ "shadow": "0 1px 3px rgba(0,0,0,0.05)"
93
+ },
94
+ "hero_pattern": "centered_with_kicker_h1_subtitle_2cta",
95
+ "section_pattern": "wide_two_column_image_left"
96
+ },
97
+ "voice_hints": {
98
+ "person": "we",
99
+ "formality": "approachable_professional",
100
+ "sentence_length_avg_words": 14,
101
+ "avoids": ["exclamation marks", "marketing superlatives"]
102
+ }
103
+ }
104
+ ```
105
+
106
+ The artifact is stored via `respira_update_option('respira_design_system', ...)` for v7.1. v7.2 may migrate this to a dedicated `respira_intelligence_artifacts` table if cross-site rollup is needed.
107
+
108
+ ---
109
+
110
+ ## When to Use
111
+
112
+ - First time setting up an AI workflow for an existing site — generate the design system so future content is on-brand
113
+ - Site rebrand — re-synthesize after the new brand lands so the AI catches the new tokens
114
+ - Before running content-creation skills (`build_page`, page generators) so the new pages match the brand
115
+ - Quarterly refresh — re-synthesize to capture brand drift
116
+
117
+ ---
118
+
119
+ ## Trigger Phrases
120
+
121
+ - "build a design system for my site"
122
+ - "extract my brand"
123
+ - "synthesize a design system"
124
+ - "create my design tokens"
125
+ - "what does my site look like"
126
+ - "capture my brand"
127
+ - "build my style guide"
128
+ - "extract design tokens"
129
+
130
+ ---
131
+
132
+ ## Execution Workflow
133
+
134
+ ### Step 1 — Confirm site
135
+
136
+ Call `respira_get_active_site` + `respira_get_site_context`. Note WordPress version and active theme — theme.json or customizer settings may already expose some tokens.
137
+
138
+ ### Step 2 — Pick representative pages
139
+
140
+ Call `respira_list_pages`. From the list, pick 5–10 pages that should represent the brand:
141
+
142
+ - The homepage (always)
143
+ - The about page (always if present)
144
+ - One typical service or product page
145
+ - One typical blog post
146
+ - The contact page
147
+ - One landing page if any exists
148
+
149
+ If the site has fewer than 5 pages, use whatever exists. If more than 10, sample by recency and front-page-link weight.
150
+
151
+ ### Step 3 — Extract logo + brand imagery
152
+
153
+ Call `respira_list_media` filtered for logo-like names (`logo`, `wordmark`, `brand`, `favicon`). Also check site identity via `respira_get_option('site_icon')` for the favicon and `respira_get_option('custom_logo')` for the custom logo URL.
154
+
155
+ ### Step 4 — Read theme stylesheet for CSS variables
156
+
157
+ Call `respira_read_theme_file('style.css')` and `respira_read_theme_file('theme.json')` if FSE theme. Extract any `:root` CSS custom properties (often the cleanest source of brand tokens).
158
+
159
+ ### Step 5 — Extract each picked page's builder content
160
+
161
+ For each of the 5–10 picked pages:
162
+
163
+ 1. `respira_extract_builder_content(page_id)` — get the builder-native structure
164
+ 2. Note colors used (background, text, buttons, links)
165
+ 3. Note typography (heading sizes, families, weights)
166
+ 4. Note spacing (section padding, gutters, container widths)
167
+ 5. Note component patterns (hero layout, card style, navigation pattern)
168
+
169
+ ### Step 6 — Synthesize
170
+
171
+ Aggregate the per-page observations into the structured `design_system` schema (see "What it produces" above). When multiple pages disagree on a value, prefer:
172
+
173
+ - The homepage's choice for hero patterns
174
+ - The most common value across all pages for body typography
175
+ - The CSS custom property value if defined (overrides per-page observation)
176
+ - The theme.json value if FSE theme (overrides CSS custom property)
177
+
178
+ For colors, identify primary / secondary / accent by frequency-of-use + role (background-of-CTA = primary; link color = link; large-text color = primary if it differs from body). Generate a neutral scale (100 → 900) by sampling backgrounds, borders, text colors.
179
+
180
+ ### Step 7 — Show the synthesized system to the user
181
+
182
+ Output a human-readable summary:
183
+
184
+ ```markdown
185
+ ## Design system synthesized for {site_url}
186
+
187
+ **Brand**
188
+ - Logo: ![](logo_url)
189
+ - Wordmark: {wordmark_text}
190
+
191
+ **Colors**
192
+ - Primary: {primary} ▮
193
+ - Secondary: {secondary} ▮
194
+ - Accent: {accent} ▮
195
+ - Neutrals: {neutral_100} → {neutral_900} (9-step scale)
196
+
197
+ **Typography**
198
+ - Headings: {heading_family} {heading_weight}, H1 {h1_size}
199
+ - Body: {body_family} {body_weight}, {body_size}/{body_line_height}
200
+
201
+ **Spacing**
202
+ - Base: {scale_base}px, scale: {scale_steps}
203
+ - Section padding: {section_padding_y} vertical, container max {container_max_width}
204
+
205
+ **Component patterns observed**
206
+ - Hero: {hero_pattern}
207
+ - Section: {section_pattern}
208
+ - Button primary: {button_primary description}
209
+ - Card: {card description}
210
+ ```
211
+
212
+ Ask the user to confirm or correct anything.
213
+
214
+ ### Step 8 — Persist the data
215
+
216
+ After confirmation, call `respira_update_option('respira_design_system', <json>)`. Confirm with `respira_get_option('respira_design_system')`.
217
+
218
+ ### Step 9 — Generate the visible style-guide page
219
+
220
+ The JSON in `wp_options` is the machine source of truth, but it's invisible to humans. Step 9 builds a real WordPress page on the site that **renders the synthesized tokens visually** — so the user can see their design system, send a link to teammates, and edit it like any other page.
221
+
222
+ #### Snapshot before writing (required)
223
+
224
+ Building the style-guide page is the first write this skill makes to the live site. Take a checkpoint first so it's explicitly reversible:
225
+
226
+ ```
227
+ Tool: respira_get_snapshot
228
+ Note the returned snapshot_id — that's the rollback handle.
229
+ ```
230
+
231
+ If anything looks wrong after the build, roll back cleanly:
232
+
233
+ - `respira_restore_snapshot(snapshot_id)` to undo site-level changes, and
234
+ - delete the draft style-guide page you created (`respira_delete_page(page_id)`).
235
+
236
+ The persisted `respira_design_system` option is not destructive (Step 8 already diffed before overwriting), so the snapshot here is about the page build, not the option.
237
+
238
+ #### Page settings
239
+
240
+ - **Title:** "Design System" (overridable)
241
+ - **Slug:** `/design-system/` (overridable; check via `respira_list_pages` and append `-2` if conflict)
242
+ - **Status:** `private` by default (visible only to logged-in editors). Ask the user: *"Publish as private (admin-only preview) or public?"* — default to private.
243
+ - **Excluded from sitemap, robots noindex** by default (so even if accidentally published, it doesn't pollute search).
244
+ - **Builder:** the active builder (Bricks / Elementor / Divi / Gutenberg / Oxygen / Breakdance / etc.) — never raw HTML. Use `respira_get_builder_inline_schemas` to confirm available modules before building.
245
+
246
+ #### Page structure (the section spine)
247
+
248
+ Build the page with `respira_build_page` using this section spine, mapping each section to the active builder's native modules:
249
+
250
+ 1. **Hero**
251
+ - Eyebrow: "Design System · synthesized {synthesized_at} from {n} pages"
252
+ - H1: "{brand.wordmark_text} Design System" (or "Design System" if no wordmark)
253
+ - Subtitle: "The visual foundation every page generated on this site references."
254
+ - Logo image (from `brand.logo_url`) prominently displayed
255
+
256
+ 2. **Brand identity**
257
+ - Logo card with full logo, dimensions, file type
258
+ - Favicon swatch
259
+ - Social card preview if `brand.social_card_url`
260
+ - Wordmark in heading typography if `brand.wordmark_text`
261
+
262
+ 3. **Color palette**
263
+ - 4 primary swatches (primary / secondary / accent / background) — each a large color block with hex code, role name, and "use for" guidance
264
+ - 9-step neutral scale — horizontal strip from neutral_100 → neutral_900 with hex codes
265
+ - Semantic colors row (link / success / warning / error) — smaller swatches
266
+
267
+ 4. **Typography**
268
+ - **Heading sample:** all six heading levels (H1 → H6) rendered in actual `heading_family` + `heading_weight` + their specified sizes, each labeled with the size value
269
+ - **Body sample:** a real paragraph in `body_family` + `body_weight` + `body_size` + `body_line_height` so the user can SEE the body reading experience
270
+ - **Mono sample:** a code block in `mono_family`
271
+ - Side panel listing the font stacks verbatim (with fallbacks) and font-loading note (Google Fonts / Adobe Fonts / self-hosted)
272
+
273
+ 5. **Spacing scale**
274
+ - Visual blocks for each step in `scale_steps` — a colored rectangle whose height matches the step value, labeled with the pixel value
275
+ - "Section padding" block showing actual section padding visually
276
+ - "Container max-width" line showing the max-width as a horizontal ruler
277
+
278
+ 6. **Components**
279
+ - Button primary + button secondary rendered in actual styles (background, color, padding, border-radius)
280
+ - Card example with real content ("Card title", short body, button)
281
+ - Hero pattern description with a wireframe sketch
282
+ - Section pattern description with a wireframe sketch
283
+
284
+ 7. **Voice hints** (if synthesized)
285
+ - Person used
286
+ - Formality descriptor
287
+ - Avoided words (the strongest signal)
288
+ - Cross-link to the Brand Voice Synthesizer skill — *"For the full brand voice including signature phrases, signature openers, and a real paragraph example, run the [Brand Voice Synthesizer](/skills/brand-voice-synthesizer)."*
289
+
290
+ 8. **Footer**
291
+ - Synthesis metadata: source pages list, synthesized timestamp, version
292
+ - "Edit this page" link to the builder edit URL
293
+ - "Re-synthesize" instructions: *"Run the Design System Synthesizer skill again any time to refresh. The artifact will be diffed before overwriting."*
294
+
295
+ #### Builder mapping
296
+
297
+ `respira_build_page` accepts a section spine and renders it as native builder modules. For each section above, the page builder picks the closest module:
298
+
299
+ | Section | Bricks | Elementor | Divi 5 | Gutenberg |
300
+ |---|---|---|---|---|
301
+ | Color swatches | div block grid + heading + text | Inner Section + Heading + Text widgets | Row + Column + Code module | core/columns + core/group blocks |
302
+ | Heading samples | heading element ×6 | Heading widget ×6 | Text module ×6 | core/heading blocks ×6 |
303
+ | Button samples | button element | Button widget | Button module | core/buttons block |
304
+ | Spacing blocks | div block with explicit height | Inner Section with margin | Code module with custom CSS | core/spacer blocks |
305
+
306
+ Do NOT render with raw HTML even when the builder doesn't have a perfect 1:1 mapping. If a section can't be cleanly built (e.g. the spacing-scale visualization requires inline styles the builder doesn't expose), fall back to a labeled bullet list — never a `<div>` blob.
307
+
308
+ #### Output
309
+
310
+ After page creation, output:
311
+
312
+ ```markdown
313
+ ## ✓ Design system saved + style-guide page created
314
+
315
+ **Machine source of truth:** `wp_options.respira_design_system` (queryable via `respira_get_option`)
316
+
317
+ **Human view:** {page_url} · status: private (editors only)
318
+
319
+ **Open it now:** [{page_title} in the editor]({builder_edit_url})
320
+
321
+ **Promote to public:** call `respira_update_page(id={page_id}, status='publish')` if you want this visible on your site as a /design-system/ landing.
322
+
323
+ **Re-sync any time:** run this skill again. Existing data is diffed and the page is regenerated (with the option to keep customizations).
324
+
325
+ **Roll back this build:** `respira_restore_snapshot({snapshot_id})` then `respira_delete_page({page_id})`.
326
+ ```
327
+
328
+ ---
329
+
330
+ ## How other skills use the design system
331
+
332
+ Once persisted, future skills (Page Template Library, Brand Voice Synthesizer, future content-generation skills) should call `respira_get_option('respira_design_system')` at the top of their workflow. They use the tokens to:
333
+
334
+ - Pick colors when generating new sections (use primary, secondary, accent — never invented hex values)
335
+ - Match typography when generating headings (heading_family, heading_weight, sizes)
336
+ - Match spacing when laying out sections (use the spacing scale, not arbitrary pixel values)
337
+ - Match component patterns when generating heros, cards, buttons (reference button_primary etc.)
338
+
339
+ ### Applying tokens to the builder's own global colors / typography
340
+
341
+ Some builders (Bricks, Elementor, Divi, Oxygen) keep their own global color palette and global typography settings, separate from the page-level styles. Pushing the synthesized tokens into those global settings means future hand-edits in the builder also snap to the brand.
342
+
343
+ There is **no confirmed MCP tool name** for writing a builder's global palette today, so do not invent one (e.g. do not assume a `respira_*` design-system tool exists). The real path is the plugin's design-token import layer on the WordPress side (`includes/bricks-intelligence/class-design-token-import.php` and the design-system REST handler in `includes/class-respira-bricks-tools.php`), reached through the site, not a named MCP tool. In practice:
344
+
345
+ - Persist the `respira_design_system` option (Step 8) — that is the canonical, tool-confirmed write.
346
+ - Build the visible style-guide page (Step 9) so the tokens are visible and editable.
347
+ - For pushing tokens into a builder's *global* palette/typography, describe the change to the user in plain words and let them apply it (or trigger the plugin's design-token import). Only reference a builder-token tool by name once you have grepped `includes/` and confirmed the exact registered name.
348
+
349
+ This is the foundation. Every other content skill stands on it.
350
+
351
+ ---
352
+
353
+ ## Hard rules
354
+
355
+ - Never invent design tokens. Every color, font, size, and pattern in the artifact must trace to an observation in the source pages, theme files, or media. If a token can't be inferred, leave it null — don't guess.
356
+ - Never overwrite an existing design system silently. If `respira_get_option('respira_design_system')` returns existing data, show the user the diff before overwriting.
357
+ - The logo URL must be an absolute URL. Use `wp_get_attachment_url()` semantics, not a relative path.
358
+ - Color values must be hex (`#RRGGBB`). Convert `rgb()`, `rgba()`, named colors to hex.
359
+ - Font families preserve the full font-stack as written in CSS (with fallbacks), not just the primary family name.
360
+
361
+ ---
362
+
363
+ ## Tooling
364
+
365
+ **Reading the brand (source of truth)**
366
+ - `respira_get_active_site`
367
+ - `respira_get_site_context`
368
+ - `respira_list_pages`
369
+ - `respira_list_media`
370
+ - `respira_get_option` — read `site_icon` / `custom_logo`, and check for an existing `respira_design_system`
371
+ - `respira_extract_builder_content` — per-page tokens from the builder-native structure
372
+ - `respira_read_theme_file` — `style.css` `:root` custom properties and `theme.json` (FSE)
373
+
374
+ **Persisting + rendering**
375
+ - `respira_update_option` — write `respira_design_system` (diff first via `respira_get_option`)
376
+ - `respira_get_builder_inline_schemas` — confirm available modules before building
377
+ - `respira_get_snapshot` — checkpoint before the page build (rollback handle)
378
+ - `respira_build_page` — render the visible style-guide page in the active builder
379
+ - `respira_restore_snapshot` + `respira_delete_page` — explicit rollback of the build
380
+
381
+ Applying tokens to a builder's *global* colors/typography has **no confirmed MCP tool name** — describe it in plain words (see "Applying tokens to the builder's own global colors / typography" above). Never invent a builder-token tool name.
382
+
383
+ ---
384
+
385
+ ## Telemetry
386
+
387
+ Records: site URL hash, number of pages sampled, builder active, theme name, colors detected count, typography sources used (theme.json / CSS variables / per-page observation), success/failure, total duration. No actual color values, font names, or logo URLs are sent.
388
+
389
+ Endpoint: `POST https://www.respira.press/api/skills/track-usage`
390
+
391
+ ---
392
+
393
+ ## Future (v7.2)
394
+
395
+ Storage will migrate from `wp_options` to a dedicated `respira_intelligence_artifacts` table for cross-site rollups and Studio-tier multi-site dashboards. The schema above is stable — the storage layer change is transparent to consuming skills.
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "Design System Synthesizer",
3
+ "slug": "design-system-synthesizer",
4
+ "icon": "🎨",
5
+ "category": "intelligence",
6
+ "description": "Read a WordPress site's representative pages, theme files, and media library to extract a complete reusable design system — logo, color palette, typography, spacing scale, component patterns. Persist it AND generate a visible style-guide page on the site that renders the tokens visually.",
7
+ "author": "Respira Team",
8
+ "author_url": "https://respira.press",
9
+ "trigger": "build a design system for my site",
10
+ "requires_respira": true,
11
+ "requires_woocommerce_addon": false,
12
+ "requires_accessibility_addon": false,
13
+ "is_read_only": false,
14
+ "is_duplicate_first": false,
15
+ "version": "1.1.0",
16
+ "last_updated": "2026-05-24",
17
+ "tools_used": [
18
+ "respira_get_active_site",
19
+ "respira_get_site_context",
20
+ "respira_list_pages",
21
+ "respira_list_media",
22
+ "respira_get_option",
23
+ "respira_update_option",
24
+ "respira_read_theme_file",
25
+ "respira_extract_builder_content",
26
+ "respira_get_builder_info",
27
+ "respira_get_builder_inline_schemas",
28
+ "respira_build_page",
29
+ "respira_update_page"
30
+ ],
31
+ "detects": [
32
+ "logo_url",
33
+ "favicon",
34
+ "wordmark_text",
35
+ "primary_color",
36
+ "secondary_color",
37
+ "accent_color",
38
+ "neutral_scale",
39
+ "heading_typography",
40
+ "body_typography",
41
+ "spacing_scale",
42
+ "section_patterns",
43
+ "component_patterns",
44
+ "button_styles",
45
+ "card_styles"
46
+ ],
47
+ "generates": [
48
+ "design_system_json",
49
+ "design_system_summary_markdown",
50
+ "persisted_site_option",
51
+ "visible_style_guide_page",
52
+ "color_swatches_rendered",
53
+ "typography_samples_rendered",
54
+ "spacing_scale_visualized",
55
+ "component_previews"
56
+ ]
57
+ }
@@ -0,0 +1,204 @@
1
+ # Figma to Elementor
2
+
3
+ Rebuilds a Figma frame as a real, editable Elementor page on your WordPress site. Reads the Figma node tree (layers, auto-layout, text, colors, images), maps each node to its closest Elementor widget or container, generates a build plan for approval, and writes clean Elementor JSON to a draft duplicate so nothing live is touched. Use this skill whenever someone wants to turn a Figma design into an Elementor page, build a Figma mockup in Elementor, or hand a design off to WordPress without rebuilding it by hand.
4
+
5
+ ## What This Skill Does
6
+
7
+ Figma and Elementor describe a layout in very different ways. Figma stores a tree of nodes (frames, text, shapes, images) with auto-layout, constraints, and design tokens; Elementor stores a nested JSON tree in `_elementor_data` of sections/columns (or flex containers) and widgets. This skill bridges that gap by reading every Figma node, understanding its role, and recreating it as the right Elementor element with matching styling.
8
+
9
+ **Handles:**
10
+ - Frames and auto-layout → Elementor flex containers (or section/column on older sites): direction, gap, padding, alignment
11
+ - Text nodes → Heading (level inferred from font size) or Text Editor widgets
12
+ - Rectangles/ellipses with image fills → Image widgets; plain shapes → containers; vectors/icons → Image or Icon
13
+ - Lines → Divider widgets
14
+ - Repeated card/list patterns → recognised by layer name + structure: FAQ → Accordion, image rows → Gallery/Carousel, number+label → Counter, icon rows → Social Icons
15
+ - Typography (font family, size, weight, line-height, letter-spacing, transform, alignment)
16
+ - Colors (solid fills with opacity; linear/radial gradients with stops and angle)
17
+ - Spacing (padding, gaps), borders, border-radius (per-corner), box shadows, opacity
18
+ - Image fills downloaded from Figma and sideloaded into the WordPress media library
19
+ - The Figma color palette mapped to Elementor global colors so the design system carries over
20
+
21
+ **Preserves:**
22
+ - Text content, links, and media
23
+ - Layout structure and nesting (with junk single-child wrappers collapsed)
24
+ - The visual styling listed above, as closely as Elementor's rendering allows
25
+
26
+ ## What This Skill Does NOT Do
27
+
28
+ - **Pixel-perfect recreation** — Elementor renders with the browser box model, not Figma's canvas. Spacing and alignment land close but expect light manual fine-tuning.
29
+ - **Figma components with overrides / variants** — instances are flattened to inline content; component logic and variant swapping are flagged, not reproduced.
30
+ - **Prototyping and interactions** — Figma's click-throughs, smart-animate, and overlays have no Elementor equivalent and are skipped.
31
+ - **Complex vector art, masks, and blend modes** — exported as flattened images where possible, otherwise flagged.
32
+ - **Auto-generated responsive breakpoints** — the build targets desktop from the frame; tablet/mobile are noted for manual adjustment unless the design provides explicit responsive frames.
33
+ - **Theme builder parts** — headers, footers, archive/single templates are out of scope; this builds page content.
34
+ - **Fetching Figma for you without access** — you must have Figma read access available to your agent (see Requirements).
35
+
36
+ ## Requirements
37
+
38
+ - Respira for WordPress plugin installed and connected
39
+ - MCP connection active (desktop or WebMCP)
40
+ - Elementor active on the target site (to write the page)
41
+ - **Figma read access from your agent** — either a connected Figma MCP, or a Figma file/frame URL plus a Figma personal access token you can paste
42
+ - Write access to create a draft duplicate with the new Elementor content
43
+
44
+ ## Trigger Phrase
45
+
46
+ - "figma to elementor"
47
+
48
+ ## Alternative Triggers
49
+
50
+ - "build this figma design in elementor"
51
+ - "convert figma to elementor"
52
+ - "turn my figma frame into an elementor page"
53
+ - "rebuild this figma mockup in wordpress with elementor"
54
+ - "import figma into elementor"
55
+
56
+ ## Source: Figma
57
+
58
+ Figma exposes a design as a tree of nodes. Read it with whatever Figma access the agent has: a connected Figma MCP, or the Figma REST API (`GET /v1/files/:key/nodes?ids=:id` for the selected frame, `GET /v1/files/:key/images` to export image fills) using a personal access token.
59
+
60
+ Key node shapes to read:
61
+ - `type`: `FRAME`, `GROUP`, `TEXT`, `RECTANGLE`, `ELLIPSE`, `VECTOR`, `LINE`, `COMPONENT`, `INSTANCE`
62
+ - `layoutMode` (`HORIZONTAL`/`VERTICAL`/none), `itemSpacing`, `paddingLeft/Right/Top/Bottom`, `primaryAxisAlignItems`, `counterAxisAlignItems`, `layoutSizingHorizontal/Vertical` (`FILL`/`FIXED`/`HUG`)
63
+ - `style` for text: `fontFamily`, `fontSize`, `fontWeight`, `lineHeightPx`/`lineHeightPercent`, `letterSpacing`, `textAlignHorizontal`, `textCase`, `textDecoration`
64
+ - `fills` (SOLID with `color` + `opacity`; gradients with `gradientStops` + `gradientHandlePositions`), `strokes` + `strokeWeight`, `cornerRadius`/`rectangleCornerRadii`, `effects` (DROP_SHADOW/INNER_SHADOW), `opacity`
65
+ - `characters` (text content), and IMAGE fills (mark for download)
66
+
67
+ Pick one top-level frame at a time. Each direct child of that frame becomes an independently editable Elementor section/container.
68
+
69
+ ## Target: Elementor
70
+
71
+ Respira writes Elementor as a simplified tree of `{ type, widget, settings, elements }`, which the plugin normalizes/validates into real `_elementor_data` (v3 sections/columns or v4 atomic flex containers, auto-detected). You never hand-write raw Elementor JSON — you describe the tree and Respira emits the canonical shape.
72
+
73
+ - Containers: `{ type: "container", settings: {...}, elements: [...] }` (flex) or `section` + `column` on v3 sites
74
+ - Widgets: `{ type: "widget", widget: "heading", settings: { title: "..." } }`, `text-editor` (`editor`), `image`, `button`, `icon`, `divider`, `accordion`, `image-gallery`, `image-carousel`, `counter`, `social-icons`
75
+ - Write with `respira_build_page` (whole frame → page) or `respira_inject_builder_content` (append sections); `respira_convert_html_to_builder` is a fallback bridge; `respira_find_element`/`respira_update_element` for refinement.
76
+
77
+ ## Mapping (Figma → Elementor)
78
+
79
+ **Node type:**
80
+ - `TEXT` → `heading` if it reads like a heading (large/bold), else `text-editor`. Infer heading level by font size: ≥48 h1, ≥36 h2, ≥28 h3, ≥20 h4, ≥16 h5, else h6.
81
+ - `FRAME`/`GROUP`/auto-layout → `container` (flex). Flatten groups with no fills/strokes/effects; keep groups that carry styling.
82
+ - `RECTANGLE`/`ELLIPSE` with an IMAGE fill → `image`; otherwise → styled `container`.
83
+ - `VECTOR`/shape → `image` (export from Figma) or `icon`; `LINE` → `divider`.
84
+ - `INSTANCE`/`COMPONENT` → treated as a container; flag if it relies on overrides/variants.
85
+
86
+ **Auto-layout → flex container:**
87
+ - `layoutMode` HORIZONTAL → row, VERTICAL → column
88
+ - `itemSpacing` → gap; `padding*` → padding (per side, linked when equal)
89
+ - `primaryAxisAlignItems` → justify-content, `counterAxisAlignItems` → align-items (MIN→flex-start, CENTER→center, MAX→flex-end, SPACE_BETWEEN→space-between)
90
+ - child `layoutSizing` FILL → flex-grow, FIXED → fixed size, HUG → shrink-to-fit
91
+
92
+ **Typography → Elementor typography controls:** family, size (px), weight, line-height (px or %), letter-spacing, text-transform, text-decoration, alignment.
93
+
94
+ **Color:** solid fill → text/background color (+ opacity when <1). Gradient → gradient type (linear/radial), color stops with positions, and an angle computed from `gradientHandlePositions`.
95
+
96
+ **Box:** `strokes`+`strokeWeight` → border; `cornerRadius`/`rectangleCornerRadii` → border-radius (per-corner when provided); `effects` → box-shadow (offset/blur/spread/color); `opacity` → element opacity.
97
+
98
+ **Smart widgets (by layer name + structure):** a list whose items each hold a title + body → Accordion; a row that is ≥70% images → Gallery or Carousel (by layer name); a number + label pair → Counter; a row of 2+ icon shapes whose names match platforms → Social Icons. When unsure, fall back to plain containers + widgets.
99
+
100
+ **Images:** collect IMAGE fills, export from Figma, sideload with `respira_sideload_image`, and set the resulting media on the Elementor image widget/background.
101
+
102
+ **Design system:** map the frame's distinct fill colors to Elementor global colors (primary/secondary/accent/text) so later edits stay on-brand.
103
+
104
+ ## Execution Workflow
105
+
106
+ ### Phase 1: Read and audit
107
+ 1. Verify Respira + MCP via `respira_get_site_context`; confirm Elementor is active via `respira_list_plugins`. If not connected, stop and show setup guidance.
108
+ 2. Read the chosen Figma frame's node tree via the agent's Figma access.
109
+ 3. Build an inventory: node-type counts, smart-widget candidates, image fills to download, and flagged items (components with overrides, complex vectors/masks, prototyping, gradients beyond linear/radial).
110
+
111
+ ### Phase 2: Build plan
112
+ Present a short plan and get confirmation:
113
+ - Which frame → which new page title
114
+ - Mapping summary table (Figma node → Elementor element, Auto/Manual)
115
+ - Flagged items needing manual attention
116
+ - The global-color palette that will be created
117
+
118
+ > Ready to build? I'll create a **draft duplicate / new draft page** and write the Elementor version there. Nothing live is touched.
119
+ > 1. Build the whole frame
120
+ > 2. Build section by section (review as we go)
121
+ > 3. Just keep this plan
122
+
123
+ ### Phase 3: Build
124
+ For the approved frame:
125
+ 1. Take a snapshot when available (`respira_get_snapshot`) and create a draft target with `respira_create_page_duplicate` (or a new draft page).
126
+ 2. Map the Figma tree to the simplified Elementor tree using the mapping above; collapse empty wrappers.
127
+ 3. Sideload images (`respira_sideload_image`) and set them on the matching widgets.
128
+ 4. Create/align global colors so the palette carries over.
129
+ 5. Write with `respira_build_page` (or `respira_inject_builder_content` section by section). Annotate any unmapped node with a clear migration note.
130
+ 6. Report status for the frame before moving on.
131
+
132
+ ### Phase 4: Verify
133
+ 1. Summarize: sections/widgets built, images imported, items flagged.
134
+ 2. Provide the wp-admin/Elementor editor link to the draft.
135
+ 3. Give a checklist: open in the Elementor editor, check tablet/mobile, confirm images load, test links/buttons, review flagged items, compare against the Figma frame.
136
+
137
+ ## Safety Model
138
+
139
+ - Read-only Figma analysis and a full plan before any write
140
+ - Explicit confirmation before building
141
+ - Always writes to a **draft duplicate / new draft** — never an existing live page
142
+ - Never auto-publishes
143
+ - Snapshot before write when available; rollback path is to delete the draft
144
+ - Original Figma file is read-only and never modified
145
+
146
+ ## Honest Disclaimer
147
+
148
+ This skill rebuilds a Figma frame as an editable Elementor draft page.
149
+
150
+ It cannot:
151
+ - Guarantee pixel-perfect parity (different rendering engines)
152
+ - Reproduce Figma components/variants, prototyping, or complex masks/effects
153
+ - Auto-generate full responsive breakpoints from a single desktop frame
154
+ - Replace manual QA in the Elementor editor
155
+
156
+ It can:
157
+ - Turn a clean, auto-layout Figma frame into a structured Elementor page in minutes
158
+ - Preserve text, images, layout, typography, and color
159
+ - Carry the palette into Elementor global colors
160
+ - Flag exactly what needs a human, and keep everything live completely safe
161
+
162
+ ## Tooling
163
+
164
+ **Figma read** (agent-side): a connected Figma MCP, or the Figma REST API with a personal access token.
165
+
166
+ **Respira tools**
167
+ - `respira_get_site_context`
168
+ - `respira_list_plugins`
169
+ - `respira_get_builder_info`
170
+ - `respira_create_page_duplicate`
171
+ - `respira_get_snapshot`
172
+ - `respira_sideload_image`
173
+ - `respira_build_page`
174
+ - `respira_inject_builder_content`
175
+ - `respira_convert_html_to_builder`
176
+ - `respira_find_element`
177
+ - `respira_update_element`
178
+
179
+ ## Telemetry
180
+
181
+ After run completion, send fire-and-forget usage tracking to:
182
+
183
+ - `POST https://www.respira.press/api/skills/track-usage`
184
+
185
+ Include:
186
+ - `skill_slug = figma-to-elementor`
187
+ - site/version context
188
+ - duration and success
189
+ - frames built, widgets created, images imported, items flagged counts
190
+ - tools used
191
+
192
+ Never block user flow on telemetry failure.
193
+
194
+ ## Related Skills
195
+
196
+ - Design System Synthesizer (turn the imported palette/type into a site-wide system)
197
+ - HTML to Bricks (the same idea for a different target builder)
198
+ - SEO & AEO Amplifier (optimize the new page once it is built)
199
+ - WordPress Site DNA (understand the target site before importing)
200
+
201
+ ---
202
+
203
+ Built by Respira Team
204
+ https://respira.press/skills/figma-to-elementor