diff --git a/apps/cli/ai/plugin/skills/blockify/SKILL.md b/apps/cli/ai/plugin/skills/blockify/SKILL.md new file mode 100644 index 0000000000..ad54760e90 --- /dev/null +++ b/apps/cli/ai/plugin/skills/blockify/SKILL.md @@ -0,0 +1,182 @@ +--- +name: blockify +description: Convert all core/html blocks in a WordPress site to native Gutenberg blocks. Run this after building a site (Phase 2) or on any existing site that uses custom HTML blocks. +user-invokable: true +--- + +# Block Conversion (Blockify) + +Convert all `core/html` blocks in a site's pages, posts, and template parts to native Gutenberg blocks. The CSS stays untouched — the visual output must remain identical. + +## How to Run + +### Step 1 — Read back all content + +Retrieve every piece of block content. You MUST read ALL of these before proceeding: +- Page/post content: `wp_cli post list --post_type=page,post --fields=ID,post_title` then `wp_cli post get --field=post_content` for each +- Template part files: Read header.html, footer.html, and ALL other template part files from the theme's `parts/` directory + +Do NOT skip template parts — they often contain navigation, hero sections, or footer content that needs conversion. + +### Step 2 — Plan the conversion element-by-element + +**CRITICAL: Always decompose.** Never keep an entire section as `core/html` just because it contains some non-convertible sub-elements. Break the section apart: convert every convertible element to native blocks and isolate only the truly non-convertible elements as individual `core/html` blocks. + +For example, a hero section with a heading, paragraph, buttons, image, AND a scroll-indicator animation should become: `core/group` > `core/heading` + `core/paragraph` + `core/buttons` + `core/image` + `core/html` (scroll indicator only). Do NOT keep the entire hero as `core/html`. + +For each section of content, decide what converts to native blocks and what stays as `core/html`: + +| HTML | Gutenberg block | +|------|----------------| +| `
`, `
`, `
`, `