svelte-optimize
Optimize Svelte/SvelteKit applications for performance, including bundle size reduction, rendering optimization, and loading performance.
- 0
- Installs
- —
- Rating
- —
- Success rate
- 1
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 7ebe42d3b94b52ef… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
svelte-optimize.md
/svelte:optimize
Optimize Svelte/SvelteKit applications for performance, including bundle size reduction, rendering optimization, and loading performance.
Instructions
You are acting as the Svelte Development Agent focused on performance optimization. When optimizing:
-
Performance Analysis:
- Analyze bundle size with rollup-plugin-visualizer
- Profile component rendering
- Measure Core Web Vitals
- Identify performance bottlenecks
- Check network waterfall
-
Bundle Optimization:
Code Splitting:
// Dynamic imports const HeavyComponent = await import('./HeavyComponent.svelte'); // Route-based splitting export const prerender = false; export const ssr = true;Tree Shaking:
- Remove unused imports
- Optimize library imports
- Use production builds
- Eliminate dead code
-
Rendering Optimization:
Reactive Performance:
// Use $state.raw for large objects let data = $state.raw(largeDataset); // Optimize derived computations let filtered = $derived.lazy(() => expensiveFilter(data) );Component Optimization:
- Minimize re-renders
- Use keyed each blocks
- Implement virtual scrolling
- Lazy load components
-
Loading Performance:
- Implement preloading strategies
- Optimize images (lazy loading, WebP)
- Use resource hints (preconnect, prefetch)
- Enable HTTP/2 push
- Implement service workers
-
SvelteKit Optimizations:
// Prerender static pages export const prerender = true; // Optimize data loading export async function load({ fetch, setHeaders }) { setHeaders({ 'cache-control': 'public, max-age=3600' }); return { data: await fetch('/api/data') }; } -
Optimization Checklist:
- Enable compression (gzip/brotli)
- Optimize fonts (subsetting, preload)
- Minimize CSS (PurgeCSS/Tailwind)
- Enable CDN/edge caching
- Implement critical CSS
- Optimize third-party scripts
- Use WebAssembly for heavy computation
Example Usage
User: "My SvelteKit app is loading slowly, optimize it"
Assistant will:
- Run performance analysis
- Identify largest bundle chunks
- Implement code splitting
- Optimize images and assets
- Add preloading for critical resources
- Configure caching headers
- Implement lazy loading
- Optimize server-side rendering
- Provide performance metrics comparison
Files
1- svelte-optimize.md
0d512421ff2.5 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from davila7/claude-code-templates8
Execute GitHub Actions locally using act
Implement secure user authentication system with chosen method and security best practices
Generate and maintain project changelog with Keep a Changelog format
Setup comprehensive mutation testing with framework selection and CI integration
Add and configure new package to workspace with proper structure and dependencies
Setup comprehensive application performance monitoring with metrics, alerting, and observability
Implement property-based testing with framework selection and invariant identification
Add entry to project changelog following Keep a Changelog format
Related frontend skillsscan passed
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding,
Guided end-to-end plugin creation workflow with component design, implementation, and validation
Explain complex code, algorithms, and design patterns with step-by-step breakdowns, visual diagrams, and interactive examples
Initialize Nuxt UI v4 in an existing Nuxt project with proper configuration