What problem does it solve?
This skill optimizes SvelteKit applications by addressing slow initial page loads, waterfall data fetching, and poor SEO caused by client-side data fetching. It guides the conversion to SvelteKit's full-stack architecture, leveraging load functions and progressive enhancement for instant server-side rendering and improved user experience.
Core Features & Use Cases
- Client-Side Fetching Conversion: Transform
onMount + fetch patterns into efficient SvelteKit load functions for faster initial page loads.
- Progressive Enhancement: Implement patterns that ensure your application works without JavaScript and is enhanced with it.
- Type-Safe Data Adapters: Guide the creation of adapters to map database types to frontend types within load functions.
- Use Case: "My SvelteKit page has a noticeable loading spinner because data is fetched client-side. This skill will help me refactor the data fetching logic into a
+page.server.ts load function, eliminating the spinner and improving SEO."
Quick Start
Use the sveltekit-data-optimizer skill to convert client-side data fetching on my SvelteKit homepage to a server-side load function.