From rolepod-wplab
Read or modify page-builder layouts on a connected target — Elementor, Divi, Oxygen, Bricks widget trees. Phase = Build.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rolepod-wplab:wp-edit-designWhen to use
user wants to design / change a page visually via a page builder, OR mentions any of "elementor / divi / oxygen / bricks"
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
If the marker file `$GIT_ROOT/.rolepod/parent-active` exists, follow the
If the marker file $GIT_ROOT/.rolepod/parent-active exists, follow the
with-rolepod mode — return the edit diff only. The parent's
implement-plan owns verify + review; do not re-run them here.
Otherwise, follow standalone mode — edit + impact analysis + verification suggestion in one flow.
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) || GIT_ROOT="$PWD"
if [ -f "$GIT_ROOT/.rolepod/parent-active" ]; then
MODE=with-rolepod
else
MODE=standalone
fi
Page-builder layout writes. Auto-detects the active builder, backs up before overwrite, and writes the builder-native data shape. Theme-level config (theme.json, global-styles, child themes, theme switch) lives in wp-edit-theme.
Skip when:
wp-edit-theme.wp-content.wp-edit-plugin.wp-scaffold.Owns:
rolepod_wp_elementor_{read,write} — _elementor_data widget tree.rolepod_wp_divi_{read,write} — et_pb_* shortcode tree in post_content.rolepod_wp_oxygen_{read,write} — Oxygen JSON in ct_builder_* post meta.rolepod_wp_bricks_{read,write} — Bricks JSON in _bricks_page_content_2 meta.Does not own:
wp-edit-theme.wp-edit-plugin.wp-scaffold.wp-scaffold.Return / hand off:
wp-content).wp-edit-plugin for Yoast/RankMath.page_id (post/page ID) + the builder name (or auto-detect).If the user named one ("edit in Elementor"), use it. Else call rolepod_wp_builder_detect (Phase 6.2) which inspects the active plugin list. Falls back to per-builder *_read probes returning detected: true. See references/builder-formats.md for the per-builder detection signal.
Before constructing a widget tree, READ the relevant builder catalog:
references/builders/elementor.md — widget list + settings + quirks + CSS-to-widget-DOM mapreferences/builders/bricks.md, divi.md, gutenberg.md — same shape for the other supported buildersAlso read references/patterns.md — mockup pattern → recipe map (P-001 hero, P-002 feature grid, P-003 FAQ accordion, etc). Each pattern lists the exact widget composition + theme CSS classes + known quirks.
Always read before write. The structures are non-obvious — see references/builder-formats.md for each shape. When CLONING from an existing page, use rolepod_wp_elementor_template_export to dump that page's tree.
For each section of the mockup, follow the decision flowchart in references/patterns.md:
1. Pattern match in patterns.md? → use the recipe.
2. Otherwise look up a widget in the builder catalog that covers ≥70% of the visual.
3. Compose: section + columns + native widgets + _css_classes.
4. Only when no native widget fits → HTML widget per CARD (NOT per section).
5. If the entire section is a single decorative block (terminal, marquee) → ONE HTML widget for that section is acceptable.
Describe the change to the user in plain text BEFORE writing the new tree: "I will add a 3-column section with icon-box widgets X, Y, Z between the current hero and the testimonial block." If the user has not approved, do not write.
Run rolepod_wp_elementor_validate_data on the section tree you're about to commit. Catches setting shape mismatches (legacy icon Array bug, unknown setting keys, wrong value types) against the live widget schema fetched from the target.
All adapter *_write calls accept backup: true (default true on this skill). The adapter writes <key>_wplab_backup containing the prior tree. Surface the backup key so the user can rollback manually. For Elementor specifically, prefer rolepod_wp_elementor_template_apply — handles _elementor_data + flags + element id regeneration + cache invalidation atomically.
After write, run rolepod_wp_elementor_html_audit. Reports HTML widget percentage per page + lists candidates for refactoring to native widgets. If the audit reports > 30% HTML widget, consider a refactor pass.
For Elementor, run rolepod_wp_elementor_publish(post_id) — runs wp elementor flush-css + wp cache flush + bumps filemtime() on every *.css/*.js under the active theme's assets/ dir + (optionally) warm-fetches the permalink.
Call wp-health-check. If the change touched theme.json or global-styles → also rest_request GET /wp/v2/global-styles/<id> to confirm the new value is loadable. For visual verification, run rolepod-uiproof's verify-ui flow with text_visible assertions for each new section's headline.
rolepod:ui-ux-designer for layout decisions + accessibility checks.rolepod:frontend-developer for component-level JS/CSS.No durable artifact per call. The adapter's backup meta is the rollback artifact, named <original_key>_wplab_backup and held in wp_postmeta.
Read when constructing a widget tree non-trivially or when the diff is multi-section:
examples/design-examples.md — good vs bad Elementor section edit; good vs bad theme.json palette change.Load before the FIRST write for any given builder on a target:
references/builder-formats.md — per-builder data shape, detection signal, common pitfalls (Elementor widget vs section vs column, Divi shortcode escaping, Oxygen flat-array refs, Bricks element nesting).references/builders/elementor.md — Elementor widget catalog + settings + quirks + CSS-to-widget-DOM map. READ before writing _elementor_data.references/builders/bricks.md — Bricks element catalog.references/builders/divi.md — Divi module catalog.references/builders/gutenberg.md — Gutenberg core blocks + popular block library catalog.references/builders/oxygen.md — Oxygen primitives catalog.references/patterns.md — builder-agnostic mockup pattern → recipe map. P-001 through P-012 cover hero, feature grid, FAQ, stat row, pricing, process, portfolio, marquee, terminal, big CTA, header, footer. READ for every page build — most mockup sections have a canonical recipe.The single most important rule for AI-driven page builds. Posted prominently in every catalog. Restated:
For each section of the mockup:
1. Look up the pattern in references/patterns.md.
- Match? → Use the recipe exactly. Done.
2. No pattern match? → Open the relevant builder catalog.
- Find a widget that covers ≥70% of the visual.
- Compose: section + column + that widget + _css_classes.
3. No native widget fits? → HTML widget PER CARD (NOT per section).
- e.g., a 3-tier pricing row = section + 3 columns + HTML widget per tier card,
NEVER one HTML widget for the whole row.
4. Single decorative block (terminal, marquee, scramble headline)?
- One HTML widget for that section is acceptable.
5. After build:
- rolepod_wp_elementor_validate_data → catches setting shape errors
- rolepod_wp_elementor_html_audit → refuses if HTML widget > 30%
- rolepod_wp_elementor_publish → flushes + warm-fetches
*_write returns BUILDER_NOT_ACTIVE → STOP, tell user to activate the plugin or pick a different builder.*_write returns BACKUP_FAILED → STOP, do NOT retry without backup; the postmeta write failed and writing forward could lose the live tree.json_last_error; ask user to confirm the patch.Full Rolepod adds visual-diff confirmation via the rolepod-uiproof sibling (snapshot before + after, surface side-by-side). Standalone, the user reviews live.
wp-health-check.wp-edit-plugin.wp-edit-design.npx claudepluginhub nuttaruj/rolepod-wplab --plugin rolepod-wplabGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.