Divi 5 Builder Skill
Build modern, VB-editable Divi 5 pages programmatically via MCP tools.
DiviOps harness conventions
Cross-cutting contracts the Divi-builder tools inherit — response envelope ({ ok, data?, error: { code, message, hint?, data? } }), capability handshake / three-layer gating, dry_run plan shape, idempotency conventions, and namespace-prefixed error codes (<ns>.not_configured gate vs <ns>.command_failed runtime) — live in the diviops/ primer skill. SCF coverage lives in diviops-scf/. When this skill references "the standardized envelope" or "the capability handshake," the primer is the source.
Reference Files
Read the right file for the task at hand — don't load everything.
| Task | Read first |
|---|---|
| Using MCP tools & targeting | tools.md |
| Creating/editing pages | design-guide.md → module-formats.md |
| Copy-paste minimum-valid block snippets | minimal-snippets.md (Heading, Text, Button, Blurb, Icon, Image) |
| Module attribute paths | module-formats.md (Tier 1 free — Tier 2 patterns + Tier 3 per-module are Pro) |
| Adding CSS classes to modules | design-effects.md — uses module.decoration.attributes, NOT className |
| CSS effects & WebGL shaders | design-effects.md |
| Mega menus & navigation | mega-menu-pattern.md |
| Presets & cleanup | presets.md |
| Design system setup | SKILL.md (below) → presets.md |
| Page templates | patterns/ — SaaS landing, more coming |
Workflow Best Practices
- Build incrementally:
create_page→section_append× N - Always label sections:
meta.adminLabelon every section - Label key modules: Add admin labels to modules you might edit later
- Validate before saving: Use
diviops_validate_blocksbeforediviops_page_update_content,diviops_tb_layout_update, ordiviops_library_save - Use
diviops_meta_find_icon: Don't guess icon codes — search by keyword - Prefer VB-native: Use Divi attributes over CSS whenever possible; for Divi-owned spacing, sizing, and visibility issues, find the native setting before reaching for CSS
- Font inheritance: Set global fonts via theme options, skip explicit
familyon modules - Use semantic HTML: Set
elementTypefor SEO/accessibility (header,nav,main,article,footer) - Always use section/row/column structure: Wrapperless top-level modules lose styling
- Cache invalidation: All write tools auto-invalidate Divi's CSS cache. If styles appear stale, hard-refresh the browser.
Verification convention
Skill docs label findings by evidence quality. Runtime acceptance ≠ VB compatibility — a path can render correctly via MCP write but get rewritten or rejected on VB save. When citing or extending these docs, preserve the existing tier:
| Marker | Meaning | When to use |
|---|---|---|
*(VB-verified YYYY-MM-DD)* | User saved the shape in VB; observed in registry/markup as-written | Canonical. Safe to author from MCP and expect VB round-trip. |
*(verified YYYY-MM-DD)* or *(empirically verified ...)* | Frontend renders correctly OR runtime accepts the shape, but VB round-trip not exercised | Use the path, but flag the limitation. Schema-canonical path may differ. Cross-check *PresetAttrsMap.php if possible. |
<!-- UNVERIFIED --> | Neither VB-tested nor render-confirmed | Mark explicitly. Don't ship downstream tooling that depends on it. |
The two real failure modes this prevents (feedback_schema_canonical_path, feedback_vb_first_verification):
- A path that renders but is not VB-editable — downstream user opens VB, value silently re-resolves to default
- A path that runtime accepts but VB rewrites on save — the very next user save undoes our write
Upgrade tier by VB round-trip: have the user save the shape in VB, then dump the registry/block markup. If the shape is preserved exactly, stamp (VB-verified DATE). If VB rewrote it, document the canonical shape (what VB wrote) and the runtime-permissive variant separately.
Design Quality Checklist
When generating pages, ALWAYS apply:
- Entrance animations on visible modules (
fade/slidewith staggereddelay: 0ms, 150ms, 300ms, 450ms) - Hover states on cards, buttons, icons (use
desktop.hoverformat) - Responsive overrides (tablet/phone: padding, font sizes,
flexDirection: column) - Visual mobile check for Group/card grids (verified 2026-05-28) — validation passing only proves block shape, not phone-safe stacking
- Use
divi/number-counterfor stats — animates counting on scroll (not plain text) - Use Group flex for multi-column layouts with
flexTypesizing (not Row with multiple columns) - Minimum: 8+ animations per page, hover on every interactive element
- See design-guide.md for copy-paste patterns and recipes
Design System Lifecycle
How DiviOps handles styling
Every page you generate uses one of three tiers for any given style value:
| Tier | What it is | When to use |
|---|---|---|
| Inline values | Colors, sizes, fonts hardcoded in each block | Always works. Default. |
| Token variables | Divi global tokens referenced via $variable({...payload...})$ (full JSON payload required, trailing $ is load-bearing — see presets.md) | When global tokens exist in Divi |
| Presets | Module-level style templates referenced via UUID (modulePreset: [uuid] or groupPreset.<slot>.presetId: [uuid]) | When presets exist + a manifest maps roles to UUIDs |
DiviOps generates working, design-complete pages at any tier. Tokens and presets are consistency optimizations for projects that need them — they are NOT prerequisites.
First time on a project? Start here
You don't need to set anything up. Page generation works out of the box with inline values using patterns from design-guide.md. Skip the rest of this section unless you want design-system reuse across many pages.
Come back here when:
- You want colors/sizes shared across many pages without duplicating values → bootstrap tokens
- You want a reusable design system with our
oatoken + preset naming → run the full bootstrap workflow
Runtime resolution cascade (how pages are actually styled)
Every page generation follows this cascade — you'll land at whichever tier your project has set up:
- Read
.claude/design-system.json→ look uppresets.<role-key>.id(fast path, if the manifest exists) - If manifest missing →
diviops_preset_audit, match presets by name, build an in-memory map (ifoa-prefixed presets exist) - If no
oapresets found → inline styling from design-guide.md patterns
Most first-time runs hit step 3 and that's fine — output is still polished, animated, responsive, VB-editable.
About the oa convention (optional)
The oa design system uses universal token names (gcid-oa-primary-500, gvid-oa-size-h1) and preset names (oa Heading H1, oa Button Primary) across all projects. What differs per site is the values behind tokens and the UUIDs Divi assigns to presets.
If you prefer different names or no prefix, skip bootstrap entirely — inline styling doesn't need oa or any other convention.
Manifest: .claude/design-system.json
When bootstrap is complete, this per-project file maps preset role keys (e.g. heading-h1, button-primary) to site-specific UUIDs. NOT shipped with the skill — lives in the project's .claude/ dir