@respira/wordpress-mcp-server 7.3.0 → 7.4.1

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 (92) hide show
  1. package/dist/__tests__/site-list-self-heal.test.d.ts +18 -0
  2. package/dist/__tests__/site-list-self-heal.test.d.ts.map +1 -0
  3. package/dist/__tests__/site-list-self-heal.test.js +169 -0
  4. package/dist/__tests__/site-list-self-heal.test.js.map +1 -0
  5. package/dist/acf-tools.d.ts +0 -10
  6. package/dist/acf-tools.d.ts.map +1 -1
  7. package/dist/acf-tools.js +0 -15
  8. package/dist/acf-tools.js.map +1 -1
  9. package/dist/config.d.ts.map +1 -1
  10. package/dist/config.js +31 -36
  11. package/dist/config.js.map +1 -1
  12. package/dist/server.d.ts +34 -46
  13. package/dist/server.d.ts.map +1 -1
  14. package/dist/server.js +560 -463
  15. package/dist/server.js.map +1 -1
  16. package/dist/wordpress-client.d.ts +33 -29
  17. package/dist/wordpress-client.d.ts.map +1 -1
  18. package/dist/wordpress-client.js +124 -148
  19. package/dist/wordpress-client.js.map +1 -1
  20. package/package.json +2 -2
  21. package/skills/activity-report-composer/README.md +38 -0
  22. package/skills/activity-report-composer/SKILL.md +167 -0
  23. package/skills/activity-report-composer/metadata.json +42 -0
  24. package/skills/brand-voice-synthesizer/README.md +43 -0
  25. package/skills/brand-voice-synthesizer/SKILL.md +259 -0
  26. package/skills/brand-voice-synthesizer/metadata.json +46 -0
  27. package/skills/build-oxygen6-page/SKILL.md +59 -0
  28. package/skills/conversion-audit/README.md +37 -0
  29. package/skills/conversion-audit/SKILL.md +185 -0
  30. package/skills/conversion-audit/metadata.json +46 -0
  31. package/skills/custom-post-type-architect/README.md +34 -0
  32. package/skills/custom-post-type-architect/SKILL.md +158 -0
  33. package/skills/custom-post-type-architect/metadata.json +39 -0
  34. package/skills/design-system-synthesizer/README.md +46 -0
  35. package/skills/design-system-synthesizer/SKILL.md +395 -0
  36. package/skills/design-system-synthesizer/metadata.json +57 -0
  37. package/skills/figma-to-elementor/SKILL.md +204 -0
  38. package/skills/html-to-bricks/README.md +43 -0
  39. package/skills/html-to-bricks/SKILL.md +135 -0
  40. package/skills/html-to-bricks/metadata.json +41 -0
  41. package/skills/internal-link-builder/SKILL.md +258 -0
  42. package/skills/internal-link-builder/metadata.json +46 -0
  43. package/skills/migrate-beaver-builder-to-bricks/SKILL.md +251 -0
  44. package/skills/migrate-beaver-builder-to-gutenberg/SKILL.md +248 -0
  45. package/skills/migrate-brizy-to-gutenberg/SKILL.md +248 -0
  46. package/skills/migrate-divi-to-breakdance/SKILL.md +312 -0
  47. package/skills/migrate-divi-to-bricks/SKILL.md +321 -0
  48. package/skills/migrate-divi-to-gutenberg/SKILL.md +328 -0
  49. package/skills/migrate-elementor-to-breakdance/SKILL.md +287 -0
  50. package/skills/migrate-elementor-to-bricks/SKILL.md +289 -0
  51. package/skills/migrate-elementor-to-gutenberg/SKILL.md +327 -0
  52. package/skills/migrate-elementor-to-oxygen/SKILL.md +300 -0
  53. package/skills/migrate-oxygen-to-breakdance/SKILL.md +235 -0
  54. package/skills/migrate-oxygen-to-bricks/SKILL.md +237 -0
  55. package/skills/migrate-thrive-architect-to-gutenberg/SKILL.md +257 -0
  56. package/skills/migrate-visual-composer-to-gutenberg/SKILL.md +261 -0
  57. package/skills/migrate-wpbakery-to-bricks/SKILL.md +336 -0
  58. package/skills/migrate-wpbakery-to-gutenberg/SKILL.md +345 -0
  59. package/skills/mobile-experience-report/SKILL.md +719 -0
  60. package/skills/mobile-experience-report/telemetry.ts +137 -0
  61. package/skills/page-template-library/README.md +41 -0
  62. package/skills/page-template-library/SKILL.md +175 -0
  63. package/skills/page-template-library/metadata.json +44 -0
  64. package/skills/prime-the-agent/README.md +49 -0
  65. package/skills/prime-the-agent/SKILL.md +225 -0
  66. package/skills/prime-the-agent/metadata.json +46 -0
  67. package/skills/respira-setup-assistant/SKILL.md +386 -0
  68. package/skills/respira-setup-assistant/metadata.json +36 -0
  69. package/skills/seo-aeo-amplifier/README.md +61 -0
  70. package/skills/seo-aeo-amplifier/SKILL.md +277 -0
  71. package/skills/seo-aeo-amplifier/metadata.json +62 -0
  72. package/skills/stale-content-detector/README.md +41 -0
  73. package/skills/stale-content-detector/SKILL.md +156 -0
  74. package/skills/stale-content-detector/metadata.json +43 -0
  75. package/skills/technical-debt-audit/SKILL.md +691 -0
  76. package/skills/technical-debt-audit/telemetry.ts +142 -0
  77. package/skills/woocommerce-health-check/SKILL.md +719 -0
  78. package/skills/woocommerce-health-check/telemetry.ts +137 -0
  79. package/skills/wordpress-ai-image-optimizer/README.md +49 -0
  80. package/skills/wordpress-ai-image-optimizer/SKILL.md +232 -0
  81. package/skills/wordpress-ai-image-optimizer/metadata.json +63 -0
  82. package/skills/wordpress-site-dna/README.md +81 -0
  83. package/skills/wordpress-site-dna/SKILL.md +669 -0
  84. package/skills/wordpress-site-dna/telemetry.ts +137 -0
  85. package/dist/__tests__/acf-tool-routing.test.d.ts +0 -2
  86. package/dist/__tests__/acf-tool-routing.test.d.ts.map +0 -1
  87. package/dist/__tests__/acf-tool-routing.test.js +0 -37
  88. package/dist/__tests__/acf-tool-routing.test.js.map +0 -1
  89. package/dist/__tests__/cowork-bootstrap.test.d.ts +0 -2
  90. package/dist/__tests__/cowork-bootstrap.test.d.ts.map +0 -1
  91. package/dist/__tests__/cowork-bootstrap.test.js +0 -61
  92. package/dist/__tests__/cowork-bootstrap.test.js.map +0 -1
@@ -0,0 +1,43 @@
1
+ # HTML to Bricks Builder
2
+
3
+ > Convert raw HTML/CSS into native Bricks elements — design system bound, ACSS aware.
4
+
5
+ A designer hands you HTML/CSS from a Webflow export. Or you have an old static page you want to bring into your live Bricks site. Or you exported from Figma and need to land it in Bricks for further editing. This skill converts the HTML into a native Bricks element tree, with three protections built in.
6
+
7
+ ## What it does
8
+
9
+ 1. Converts HTML/CSS into Bricks elements (`section`, `block`, `container`, `heading`, `text-basic`, `button`, `image`, etc.) — never inline HTML
10
+ 2. **Maps colors and typography to your design system tokens** — so when the design system updates, the page updates with it
11
+ 3. **ACSS class mapping** when ACSS is installed — uses ACSS utilities for spacing and typography instead of inline settings
12
+ 4. SafeEdit on existing pages — never overwrites a live page directly
13
+
14
+ ## Three input modes
15
+
16
+ - Paste HTML directly in the conversation
17
+ - Give a public URL (the skill fetches the HTML; external images are flagged, not silently mirrored)
18
+ - Reference an HTML file
19
+
20
+ ## Why this resolves the open feature request
21
+
22
+ The top open feature request on the Respira board was "HTML to Bricks Builder." It's the most common pain point for designers handing off work to WordPress agencies. This skill closes that gap.
23
+
24
+ ## Triggers
25
+
26
+ - *"convert this html to bricks"*
27
+ - *"import this design into bricks"*
28
+ - *"paste html into bricks"*
29
+ - *"turn this html into a bricks page"*
30
+
31
+ ## Requires
32
+
33
+ - Respira for WordPress plugin
34
+ - **Bricks Builder active** (the skill verifies and stops if Bricks isn't the active builder)
35
+ - MCP server connected
36
+ - Recommended: design system synthesized first so token mapping works
37
+
38
+ ## What it does NOT do
39
+
40
+ - Convert HTML for Elementor, Divi, Gutenberg, or other builders (use the generic `convert_html_to_builder` workflow instead)
41
+ - Re-host external images automatically (flagged, never silently mirrored)
42
+ - Convert HTML forms into Bricks Form element 1:1 (flagged; you wire the form manually)
43
+ - Convert CSS keyframe animations (flagged)
@@ -0,0 +1,135 @@
1
+ # HTML to Bricks Builder
2
+
3
+ **Version:** 1.0.0
4
+ **Updated:** 2026-05-24
5
+ **Category:** migration
6
+ **Status:** stable
7
+ **Requires:** Respira for WordPress plugin 7.1+ + Bricks Builder active + MCP server
8
+
9
+ ---
10
+
11
+ ## Description
12
+
13
+ Convert raw HTML/CSS — pasted from a design export, a Figma extraction, an existing landing page on another platform, or a competitor's source code — into native Bricks Builder elements. Not a screenshot-to-builder pass; this is a structural conversion that respects Bricks' element schemas, ACSS classes (if installed), and the site's design system.
14
+
15
+ Resolves [open feature request: HTML to Bricks Builder]. Uses the existing `respira_convert_html_to_builder` MCP tool, with a Bricks-specific workflow layered on top.
16
+
17
+ ---
18
+
19
+ ## When to Use
20
+
21
+ - A designer hands you HTML/CSS from a Webflow export, a Framer export, or a CodePen
22
+ - You're rebuilding a competitor's landing page (legally — don't copy proprietary work) and want to start from their structure
23
+ - You have an old static HTML page you want to bring into your live Bricks-powered site
24
+ - You're prototyping a section in HTML and want to land it in Bricks for further editing
25
+
26
+ ---
27
+
28
+ ## Trigger Phrases
29
+
30
+ - "convert this html to bricks"
31
+ - "import this design into bricks"
32
+ - "paste html into bricks"
33
+ - "html to bricks"
34
+ - "turn this html into a bricks page"
35
+ - "bring this codepen into bricks"
36
+
37
+ ---
38
+
39
+ ## Execution Workflow
40
+
41
+ ### Step 1 — Verify Bricks is active
42
+
43
+ Call `respira_get_builder_info`. If the active builder is NOT Bricks, stop and tell the user: *"This skill targets Bricks Builder. Your active builder is {X}. Use the generic `convert html to builder` workflow instead, or switch the active builder."*
44
+
45
+ If Bricks is active, capture its version.
46
+
47
+ ### Step 2 — Confirm site + target page
48
+
49
+ Call `respira_get_active_site`. Ask:
50
+
51
+ - *"Convert the HTML into a new page (I'll create it), or into an existing page (you tell me which)?"*
52
+ - If existing: confirm the page ID and remind the user that a SafeEdit duplicate will be created.
53
+
54
+ ### Step 3 — Pull design system if present
55
+
56
+ Call `respira_get_option('respira_design_system')`. If present, capture colors, typography, spacing tokens. The conversion will map raw CSS values (e.g. `#2563EB`) to design system tokens (e.g. `primary`) so the converted page is drift-resistant.
57
+
58
+ ### Step 4 — Accept the HTML input
59
+
60
+ Three input modes:
61
+
62
+ - **Mode A — pasted in the conversation.** The user pastes raw HTML directly.
63
+ - **Mode B — URL.** The user gives a public URL; fetch the HTML via WebFetch or `/browse`. **Do NOT silently re-host external assets**; flag external images so the user can decide to mirror them.
64
+ - **Mode C — file.** The user uploads or references a local HTML file path.
65
+
66
+ In all modes, also accept inline `<style>` blocks and external `<link rel=stylesheet>` references. For external stylesheets, fetch their text content.
67
+
68
+ ### Step 5 — Run the conversion
69
+
70
+ Call `respira_convert_html_to_builder` with `builder=bricks`, the HTML, the CSS, and the design-system context.
71
+
72
+ The MCP tool returns a Bricks element tree. Each element has a `name` (Bricks element type — `section`, `block`, `container`, `heading`, `text-basic`, `button`, `image`, etc.) and `settings` matching the Bricks schema.
73
+
74
+ ### Step 6 — Map raw values to design system tokens
75
+
76
+ For each element in the tree:
77
+
78
+ - If `settings.color` is a hex value matching one of the design system colors, replace with a token reference
79
+ - If `settings.typography.font-family` matches the design system heading or body family, replace with a token reference
80
+ - If `settings.padding`, `settings.margin`, `settings.gap` are pixel values matching the design system spacing scale, replace with token references
81
+
82
+ This step is the difference between a one-off conversion and a maintainable page. After the conversion, if the user updates the design system, the converted page reflects it.
83
+
84
+ ### Step 7 — ACSS class mapping (if ACSS detected)
85
+
86
+ Call `respira_get_option('automatic_css_settings')` or check the active theme for ACSS. If ACSS is installed:
87
+
88
+ - Map common CSS patterns to ACSS classes
89
+ - `padding: 96px 24px` → ACSS section padding utility
90
+ - `max-width: 1280px; margin: 0 auto` → ACSS container class
91
+ - Heading font sizes → ACSS heading scale classes
92
+
93
+ This is optional and gated on ACSS being present. If ACSS isn't installed, fall through to inline settings.
94
+
95
+ ### Step 8 — Inject into the page
96
+
97
+ For a new page: call `respira_build_page` with the Bricks element tree as the page body.
98
+
99
+ For an existing page: call `respira_create_page_duplicate` first (SafeEdit), then `respira_inject_builder_content` against the duplicate.
100
+
101
+ Output the new (or duplicate) page URL.
102
+
103
+ ### Step 9 — Verify
104
+
105
+ Open the new page in the Bricks editor (the URL pattern is `/?bricks=run&page_id={id}`). Visually verify:
106
+
107
+ - All sections render
108
+ - Typography looks correct
109
+ - Colors map to design system tokens
110
+ - Spacing is consistent
111
+ - Images load (warn if any external image URLs were preserved unmirrored)
112
+
113
+ If anything is off, the user can refine in the Bricks editor directly. Common issues to flag:
114
+
115
+ - HTML elements Bricks doesn't have a 1:1 mapping for (e.g. `<details>` collapsible → mapped to Bricks accordion)
116
+ - Forms — HTML `<form>` doesn't convert into Bricks Form element 1:1. Flag and ask the user to wire the form fields manually.
117
+ - Custom animations — CSS keyframes don't convert. Flag.
118
+
119
+ ---
120
+
121
+ ## Hard rules
122
+
123
+ - **Bricks-only.** This skill is locked to Bricks. For other builders, use the generic `convert_html_to_builder` workflow.
124
+ - **Never inject HTML directly into the page body.** If the conversion can't map an HTML element to a Bricks element, the skill must report the failure and let the user decide. Do not fall back to a "code block" element that pastes raw HTML — that recreates the do-not-write-raw-HTML failure mode.
125
+ - **External assets are flagged, not mirrored.** Don't silently download external images and side-load them. Flag them so the user explicitly decides to mirror.
126
+ - **Always SafeEdit on existing pages.** Never convert HTML into a live page directly. Duplicate first.
127
+ - **Design system tokens take precedence over raw values.** When a CSS hex matches a design system color, use the token. Always.
128
+
129
+ ---
130
+
131
+ ## Telemetry
132
+
133
+ Records: site URL hash, Bricks version, HTML input size (bytes), elements converted count, design system bound, ACSS detected, success/failure, total duration. No HTML content, no element names, no page IDs sent.
134
+
135
+ Endpoint: `POST https://www.respira.press/api/skills/track-usage`
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "HTML to Bricks Builder",
3
+ "slug": "html-to-bricks",
4
+ "icon": "🧱",
5
+ "category": "migration",
6
+ "description": "Convert raw HTML/CSS into native Bricks Builder elements. Maps colors, typography, and spacing to your design system tokens so the result is drift-resistant. ACSS class mapping when ACSS is installed. Resolves the most-upvoted open feature request.",
7
+ "author": "Respira Team",
8
+ "author_url": "https://respira.press",
9
+ "trigger": "convert this html to bricks",
10
+ "requires_respira": true,
11
+ "requires_woocommerce_addon": false,
12
+ "requires_accessibility_addon": false,
13
+ "is_read_only": false,
14
+ "is_duplicate_first": true,
15
+ "version": "1.0.0",
16
+ "last_updated": "2026-05-24",
17
+ "tools_used": [
18
+ "respira_get_active_site",
19
+ "respira_get_builder_info",
20
+ "respira_get_option",
21
+ "respira_convert_html_to_builder",
22
+ "respira_build_page",
23
+ "respira_create_page_duplicate",
24
+ "respira_inject_builder_content"
25
+ ],
26
+ "detects": [
27
+ "active_bricks_version",
28
+ "design_system_tokens",
29
+ "acss_installation",
30
+ "external_assets",
31
+ "unmappable_html_elements",
32
+ "form_elements"
33
+ ],
34
+ "generates": [
35
+ "bricks_element_tree",
36
+ "design_system_bound_settings",
37
+ "acss_class_mappings",
38
+ "external_asset_warnings",
39
+ "new_or_duplicate_page"
40
+ ]
41
+ }
@@ -0,0 +1,258 @@
1
+ # Internal Link Builder
2
+
3
+ **Version:** 1.2.0
4
+ **Updated:** 2026-06-30
5
+ **Freshly updated:** v1.2.0 snapshots every page with `respira_get_snapshot` before touching links, locates the exact target paragraph with `respira_find_element` and inserts contextual links there with `respira_update_element` instead of rewriting whole pages, applies links across many pages in one pass with `respira_batch_update`, and persists the per-site linking strategy (anchor-text rules, clusters already built, do-not-link pairs) via `respira_get_option` / `respira_update_option` so repeat runs build on prior work.
6
+
7
+ Strategic internal link building for WordPress sites. Analyzes all published content, maps topic relationships, identifies high-value linking opportunities between pages, and presents a clear plan for approval before making any changes. Use this skill whenever someone mentions internal links, link building, content interlinking, orphaned pages that need links, topic clusters, pillar pages, or wants to improve their site's internal link structure for SEO.
8
+
9
+ ## What This Skill Does
10
+
11
+ Internal links are one of the highest-leverage on-page SEO tactics — they distribute page authority, help search engines understand site structure, and guide visitors to related content. Most WordPress sites under-link dramatically, leaving value on the table.
12
+
13
+ This skill reads every published page and post, builds a content relationship map, and finds natural opportunities to connect related content through contextual links. It always shows you the full plan before touching anything.
14
+
15
+ **Finds:**
16
+ - Orphaned content (pages/posts with zero or few inbound internal links)
17
+ - Hub pages that should link to related sub-pages but don't
18
+ - Blog posts that reference topics covered by other pages without linking
19
+ - Pillar/cluster opportunities (topically related content that should be interlinked)
20
+ - Pages with high authority potential that aren't distributing link equity
21
+ - Over-linked pages (too many outbound links diluting value)
22
+ - Missing contextual links (mentions of topics without corresponding links)
23
+
24
+ **Recommends:**
25
+ - Specific source page → target page link pairs
26
+ - Suggested anchor text (natural, descriptive, not keyword-stuffed)
27
+ - Link placement context (which paragraph/section the link belongs in)
28
+ - Priority ranking (high/medium/low impact)
29
+ - Reasoning for each recommendation (why this link makes sense)
30
+
31
+ ## Requirements
32
+
33
+ - Respira for WordPress plugin installed and connected
34
+ - MCP connection active (desktop or WebMCP)
35
+ - Read access to scan site content
36
+ - Write access to create duplicates (only if user approves changes)
37
+
38
+ ## Trigger Phrase
39
+
40
+ - "build internal links"
41
+
42
+ ## Alternative Triggers
43
+
44
+ - "improve internal linking"
45
+ - "find internal link opportunities"
46
+ - "interlink my content"
47
+ - "fix orphaned pages"
48
+ - "create topic clusters"
49
+ - "link my pages together"
50
+ - "internal link audit"
51
+
52
+ ## Execution Workflow
53
+
54
+ ### Phase 1: Content Inventory & Mapping
55
+
56
+ 1. Verify Respira + MCP connection via `respira_get_site_context`. If unavailable, stop and show setup guidance.
57
+ 2. Load any saved linking strategy for this site via `respira_get_option` (key `respira_internal_link_strategy`). If present, it carries the anchor-text conventions, topic clusters already built, and do-not-link pairs from previous runs. Use it so a repeat run extends prior work instead of re-proposing the same links. If absent, start fresh and write it back in Phase 4.
58
+ 3. Fetch all published content:
59
+ - `respira_list_pages` — get all pages
60
+ - `respira_list_posts` — get all posts
61
+ 4. For each content item, load full content:
62
+ - `respira_read_page` or `respira_read_post`
63
+ - Extract: title, URL/slug, headings, main topics, existing internal links, word count
64
+ 5. Build a **content map** — a structured index of:
65
+ - Each page/post's primary topic and subtopics
66
+ - Keywords and phrases each piece targets
67
+ - Existing internal links (source → target pairs)
68
+ - Inbound link count per page
69
+ - Content type (pillar page, blog post, product page, landing page, etc.)
70
+
71
+ ### Phase 2: Opportunity Analysis
72
+
73
+ Analyze the content map to find linking opportunities. For each potential link, evaluate:
74
+
75
+ 1. **Topical relevance** — Does the source content naturally relate to the target? Only recommend links where the connection is genuinely useful to a reader. A link should feel like a helpful "read more about this" moment, not a forced SEO play.
76
+
77
+ 2. **Context fit** — Is there a natural place in the source content where the link fits? Look for:
78
+ - Mentions of the target page's topic without an existing link
79
+ - Paragraphs that discuss related concepts
80
+ - Lists or resource sections where the target would be a natural addition
81
+ - Introductions or conclusions that reference broader topics
82
+
83
+ 3. **Link equity value** — Consider:
84
+ - Orphaned pages (0-1 inbound links) get priority as targets
85
+ - High-traffic/high-authority pages are valuable as sources
86
+ - Deep pages that are hard to reach from navigation benefit most
87
+ - Don't over-link any single page (diminishing returns after ~3-5 new links per page)
88
+
89
+ 4. **Anchor text quality** — Suggest anchor text that:
90
+ - Reads naturally in context
91
+ - Describes what the reader will find (not "click here")
92
+ - Uses relevant keywords without being spammy
93
+ - Varies across different links to the same target
94
+
95
+ ### Phase 3: Present the Plan
96
+
97
+ Present the linking plan as a clear, scannable report. Group recommendations by priority:
98
+
99
+ ```
100
+ ## Internal Link Building Plan
101
+
102
+ ### Site Overview
103
+ - Total pages/posts scanned: X
104
+ - Existing internal links found: X
105
+ - Orphaned content (0-1 inbound links): X
106
+ - New links recommended: X
107
+
108
+ ### High Priority (orphaned pages & pillar connections)
109
+
110
+ 1. **[Source Page Title]** → **[Target Page Title]**
111
+ - Why: [Brief reasoning — e.g., "Source discusses WordPress security but doesn't link to your dedicated security guide"]
112
+ - Anchor text: "[suggested anchor text]"
113
+ - Placement: [Where in the source content — e.g., "In the paragraph about plugin vulnerabilities (under H2 'Keeping Your Site Safe')"]
114
+
115
+ 2. ...
116
+
117
+ ### Medium Priority (topical cluster links)
118
+ ...
119
+
120
+ ### Low Priority (nice-to-have contextual links)
121
+ ...
122
+
123
+ ### Summary
124
+ - High priority: X links (strongly recommended)
125
+ - Medium priority: X links (good for SEO)
126
+ - Low priority: X links (optional enhancement)
127
+ ```
128
+
129
+ Then ask:
130
+
131
+ > Here's the internal linking plan. Would you like me to:
132
+ > 1. Apply all recommendations (creates duplicates for review)
133
+ > 2. Apply only high-priority links
134
+ > 3. Let you pick specific links to apply
135
+ > 4. Just keep this as a reference — no changes
136
+
137
+ Wait for explicit confirmation before proceeding.
138
+
139
+ ### Phase 4: Apply Links (Only If Approved)
140
+
141
+ 1. Before any edits, snapshot the pages you're about to touch with `respira_get_snapshot`. One snapshot covers the run and makes the whole pass reversible in one step via `respira_restore_snapshot`. This replaces the older duplicate-first dance for the common case: you edit in place, but the snapshot is the safety net. (Duplicate-first via `respira_create_page_duplicate` / `respira_create_post_duplicate` remains an option when the user explicitly wants a side-by-side draft to review before publishing.)
142
+ 2. For each approved link, find the exact insertion point rather than rewriting the page:
143
+ - Use `respira_find_element` to locate the target paragraph or block where the link belongs (match on the surrounding text or heading recorded in the plan's Placement note)
144
+ - Apply the link to just that element with `respira_update_element`, inserting `<a href="...">anchor text</a>` inline in the matched text. This leaves the rest of the page byte-for-byte unchanged.
145
+ - Respect the page builder format (Gutenberg blocks, Divi shortcodes, Elementor data, etc.). For deep structural cases use `respira_extract_builder_content` to understand the node tree first.
146
+ 3. When many pages get links in the same run, apply them in one pass with `respira_batch_update` instead of a separate write per page. Build the edit list (page/post id + element target + new markup) from the approved plan and submit it together. Fall back to individual `respira_update_element` / `respira_update_page` / `respira_update_post` calls only for one-off insertions.
147
+ 4. After all edits are applied, provide a summary:
148
+ - Number of pages modified
149
+ - Total links added
150
+ - The snapshot id for rollback, plus links to review the modified pages in WordPress admin
151
+ 5. Persist the updated linking strategy with `respira_update_option` (key `respira_internal_link_strategy`): record the clusters now built, the anchor-text conventions used, and any do-not-link pairs, so the next run starts from this state.
152
+
153
+ ## Link Quality Rules
154
+
155
+ These rules prevent the skill from making harmful or spammy recommendations:
156
+
157
+ - **Relevance first** — Never recommend a link purely for SEO mechanics. Every link must be genuinely useful to a human reader navigating between the two pages.
158
+ - **No self-links** — Don't link a page to itself.
159
+ - **No duplicate links** — Don't recommend a link that already exists on the source page.
160
+ - **Respect existing links** — If a paragraph already has 2+ links, don't add more to it. Link density matters for readability.
161
+ - **Natural anchor text** — No exact-match keyword stuffing. Anchor text should read as part of the sentence.
162
+ - **Builder-aware** — When inserting links, preserve the page builder's content format. Don't break Divi shortcodes, Elementor JSON, or Gutenberg block markup.
163
+ - **Conservative by default** — When in doubt about a link's relevance, leave it out. It's better to recommend 10 great links than 30 mediocre ones.
164
+
165
+ ## Output Format
166
+
167
+ Always include:
168
+
169
+ 1. **Site content summary** (pages/posts scanned, existing link density)
170
+ 2. **Content map highlights** (topic clusters identified, orphaned content found)
171
+ 3. **Prioritized linking plan** (high/medium/low with reasoning for each)
172
+ 4. **Clear confirmation prompt** — never proceed without approval
173
+ 5. **Impact estimate** (which orphaned pages get rescued, which clusters get strengthened)
174
+
175
+ If changes are applied, also include:
176
+
177
+ 6. **Change summary** (pages modified, links added, snapshot id)
178
+ 7. **Review instructions** (which pages to review in WordPress, and how to roll back)
179
+
180
+ ## Safety Model
181
+
182
+ - Read-only analysis first — full content scan before any changes
183
+ - Explicit user confirmation before any edits
184
+ - Snapshot before writing — `respira_get_snapshot` captures the pages first, so the whole run reverts in one step via `respira_restore_snapshot`
185
+ - Targeted edits — `respira_find_element` + `respira_update_element` change only the matched paragraph, leaving the rest of the page untouched (no whole-page rewrite)
186
+ - Duplicate-first remains available when the user wants a side-by-side draft instead of an in-place edit
187
+ - Provides rollback guidance (restore the snapshot if not wanted)
188
+ - Preserves all existing content and links — only adds, never removes
189
+
190
+ ## Honest Disclaimer
191
+
192
+ This skill identifies internal linking opportunities and creates optimized duplicates for review.
193
+
194
+ It cannot:
195
+ - Guarantee ranking improvements
196
+ - Fix external/backlink profile
197
+ - Replace a proper content strategy
198
+ - Publish changes without your review
199
+
200
+ It can:
201
+ - Find genuine content relationships you've missed
202
+ - Rescue orphaned pages from obscurity
203
+ - Strengthen topical clusters with contextual links
204
+ - Save hours of manual content auditing
205
+
206
+ ## Tooling
207
+
208
+ **Core WordPress tools**
209
+ - `respira_get_site_context`
210
+ - `respira_list_pages`
211
+ - `respira_list_posts`
212
+ - `respira_read_page`
213
+ - `respira_read_post`
214
+ - `respira_extract_builder_content`
215
+ - `respira_inject_builder_content`
216
+ - `respira_create_page_duplicate`
217
+ - `respira_create_post_duplicate`
218
+ - `respira_update_page`
219
+ - `respira_update_post`
220
+
221
+ **Targeted insertion (preferred for link edits)**
222
+ - `respira_find_element` — locate the exact target paragraph/block for contextual insertion
223
+ - `respira_update_element` — insert the link into just that element, no whole-page rewrite
224
+ - `respira_batch_update` — apply links across many pages in one pass
225
+
226
+ **Snapshot & rollback**
227
+ - `respira_get_snapshot` — capture pages before editing
228
+ - `respira_restore_snapshot` — one-step revert
229
+
230
+ **Per-site strategy persistence**
231
+ - `respira_get_option` — load the saved linking strategy (`respira_internal_link_strategy`)
232
+ - `respira_update_option` — persist clusters built, anchor-text rules, and do-not-link pairs
233
+
234
+ ## Telemetry
235
+
236
+ After run completion, send fire-and-forget usage tracking to:
237
+
238
+ - `POST https://www.respira.press/api/skills/track-usage`
239
+
240
+ Include:
241
+ - `skill_slug = internal-link-builder`
242
+ - site/version context
243
+ - duration and success
244
+ - pages scanned, links recommended, links applied counts
245
+ - tools used
246
+
247
+ Never block user flow on telemetry failure.
248
+
249
+ ## Related Skills
250
+
251
+ - SEO & AEO Amplifier (complements this — run SEO audit first, then build links)
252
+ - WordPress Site DNA (understand site structure before linking)
253
+ - Technical Debt Audit
254
+
255
+ ---
256
+
257
+ Built by Respira Team
258
+ https://respira.press/skills/internal-link-builder
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "Internal Link Builder",
3
+ "slug": "internal-link-builder",
4
+ "icon": "🔗",
5
+ "category": "performance",
6
+ "description": "Strategic internal link building for WordPress sites. Scans all content, maps topic relationships, identifies linking opportunities between pages, and presents a plan for approval before making changes.",
7
+ "author": "Respira Team",
8
+ "author_url": "https://respira.press",
9
+ "trigger": "build internal links",
10
+ "requires_respira": true,
11
+ "requires_woocommerce_addon": false,
12
+ "requires_accessibility_addon": false,
13
+ "is_read_only": false,
14
+ "is_duplicate_first": true,
15
+ "version": "1.1.0",
16
+ "last_updated": "2026-05-24",
17
+ "tools_used": [
18
+ "respira_get_site_context",
19
+ "respira_list_pages",
20
+ "respira_list_posts",
21
+ "respira_read_page",
22
+ "respira_read_post",
23
+ "respira_extract_builder_content",
24
+ "respira_inject_builder_content",
25
+ "respira_create_page_duplicate",
26
+ "respira_create_post_duplicate",
27
+ "respira_update_page",
28
+ "respira_update_post"
29
+ ],
30
+ "detects": [
31
+ "orphaned_pages",
32
+ "missing_contextual_links",
33
+ "weak_topic_clusters",
34
+ "over_linked_pages",
35
+ "under_linked_pages",
36
+ "hub_pages_without_spokes",
37
+ "topic_mentions_without_links"
38
+ ],
39
+ "generates": [
40
+ "internal_link_recommendations",
41
+ "anchor_text_suggestions",
42
+ "content_relationship_map",
43
+ "linking_priority_plan",
44
+ "optimized_duplicates_with_links"
45
+ ]
46
+ }