Use when a component needs migration to the target architecture or framework version.
67%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./packs/nextjs/skills/migration-migrate-component/SKILL.mdMigrate a Pages Router component/page to App Router following docs/ARCHITECTURE.md sections 5 and 6.
Component: $ARGUMENTS
Read docs/ARCHITECTURE.md sections 5 and 6.
Analyze the component/page:
getServerSideProps, getStaticProps, getStaticPathsuseRouter from next/routerHead component usageConvert routing:
pages/xxx.tsx -> app/xxx/page.tsxpages/xxx/[id].tsx -> app/xxx/[id]/page.tsxpages/api/xxx.ts -> app/api/xxx/route.ts (or Server Action)Convert data fetching:
getServerSideProps -> async Server Component (service + adapter)getStaticProps -> async Server Component + revalidategetStaticPaths -> generateStaticParams()useEffect + fetch -> React Query hookDetermine Server vs Client:
Convert imports:
useRouter from next/router -> useRouter + usePathname + useSearchParams from next/navigationHead -> metadata export or generateMetadata()Create siblings:
loading.tsx -- skeleton matching page structureerror.tsx -- error boundary ('use client' required)Type all props.
Decompose if > 200 lines.
Validate:
npx tsc --noEmit
npx next build
npx vitest run --passWithNoTestsfernandezbaptiste/specialist-agent
cd716d9
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.