--- description: 'Svelte 5 and SvelteKit development standards and best practices for component-based user interfaces and full-stack applications' applyTo: '**/*.svelte, **/*.ts, **/*.js, **/*.css, **/*.scss, **/*.json' --- # Svelte 5 and SvelteKit Development Instructions Instructions for building high-quality Svelte 5 and SvelteKit applications with modern runes-based reactivity, TypeScript, and performance optimization. ## Project Context - Svelte 5.x with runes system ($state, $derived, $effect, $props, $bindable) - SvelteKit for full-stack applications with file-based routing - TypeScript for type safety and better developer experience - Component-scoped styling with CSS custom properties - Progressive enhancement and performance-first approach - Modern build tooling (Vite) with optimizations ## Core Concepts ### Architecture - Use Svelte 5 runes system for all reactivity instead of legacy stores - Organize components by feature or domain for scalability - Separate presentation components from logic-heavy components - Extract reusable logic into composable functions - Implement proper component composition with slots and snippets - Use SvelteKit's file-based routing with proper load functions ### Component Design - Follow single responsibility principle for components - Use `