.cursor/skills/migrate-existing-site/SKILL.md
Migrate an existing website into the Astro + CloudCannon component starter. Use when converting an existing site's pages, content, branding, and structure into this component library.
npx skillsauth add juananruiz/juananruiz.github.io migrate-existing-siteInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
End-to-end workflow for migrating an existing website into this component starter. The goal is to reproduce the site's content and visual structure using existing components where possible, and creating new ones only when necessary.
pageSections YAML for each pageUse the browser or fetch tool to load each page of the source site. For each page, identify:
For each section, note:
| Observation | Record | | --------------- | ---------------------------------------------------------------- | | Layout type | Centered, split (text + image), grid of cards, accordion, slider | | Heading text | Exact text | | Body text | Exact text (preserve line breaks) | | Images | URLs, descriptions for alt text | | Buttons | Label text, link target, primary vs secondary | | Background | Light, dark, colored, image | | Repeating items | Count, fields per item (title, description, icon, image) |
Follow the theming skill to configure the design system.
src/styles/variables/_colors.css — add brand palette valuessrc/styles/themes/_light.css AND _dark.css — map brand colors to semantic tokens (always both files)site-fonts.mjs — set the brand's font families and weightspublic/images/logo.svg with the site's logoFollow the site-data-navigation skill.
src/data/seo.json — site name, URL, description, title formatsrc/data/mainNav.json — logo, navigation items, CTA buttonssrc/data/footer.json — logo, links, socials, copyright textsite in astro.config.mjs to match the production URLFor each section identified in Step 1, match it to an existing page section or flag it for new component creation.
| Source section pattern | Component to use | _component path |
| -------------------------------------------------- | ------------------- | ------------------------------------------------------------------------ |
| Centered hero (heading + subtext + buttons) | Hero Center | page-sections/heroes/hero-center |
| Split hero (text + image side by side) | Hero Split | page-sections/heroes/hero-split |
| Feature grid (grid of items with icons/titles) | Feature Grid | page-sections/features/feature-grid |
| Feature showcase (text + image alternating) | Feature Split | page-sections/features/feature-split |
| Feature carousel (sliding cards) | Feature Slider | page-sections/features/feature-slider |
| Centered CTA (heading + buttons) | CTA Center | page-sections/ctas/cta-center |
| Split CTA (text + image + buttons) | CTA Split | page-sections/ctas/cta-split |
| Contact form (form + image) | CTA Form | page-sections/ctas/cta-form |
| FAQ / accordion | FAQ Section | page-sections/info-blocks/faq-section |
| Team members grid | Team Grid | page-sections/people/team-grid |
| Testimonial / quote | Testimonial Section | page-sections/people/testimonial-section |
| Custom content (doesn't fit above) | Custom Section | page-sections/builders/custom-section |
| Unique layout (nothing fits) | Create new | Use screenshot-to-component skill |
Reuse an existing component when:
Create a new component when:
When creating new components, use the screenshot-to-component skill if you have a visual reference, or the create-component skill for building from a description.
custom-section can compose any building blocks freely. Before creating a brand-new page section, consider whether custom-section with the right building blocks achieves the layout:
- _component: page-sections/builders/custom-section
contentSections:
- _component: building-blocks/core-elements/heading
text: Section title
level: h2
size: lg
alignX: center
- _component: building-blocks/core-elements/text
text: >-
Body content here.
alignX: center
- _component: building-blocks/wrappers/grid
minItemWidth: 300
maxItemWidth: 400
gap: lg
items:
- _component: building-blocks/wrappers/card
border: true
paddingHorizontal: md
paddingVertical: md
contentSections:
- _component: building-blocks/core-elements/heading
text: Card title
level: h3
size: sm
- _component: building-blocks/core-elements/text
text: Card description.
maxContentWidth: 2xl
paddingHorizontal: lg
paddingVertical: 4xl
colorScheme: inherit
backgroundColor: surface
Create a .md file in src/content/pages/ for each page.
>- block scalar for multiline values./src/assets/images/placeholder.jpg initially, replace after downloading (Step 6)./about/ not https://oldsite.com/about).variant (primary, secondary, tertiary, ghost).| Source appearance | colorScheme | backgroundColor |
| ------------------------------- | ------------- | ----------------------- |
| White / light background | inherit | base |
| Light gray background | inherit | surface |
| Dark background with light text | dark | surface |
| Brand-colored background | inherit | accent or highlight |
| Transparent / no background | inherit | none |
A common pattern is alternating backgroundColor between base and surface to visually separate sections:
pageSections:
- _component: page-sections/heroes/hero-center
backgroundColor: base
- _component: page-sections/features/feature-grid
backgroundColor: surface
- _component: page-sections/features/feature-split
backgroundColor: base
- _component: page-sections/ctas/cta-center
colorScheme: dark
backgroundColor: surface
When migrating multiple feature sections, alternate reverse to create a zigzag layout:
- _component: page-sections/features/feature-split
reverse: false
backgroundColor: base
- _component: page-sections/features/feature-split
reverse: true
backgroundColor: base
paddingVertical: lg
Refer to the page-content-authoring skill for the full component catalog and prop reference.
src/assets/images/ (Astro optimizes images from this path)src/assets/images/team/, src/assets/images/blog/)Images referenced in page frontmatter use the full source path:
imageSource: /src/assets/images/hero.jpg
For static images that shouldn't be processed (like logos), place in public/images/:
logoSource: /images/logo.svg
During migration, use a placeholder first and replace later:
imageSource: /src/assets/images/placeholder.jpg
imageAlt: Descriptive alt text based on the original image
Always write meaningful alt text even when using placeholders — it won't need updating later.
If the source site has a blog, follow the blog-mdx-content skill.
.mdx files in src/content/blog/ for each posttitle, description, date, author, image, tagssrc/assets/images/src/content/pages/blog.md with the blog index hero sectionWhen migrating multiple pages:
src/content/pages/
├── index.md # Home page
├── about.md # About page
├── services.md # Services page
├── contact.md # Contact page
├── blog.md # Blog index (hero only; posts are in src/content/blog/)
└── search.md # Search page (usually keep as-is)
After migration, verify:
npm run dev)testing
Customize the design system for brand matching. Use when changing colors, fonts, spacing, or other design tokens, extending the theme system, or migrating an existing brand into this Astro component starter.
data-ai
Configure site-wide data including navigation, footer, and SEO. Use when setting up or editing mainNav.json, footer.json, seo.json, or understanding how navigation components consume data.
development
Build a new page section component from a screenshot. Use when the user pastes a screenshot of a UI section and wants it turned into an Astro component with CloudCannon configuration.
development
Assemble pages from existing components in the Astro + CloudCannon component library. Use when building new pages, populating pageSections YAML, choosing which components to use, or understanding how page content files work.