CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

migration-migrate-component

Use when a component needs migration to the target architecture or framework version.

Quality

67%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./packs/astro/skills/migration-migrate-component/SKILL.md
SKILL.md
Quality
Evals
Security

Migrate a SPA component (React/Vue/Svelte) to the Astro architecture following docs/ARCHITECTURE.md section 5.

Component: $ARGUMENTS

Steps

  1. Read docs/ARCHITECTURE.md section 5.

  2. Analyze the component:

    • Count lines
    • List: props, state, effects, event handlers, data fetching
    • Determine: interactive or presentational?
    • Map who imports this component
  3. If presentational (no interactivity) -> Convert to .astro:

    • Props -> Astro.props with Props interface
    • JSX/template -> Astro template syntax
    • CSS-in-JS/scoped styles -> scoped <style>
    • Remove all client-side JavaScript
    • Remove data fetching (move to page frontmatter)
    • Place in src/components/
  4. If interactive (needs JS) -> Convert to island:

    • Keep framework code (React/Vue/Svelte)
    • Remove data fetching (move to page frontmatter, pass as props)
    • Keep only UI interactivity (state, event handlers)
    • Ensure props are serializable
    • Choose hydration strategy (client:visible > client:idle > client:load)
    • Place in src/islands/
  5. Update pages that reference this component:

    • Add client:* directive if island
    • Move data fetching to page frontmatter
  6. Validate:

npx astro check
npx astro build
npx vitest run --passWithNoTests
Repository

fernandezbaptiste/specialist-agent

Path

packs/astro/skills/migration-migrate-component/SKILL.md

Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.