frontend-svelte
Technical knowledge for SvelteKit 5 development. Build reactive applications with Svelte's compile-time magic. Expert in SvelteKit, stores, and reactive patterns. Activate for Svelte development, performance optimization, or modern web apps. This skill provides MCP usage patterns and Svelte 5 conventions. Use when implementing Svelte components or SvelteKit routes.
Best use case
frontend-svelte is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Technical knowledge for SvelteKit 5 development. Build reactive applications with Svelte's compile-time magic. Expert in SvelteKit, stores, and reactive patterns. Activate for Svelte development, performance optimization, or modern web apps. This skill provides MCP usage patterns and Svelte 5 conventions. Use when implementing Svelte components or SvelteKit routes.
Teams using frontend-svelte should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/frontend-svelte/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How frontend-svelte Compares
| Feature / Agent | frontend-svelte | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Technical knowledge for SvelteKit 5 development. Build reactive applications with Svelte's compile-time magic. Expert in SvelteKit, stores, and reactive patterns. Activate for Svelte development, performance optimization, or modern web apps. This skill provides MCP usage patterns and Svelte 5 conventions. Use when implementing Svelte components or SvelteKit routes.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Frontend-Svelte
Technical reference for SvelteKit 5 development.
## MCP Usage Priority
1. **svelte** - Official Svelte 5 and SvelteKit documentation (ALWAYS CHECK FIRST)
2. **context7** - Third-party libraries:
- shadcn-svelte: `/huntabyte/shadcn-svelte`
- Other Svelte ecosystem packages
3. **web_search** - For cases not covered by MCPs
## Svelte 5 Conventions
- **Runes**: `$state`, `$derived`, `$effect`, `$props`
- **Components**: Single-file `.svelte` components
- **Events**: Use `onclick={handler}` syntax
## SvelteKit Conventions
- **Routes**: `+page.svelte`, `+page.server.ts`, `+layout.svelte`
- **Data Loading**: Use `load` functions in `+page.server.ts`
- **Form Actions**: `+page.server.ts` actions
# Svelte 5 Standards
## Runes (Svelte 5)
- Use $state() for reactive state
- Use $derived() for computed values
- Use $effect() for side effects (sparingly)
- Use $props() for component props
```svelte
<script lang="ts">
let count = $state(0);
let doubled = $derived(count * 2);
let { user, onUpdate } = $props<{
user: User;
onUpdate: (user: User) => void;
}>();
$effect(() => {
console.log('Count changed:', count);
});
</script>
```
## Component Structure
- Script (setup code) → Markup → Styles
- TypeScript by default
- Export props explicitly with $props()
- Keep components small (<200 lines)
## State Management
- Local state: $state()
- Derived values: $derived()
- Cross-component: Svelte stores or context
- Avoid global stores when local state works
## Stores (when needed)
```typescript
// stores.ts
import { writable, derived } from "svelte/store";
export const user = writable<User | null>(null);
export const isLoggedIn = derived(user, ($user) => $user !== null);
```
## Reactivity Best Practices
- Keep $effect() minimal and focused
- Avoid side effects in $derived()
- Use event handlers over watchers when possible
- Don't mutate props
## Forms & Validation
- Use bind:value for two-way binding
- Validate on blur, not on every keystroke
- Use form actions for submissions (SvelteKit)
- Show errors after user interaction
## SvelteKit Specific
- Use load functions for data fetching
- +page.svelte for routes
- +page.server.ts for server-side logic
- +layout.svelte for shared layouts
- Form actions in +page.server.ts
```typescript
// +page.server.ts
export const load = async ({ params, locals }) => {
const property = await db.property.findUnique({
where: { id: params.id },
});
return { property };
};
export const actions = {
default: async ({ request, locals }) => {
const data = await request.formData();
// handle form submission
},
};
```
## Component Props Pattern
```svelte
<script lang="ts">
interface Props {
title: string;
subtitle?: string;
onSave?: (data: FormData) => void;
}
let { title, subtitle = '', onSave }: Props = $props();
</script>
```
## Styling
- Scoped styles by default
- Use CSS variables for theming
- Tailwind for utility classes (if using)
- Keep critical CSS inline
- Avoid deep selectors (:global() sparingly)
## Performance
- Use {#key} to force recreation when needed
- Lazy load heavy components
- Virtual lists for long lists
- Debounce expensive operations
## Anti-Patterns to Avoid
- Don't use $effect() for derived state (use $derived())
- Don't create stores for everything (local state first)
- Don't mutate props directly
- Avoid nested reactive statements
- Don't use bind: for one-way data flow
## Component Documentation Standard (Bestays)
Every component should have a header comment block:
```svelte
<!--
ComponentName - Brief description
ARCHITECTURE:
Layer: Component/Page
Pattern: [Pattern Name]
PATTERNS USED:
- Pattern 1
- Pattern 2
DEPENDENCIES:
External: [npm packages]
Internal: [local imports]
INTEGRATION:
- Used by: [files]
- Spec: [spec file if exists]
-->
```Related Skills
gemini-frontend-design
Create distinctive, production-grade frontend interfaces using Gemini 3 Pro for design ideation. Use this skill when you want Gemini's creative perspective on web components, pages, or applications. Generates bold, polished code that avoids generic AI aesthetics.
frontend_mastery
Advanced React patterns, performance optimization, and state management rules.
frontend
Apply distinctive frontend design to React + TailwindCSS apps. Use when building UI components, pages, or improving visual design. Breaks generic "AI slop" patterns.
frontend-web-dev-expert
Advanced frontend web development expert system that provides comprehensive modern web development services including architecture design, UI/UX implementation, performance optimization, engineering setup, and cross-platform development through expert collaboration and intelligent tool integration.
frontend-ui-tailwind-standards
Standardized guidelines and patterns for Frontend Ui Tailwind Standards.
frontend-ui
Create aesthetically pleasing, visually distinctive frontend UIs using research-backed prompting strategies from Anthropic's frontend aesthetics cookbook
frontend-ui-dark-ts
Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations. Use when creating dashboards, admin panels, or data-rich interfaces...
frontend-ui-animator
Analyze and implement purposeful UI animations for Next.js + Tailwind + React projects. Use when user asks to add animations, enhance UI motion, animate pages/components, or improve visual feedback. Triggers on "add animations", "animate UI", "motion design", "hover effects", "scroll animations", "page transitions", "micro-interactions".
frontend-specialist
Master of UI/UX, React, TypeScript, and modern CSS.
frontend-slides
Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a...
frontend-shadcn
Frontend development using Vite + React + shadcn/ui + Tailwind CSS + React Router v7. Use when creating new frontend projects, adding UI components, implementing routing, styling with Tailwind, or working with shadcn/ui component library.
frontend-security-coder
Expert in secure frontend coding practices specializing in XSS prevention, output sanitization, and client-side security patterns.