Compose a single liberated page's WordPress block-editor markup from its rendered HTML and screenshot. Inputs are a sanitized HTML file, a desktop screenshot, the design-foundation tokens, the URL's archetype (page/post/product/etc.), and the source URL. Output is a string of valid block markup that round-trips through parse_blocks, uses theme tokens (no inlined hex colors), and contains only text drawn from the source HTML. Call per-page during the streaming watch loop after extraction has produced HTML+screenshot for that URL. Use when a freshly-imported page needs `post_content` upgraded from raw HTML into block-editor markup so the replica theme's tokens, gradients, and patterns actually render.
npx skills add https://github.com/Automattic/studio --skill compose-page-blocks
You compose one page's WordPress block markup from its source HTML and, when supplied, a screenshot, using the site's design foundation. The streaming watch loop calls you per-URL; you produce a block-markup string and hand it to the runner via liberate_block_compose before the post is inserted.
You are NOT generating a theme. That's the replicate-with-blocks skill's job. Your output is post_content for one specific post — not template parts, not patterns the theme registers, just the inner content of one page.
The calling loop hands you, per invocation:
| Field | Type | Description |
|---|---|---|
| url | string | Source URL (used for traceability + media-URL rewriting downstream) |
| htmlPath | string | Absolute path to the sanitized rendered HTML file. Source HTML went through html-sanitize.ts upstream — script/iframe/object/embed tags, HTML comments, and on*= event handlers are already stripped. |
| screenshotPath | string | Absolute path to the desktop screenshot (and .scrolled.png if present at the sibling path), or an explicit skipped-screenshot instruction when the active archetype template already captures the visual treatment |
| designFoundationPath | string | Absolute path to the run's design-foundation.json |
| archetype | enum | 'page' \| 'post' \| 'product' \| 'gallery' \| 'event' |
| outputPath | string | Where to write the block-markup string |
Every non-skipped file is required. If an input file is missing or empty, return an error and do not write outputPath.
A single text file at outputPath containing valid WP block markup. The file must:
parse_blocks() — every <!-- wp:foo --> opens has a matching <!-- /wp:foo --> close (or is self-closed <!-- wp:foo /-->).output-verify.ts) checks every text node against the source's plain text. Any hallucinated phrase (rewriting "Foo Industries" as "Bar Inc.", inventing a tagline, generating fake testimonials) gets the entire output discarded.core/paragraph, core/heading, core/list, core/list-item, core/image, core/gallery, core/cover, core/columns, core/column, core/group, core/buttons, core/button, core/separator, core/spacer, core/quote, core/details, core/embed. Do not emit core/html, wp:html, or Custom HTML blocks. Avoid emitting any other block type unless the active replica theme has already registered a purpose-built custom block for this exact component.className. Every section that maps to a foundation role (e.g. accent surfaces, raised surfaces, inverse surfaces) carries the matching style slug (is-style-accent-primary, is-style-soft-card, etc.) in className. The list of registered styles is documented in references/post-content-conventions.md.You MUST NOT:
#0f4d7a directly. Use native slug attributes (backgroundColor, textColor) when the block exposes them; otherwise use a registered className style and let the theme define CSS in style.css or theme.json/block styles.<!-- wp:template-part {"slug":"header"} /-->). Template parts don't render inside post_content; they're a Site Editor concept. If a section "looks like" header/footer chrome in the screenshot, skip it — it's the theme's job, not yours.<script>, no raw <iframe> outside a core/embed block. The pre-skill sanitizer already removed these from input; do not reintroduce them.post_content.core/html / wp:html as an escape hatch for layout, CSS, forms, embeds, icons, or missing block types.<style> tags or inline style attributes to recreate a source section. CSS belongs in the active theme's style.css or theme.json/block styles. Use className hooks and foundation style slugs instead....). Reordering a clause, swapping a word, or writing a "punchier" version is paraphrase and is forbidden. If you can't find the supporting text in the source HTML for a slot, omit the slot or emit a clearly-marked [copy not captured] placeholder — NEVER "fill in plausible words." This applies to body copy just as strictly as to review/testimonial quotes; an earlier getsnooz build paraphrased section body copy ("Real fan-powered sound — no loops…") while the real line was in the captured HTML. Body-copy paraphrase HARD-FAILS the liberate_validate_artifacts provenance gate (body text must be substantially contained in the captured source) — do not bypass it.You MUST:
wp:cover for hero sections — large headline + subtext + optional CTA over a background. Pull url from any <img> directly inside the source's hero region; if no hero image, omit the cover and use wp:group with align: full instead.wp:columns + wp:column for multi-column layouts. Preserve the column count from the source. When a row holds 4 cards in the screenshot, emit 4 wp:column children. The verticalAlignment attribute should match the visual alignment in the screenshot.wp:group (with align: "full" or "wide") for full-bleed sections. Apply foundation surface tokens via backgroundColor slug.wp:gallery for image grids of 3+ images (e.g. portfolio, product gallery teaser). Use wp:image for single images.wp:details for FAQ/accordion patterns — the question is the <summary>, the answer is the children.wp:buttons + wp:button for CTAs. Use native block color slug attributes such as backgroundColor / textColor or a registered className style; do not add ad hoc inline CSS.design-foundation.json to know which slugs are available. Specifically: color.surface.*, color.accent.*, typography.families.*. You will reference these by slug, not by hex.wp:group with a heading + subtext is safer than a wp:cover whose image you couldn't ground.className to the corresponding style slug.wp:image (or wp:gallery for multiple) with the source URL. The downstream media-url-rewrite step swaps these to local upload URLs after compose.outputPath. Do not include any wrapping tags (no <html>, no <body>) — just block markup. {
"url": "https://example.com/about",
"blocksCount": 7,
"sectionsMapped": ["hero", "overview", "features", "cta"],
"foundationsUsed": ["accent-primary", "surface-raised"],
"warnings": []
}
The streaming loop calls a deterministic heuristic-blocks.ts BEFORE invoking you. If the page is "all paragraphs + h2/h3" or "single image followed by paragraphs" or "one section with heading + text," the heuristic emits markup directly and you are skipped. If you ARE invoked, the page has at least one non-trivial structural element — a hero, a multi-column layout, a gallery, an interactive section. Spend your effort there.
<div class="container"> could be a hero, a footer band, or just an alignment wrapper. Use the screenshot to disambiguate.design-foundation.json doesn't list a slug you want (e.g. you imagine a "muted cyan" surface), do not invent it. Pick the closest existing slug or omit the visual treatment.wp:html. Custom HTML blocks are rejected. Always prefer the right semantic block, or ask for a custom block/theme CSS change when the source component cannot be represented with core blocks.core/html to recreate a missing block type. When a layout needs something outside the allow-list above, omit the section and add a warning.references/blocks-reference.md — concrete markup examples for cover, columns, group, heading, image, buttons, gallery, details. Read when you need the exact JSON-attribute shape for a block.references/post-content-conventions.md — what's legal in post_content, what's not. Read before composing.skills/replicate-with-blocks/styling-priority.md — the preset→patch→instance→variation→layout→CSS cascade, the structured-props cheat sheet, and the hard bans (no raw style="" attrs, no invented className CSS hooks). Applies to native block output; core/html islands exempt.evals/evals.json enumerates representative pages from existing fixtures (biostratamarketing rich blog post, getsnooz about page, dopplepress product page). Each eval supplies the inputs your invocation receives plus a brief intent description. Assertions land after the first iteration of grading.
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling
Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.
Take automattic/compose-page-blocks from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.