← Files MiroMiroARCHIVED FILE
skills/section-to-code/SKILL.md
2.63 KB · Nov 24, 2026 · 00:18 UTC
---
name: section-to-code
description: Turn a section of a public web page into starting code for the user's own project, using the page as a design reference. Use when the user wants a hero, pricing table, header, footer, features, FAQ or call-to-action styled like one on a page they name, as Tailwind, React, Vue, HTML+CSS, an Elementor template or a Shopify section, filled with their own content.
---
# A section of a page as starting code
Use `extract_code`. It reads the page in a real browser and returns the section's layout
and computed styles (colors, fonts, spacing) as code, so the user starts from real values
instead of guessing from a screenshot.
## Pick the section
When the user names a part of the page ("their pricing table", "the footer", "the nav"),
pass it as `section`: one of `hero`, `header`, `footer`, `pricing`, `features`,
`testimonials`, `faq`, `cta`. MiroMiro finds that block on the page itself. Never invent a
CSS selector: one that matches nothing falls back to the hero with a `note`.
With no `section`, the hero is picked. Every result also lists the page's other `sections`,
each with a label and a ready `selector`: when the part the user wants is not a named
section, find it there and call again with that `selector`.
## Pick the format
Match the user's project:
- `tailwind` (default): Tailwind classes in the markup
- `jsx`: a React component (`name` sets its name); repeated items come back as a data
array rendered with `.map()`
- `vue`: a single-file component; repeated items as a `v-for`
- `html`: plain HTML plus a `css` string
- `elementor`: a template to import into the user's own WordPress site (Templates > Saved
Templates > Import); hand the file over unmodified
- `shopify`: a theme section for the user's own store (`sections/<name>.liquid` in the theme
code editor); hand the file over unmodified
Pass `theme: "dark"` for the dark version; the result's `theme` field says which one came
back.
## Make it theirs
The code is a starting point built from a reference page, not something to republish:
- The page's text, images and logos belong to its owner. Unless the page is the user's own,
replace them with the user's content (or clear placeholders) before handing the code over,
and say so.
- Keep the layout and styles the user asked for; adapt names, structure and theme tokens to
their project.
- Give the user `previewUrl` (the section rendered) to compare against, and `downloadUrl`
(the file as returned).
- Fonts and images used on the page have their own licenses: mention it when the user is
heading to production.
Not for: copying a whole site, extracting a page's text, or pages behind a login.
SHA-256: fb17bcd8ec29cad60f1758b5469ef1cee8c536d308355b974bbf90a424291f7f