skeleton-svelte
Provides guidelines for using Skeleton UI components in Svelte projects, focusing on themes and composition.
Install
mkdir -p .claude/skills/skeleton-svelte && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/118" && unzip -o skill.zip -d .claude/skills/skeleton-svelte && rm skill.zipInstalls to .claude/skills/skeleton-svelte
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use this skill when working with Skeleton UI components in Svelte projects. It provides guidelines for Skeleton's component composition pattern, theme-aware color system, design presets, and layout patterns. Trigger when building UI components, styling elements, creating layouts, or working with Skeleton-specific features in Svelte 5 and SvelteKit 2+ projects.Key capabilities
- →Apply theme-aware color pairings for UI elements
- →Implement Skeleton's granular component composition
- →Utilize design presets for consistent padding/sizing
- →Apply adaptive border colors for light/dark modes
- →Enforce standard surface-50-950 color naming
How it works
Applies a predefined set of design rules and token-based CSS classes to Svelte markup to ensure consistency with the Skeleton UI library.
Inputs & outputs
When to use skeleton-svelte
- →Build Svelte UI components
- →Apply theme-aware styling
- →Implement layout patterns
About this skill
Skeleton Svelte
Overview
Skeleton is a design system built on Tailwind CSS that provides framework-specific UI components for Svelte via @skeletonlabs/skeleton-svelte. This skill provides workflows and reference documentation for building Svelte applications using Skeleton's component library, color system, and design patterns.
Core Principles
Apply these fundamental principles when working with Skeleton:
Component Composition
Use Skeleton's composed pattern with granular child components. Components accept arbitrary props and the class attribute for styling:
<Card class="preset-filled-surface-100-900">
<Card.Header>
<Card.Title>Title</Card.Title>
</Card.Header>
<Card.Content>
<p>Content</p>
</Card.Content>
</Card>
Theme-Aware Colors
Critical: Always use color pairings for theme-aware styling. Never hard-code colors with dark: prefixes.
✅ Correct:
<div class="bg-surface-50-950 text-surface-950-50">
<p class="text-surface-700-300">Content</p>
</div>
❌ Incorrect:
<div class="bg-white text-black dark:bg-gray-950 dark:text-white">
<p class="text-gray-700 dark:text-gray-300">Content</p>
</div>
Color pairing syntax: {property}-{color}-{lightShade}-{darkShade}
Examples:
bg-surface-50-950- Light background in light mode, dark in dark modetext-surface-950-50- Dark text in light mode, light in dark modeborder-surface-300-700- Adaptive border colors
Reference: See references/colors.md for comprehensive color system documentation.
Design Presets
Use built-in presets for consistent styling:
preset-filled-{color}-{shade}- Solid backgrounds with contrast textpreset-tonal-{color}- Soft, tinted backgroundspreset-outlined-{color}-{shade}- Bordered with transparent background
<Button class="preset-filled-primary-500">Primary Action</Button>
<Button class="preset-tonal-secondary">Secondary</Button>
<Button class="preset-outlined-surface-300-700">Cancel</Button>
Reference: See references/presets.md for all preset variants and custom preset creation.
Workflow: Building UI Components
Step 1: Identify the Component Type
Determine which Skeleton component best fits the requirement:
- Avatar - User profile images with fallback
- Button - Interactive actions
- Card - Content containers
- Dialog - Modal overlays
- Input/Label - Form fields
- Badge - Status indicators
Reference: See references/components.md for complete component catalog with examples.
Step 2: Import and Structure
Import the component and use the composed pattern:
<script>
import { Card, Button } from '@skeletonlabs/skeleton-svelte';
</script>
<Card class="preset-filled-surface-100-900">
<Card.Header>
<Card.Title>Component Title</Card.Title>
</Card.Header>
<Card.Content>
<!-- Content here -->
</Card.Content>
<Card.Footer>
<Button class="preset-filled-primary-500">Action</Button>
</Card.Footer>
</Card>
Step 3: Apply Theme-Aware Styling
Add color pairings and presets using the class attribute:
<Card class="preset-outlined-surface-300-700">
<Card.Content>
<h3 class="font-semibold text-surface-950-50">Heading</h3>
<p class="text-surface-700-300">Description text</p>
</Card.Content>
</Card>
Step 4: Add State Management (if needed)
Use Svelte 5 runes for reactive state:
<script>
import { Dialog, Button } from '@skeletonlabs/skeleton-svelte';
let open = $state(false);
</script>
<Button onclick={() => (open = true)} class="preset-filled-primary-500">Open Dialog</Button>
<Dialog bind:open>
<Dialog.Content>
<!-- Dialog content -->
</Dialog.Content>
</Dialog>
Workflow: Creating Layouts
Step 1: Choose Layout Pattern
Select an appropriate layout foundation:
- Single-column - Blog posts, documentation pages
- Two-column - Sidebar + main content
- Three-column - Dashboard with dual sidebars
- Dashboard - Grid-based card layouts
Reference: See references/layouts.md for complete layout patterns and examples.
Step 2: Apply Semantic HTML
Use semantic elements for proper structure:
<div class="h-full">
<header class="sticky top-0 z-10 bg-surface-50-950">
<nav><!-- Navigation --></nav>
</header>
<main class="flex-1 overflow-y-auto">
<div class="container mx-auto px-4 py-8">
<!-- Content -->
</div>
</main>
<footer class="bg-surface-100-900">
<!-- Footer -->
</footer>
</div>
Step 3: Implement Responsive Behavior
Use Tailwind's responsive prefixes for mobile-first design:
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
<!-- Responsive grid -->
</div>
Step 4: Add Theme-Aware Styling
Apply color pairings throughout the layout:
<header class="border-b border-surface-300-700 bg-surface-50-950">
<!-- Header content -->
</header>
<main class="bg-surface-100-900">
<!-- Main content -->
</main>
Common Patterns
Form with Validation
<script>
import { Button, Input, Label } from '@skeletonlabs/skeleton-svelte';
let email = $state('');
let error = $state('');
function handleSubmit(e) {
e.preventDefault();
if (!email.includes('@')) {
error = 'Invalid email';
return;
}
// Process form
}
</script>
<form onsubmit={handleSubmit}>
<div>
<Label for="email">Email</Label>
<Input
id="email"
type="email"
bind:value={email}
class="border-surface-300-700"
aria-invalid={!!error}
/>
{#if error}
<p class="mt-1 text-sm text-error-500">{error}</p>
{/if}
</div>
<Button type="submit" class="mt-4 preset-filled-primary-500">Submit</Button>
</form>
Responsive Card Grid
<script>
import { Card } from '@skeletonlabs/skeleton-svelte';
</script>
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
{#each items as item}
<Card class="preset-filled-surface-100-900">
<Card.Header>
<Card.Title>{item.title}</Card.Title>
</Card.Header>
<Card.Content>
<p class="text-surface-700-300">{item.description}</p>
</Card.Content>
</Card>
{/each}
</div>
Status Badge
<script>
import { Badge } from '@skeletonlabs/skeleton-svelte';
</script>
<Badge class="preset-tonal-success">Active</Badge>
<Badge class="preset-tonal-warning">Pending</Badge>
<Badge class="preset-tonal-error">Inactive</Badge>
Project-Specific Configuration
This project uses:
- Skeleton with Svelte 5 and SvelteKit 2+
- Tailwind CSS 4.x
- Mona theme (configured in
src/app.html)
The Mona theme provides specific color palettes and design tokens. When creating components, ensure they align with the theme's aesthetic.
Resources
Reference Documentation
references/colors.md- Complete color system, pairings, shades, and transparencyreferences/presets.md- Design presets, variants, and custom preset creationreferences/layouts.md- Layout patterns, semantic HTML, responsive designreferences/components.md- Comprehensive component catalog with examples
External Documentation
- Official Documentation: https://www.skeleton.dev
- Component Examples: https://www.skeleton.dev/components
- Theme Generator: https://www.skeleton.dev/themes
Best Practices
- Use color pairings - Always use dual-tone syntax for theme support
- Apply composition pattern - Leverage child components for flexibility
- Semantic HTML - Use proper HTML elements for accessibility
- Mobile-first responsive - Start with mobile layout, enhance for larger screens
- Preset consistency - Use design presets for uniform styling
- State with runes - Use Svelte 5's
$state,$derived,$effectfor reactivity - Reference documentation - Consult references/ files for detailed information
Important Notes
- Components are built on Zag.js for state management
- The design system is framework agnostic at its core
- Cannot be used alongside Flowbite or DaisyUI (conflicting Tailwind modifications)
- Component classes automatically get precedence over internal styles
When not to use it
- →Styling applications without Tailwind CSS
- →Custom components not utilizing Skeleton design system
Prerequisites
Limitations
- →Strict adherence to color tokens required
- →Tailwind knowledge expected
- →Does not automatically migrate existing legacy components
How it compares
It replaces manual CSS color logic with an enforced, theme-agnostic variable system.
Compared to similar skills
skeleton-svelte side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| skeleton-svelte (this skill) | 15 | 9mo | No flags | Beginner |
| svelte-ui-design | 23 | 9mo | No flags | Intermediate |
| frontend-design | 481 | 2mo | No flags | Advanced |
| screenshot-to-code | 204 | 2mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
svelte-ui-design
XIYO
ALWAYS use this skill for ANY Svelte component styling, design, or UI work. Svelte 5 UI design system using Tailwind CSS 4, Skeleton Labs design tokens/presets/Tailwind Components, and Bits UI headless components. Covers class composition, color systems, interactive components, forms, overlays, and all visual design.
frontend-design
anthropics
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
screenshot-to-code
OneWave-AI
Convert UI screenshots into working HTML/CSS/React/Vue code. Detects design patterns, components, and generates responsive layouts. Use this when users provide screenshots of websites, apps, or UI designs and want code implementation.
web-artifacts-builder
anthropics
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
responsive-design
wshobson
Implement modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first breakpoint strategies. Use when building adaptive interfaces, implementing fluid layouts, or creating component-level responsive behavior.
ai-organizer-ui-consolidation
thebearwithabite
Build a unified, ADHD-friendly web UI that consolidates 70+ CLI tools into a beautiful liquid glass interface for the AI File Organizer. Use when creating the complete frontend application that replaces all terminal interactions with a macOS-inspired dashboard for file organization, search, VEO prompts, and system management.