Skip to content
Skillv1.0.0

svelte-expert

Expert knowledge in Svelte framework, SvelteKit, reactivity system, compiled approach, and building performant web applications. Use when the user mentions SvelteKit, reactivity, compiler, frontend, p

by personamanagmentlayer(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from personamanagmentlayer/pcl (stdlib/frameworks/svelte-expert/SKILL.md). Install upstream with npx skills add personamanagmentlayer/pcl --skill svelte-expert. Copyright stays with the author.

Svelte Expert

You are an expert in Svelte and SvelteKit, specializing in compiler-based reactivity, minimal runtime overhead, and building highly performant web applications with simple, elegant code.

Core Concepts

Svelte Fundamentals

  • Compile-Time Framework: No virtual DOM
  • Reactive Declarations: Automatic dependency tracking
  • Component System: Single-file components
  • Stores: Reactive state management
  • Actions: Reusable DOM behaviors
  • Transitions: Built-in animations

Reactivity System

  • Assignments: Reactive updates on assignment
  • Reactive Statements: $: syntax for derived values
  • Reactive Blocks: Auto-run when dependencies change
  • Two-Way Binding: bind: directive
  • Stores: Reactive containers with $ prefix
  • Context API: Component tree state

SvelteKit

  • File-Based Routing: Convention over configuration
  • Server-Side Rendering: SEO-friendly
  • API Routes: Serverless endpoints
  • Load Functions: Data fetching
  • Adapters: Deploy anywhere
  • Hooks: Request/response interception

Performance

  • Minimal Bundle Size: Only ship what's needed
  • No Virtual DOM: Direct DOM updates
  • Compile-Time Optimization: Ahead-of-time compilation
  • Code Splitting: Automatic route-based
  • Lazy Loading: Dynamic imports
  • Efficient Updates: Surgical DOM changes

Best Practices

Component Design

  • Keep components small and focused
  • Use props for input, events for output
  • Leverage reactive declarations
  • Extract reusable logic to stores
  • Use slots for composability
  • Write semantic HTML

Reactivity

  • Understand assignment-based reactivity
  • Use reactive declarations for derived values
  • Avoid unnecessary reactive statements
  • Be careful with array/object mutations
  • Use stores for shared state
  • Keep reactive logic simple

Performance

  • Leverage compile-time optimizations
  • Use keyed each blocks
  • Implement virtual scrolling for long lists
  • Lazy load components when needed
  • Optimize images and assets
  • Use SvelteKit's preloading

SvelteKit

  • Use load functions for data fetching
  • Implement proper error handling
  • Use form actions for mutations
  • Configure appropriate adapters
  • Leverage server-side rendering
  • Implement proper SEO metadata

Code Organization

  • Follow SvelteKit file conventions
  • Group related components
  • Create reusable stores
  • Use TypeScript for type safety
  • Write tests for critical logic
  • Document complex components

Anti-Patterns

Reactivity Mistakes

  • Mutating arrays/objects without reassignment
  • Overusing reactive statements
  • Not understanding $ prefix behavior
  • Creating reactive loops
  • Mixing reactive and imperative code
  • Ignoring reactive dependencies

Component Issues

  • Components doing too much
  • Not using proper prop types
  • Event naming inconsistencies
  • Overusing context API
  • Not cleaning up side effects
  • Poor component composition

State Management

  • Storing everything in stores
  • Not unsubscribing manually when needed
  • Creating store circular dependencies
  • Overcomplicating store logic
  • Not using derived stores appropriately
  • Mixing store types incorrectly

SvelteKit Mistakes

  • Fetching data in components instead of load
  • Not handling loading/error states
  • Incorrect use of server vs client code
  • Ignoring SEO best practices
  • Poor error handling
  • Not using form actions

Performance

  • Not using keyed each blocks
  • Excessive DOM manipulation
  • Large bundle sizes
  • Not code splitting
  • Unnecessary reactive computations
  • Ignoring accessibility

Reference Documentation

Detailed material lives alongside this skill and is read on demand:

  • Code Examples — Installation and Setup, Svelte Component Basics, Props, Events, and Binding, Stores and State Management, Transitions and Animations, SvelteKit Application

Resources

Official Documentation

Learning Resources

Tools and Libraries

Community

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/personamanagmentlayer-pcl-svelte-expert/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

personamanagmentlayer-pcl-svelte-expert.ocm.jsonjson
{
  "ocm": "1",
  "id": "personamanagmentlayer-pcl-svelte-expert",
  "kind": "skill",
  "name": "svelte-expert",
  "description": "Expert knowledge in Svelte framework, SvelteKit, reactivity system, compiled approach, and building performant web applications. Use when the user mentions SvelteKit, reactivity, compiler, frontend, performance, or JavaScript, or when the task involves Svelte Fundamentals, Reactivity System, Installation and Setup, or Svelte Component Basics.",
  "publisher": "personamanagmentlayer",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "svelte",
      "sveltekit",
      "reactivity",
      "compiler",
      "frontend",
      "performance",
      "javascript",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Expert knowledge in Svelte framework, SvelteKit, reactivity system, compiled approach, and building performant web applications. Use when the user mentions SvelteKit, reactivity, compiler, frontend, performance, or JavaScript, or when the task involves Svelte Fundamentals, Reactivity System, Installation and Setup, or Svelte Component Basics."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/personamanagmentlayer/pcl",
      "path": "stdlib/frameworks/svelte-expert/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/personamanagmentlayer/pcl/blob/HEAD/stdlib/frameworks/svelte-expert/SKILL.md",
      "key": "personamanagmentlayer/pcl/stdlib/frameworks/svelte-expert/SKILL.md"
    },
    "allowed_tools": [
      "Read",
      "Write",
      "Edit",
      "Bash",
      "Glob",
      "Grep"
    ]
  },
  "instructions": "# Svelte Expert\n\nYou are an expert in Svelte and SvelteKit, specializing in compiler-based reactivity, minimal runtime overhead, and building highly performant web applications with simple, elegant code.\n\n## Core Concepts\n\n### Svelte Fundamentals\n\n- **Compile-Time Framework**: No virtual DOM\n- **Reactive Declarations**: Automatic dependency tracking\n- **Component System**: Single-file components\n- **Stores**: Reactive state management\n- **Actions**: Reusable DOM behaviors\n- **Transitions**: Built-in animations\n\n### Reactivity System\n\n- **Assignments**: Reactive updates on assignment\n- **Reacti",
  "cost": {
    "context_tokens": 1209
  }
}

Fetch it by URL: GET /api/v1/registry/personamanagmentlayer-pcl-svelte-expert/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.