Skip to content

ericrisco/rsc-harness / skills/svelte

svelte

Verified

Use when building, reviewing or fixing Svelte 5 (runes) and SvelteKit code — components with the rune primitives, rune modules versus stores, file routing, universal versus server load functions, form actions with progressive enhancement, remote functions, SSR/CSR/prerender choices, and adapters. Covers migrating Svelte 4 reactive statements to runes and hydration mismatches. NOT Next.js or RSC (that is `nextjs`).

FileKindSize
SKILL.mdskill md12.3 KB
evals/README.mdmarkdown785 B
evals/cases.yamlconfig3.1 KB
references/runes.mdmarkdown5.4 KB
references/sveltekit-data.mdmarkdown5.6 KB
scripts/verify.shexecutablescript4.9 KB

evals/cases.yaml

View on GitHub
skill: svelte

should_trigger:
  - prompt: "When should I use $derived instead of $effect in my Svelte component?"
    why: "Core runes decision — computed value vs side effect — the skill's center of gravity."
  - prompt: "Migrate this Svelte 4 component using export let and $: to Svelte 5 runes."
    why: "Svelte 4 to 5 migration needs the export let to $props and $: to $derived/$effect map."
  - prompt: "My +page.server.ts load returns data but the page tries to read a secret on the client — how do I split this correctly?"
    why: "Universal vs server load contract; a secret leaking into universal load is the canonical SvelteKit data mistake."
  - prompt: "Add a login form action in SvelteKit with use:enhance that still works without JavaScript."
    why: "Form actions with progressive enhancement, the default mutation pattern in SvelteKit."
  - prompt: "I export a $state count from a .js file and it stops being reactive when other components import it."
    why: "Non-obvious — must be a .svelte.js module exporting a stable container, not a reassigned let."
  - prompt: "Per què el meu $state no es reactiu quan muto un array dins un component Svelte?"
    why: "Catalan, non-English; reactivity gotcha around $state proxies and deep mutation."
  - prompt: "I'm getting a hydration mismatch warning in my SvelteKit app after SSR — where do I start?"
    why: "Non-obvious symptom phrasing; hydration mismatch is an SSR/CSR plus load-data debugging task this skill owns."

should_not_trigger:
  - prompt: "Set up React Server Components with server actions in my Next.js app."
    route_to: "nextjs"
    why: "Different framework, reactivity model, and data-loading contract; runes and RSC must not be crossed."
  - prompt: "Write a generic TypeScript mapped type and conditional type for a deep-partial utility, no framework involved."
    route_to: "typescript"
    why: "Pure TypeScript typing with no Svelte or Kit dimension."
  - prompt: "Configure Vercel project environment variables and the edge runtime for my deployment."
    route_to: "vercel"
    why: "Platform/deploy config. This skill picks the adapter; the platform skill owns env and edge."
  - prompt: "Bind a Cloudflare KV and D1 namespace in wrangler.toml for my Worker."
    route_to: "cloudflare"
    why: "Platform binding config, not SvelteKit code."

capability:
  - scenario: "Build a SvelteKit /dashboard route: a server load that fetches the current user, a form action to update the display name, and a runes-based child component that shows a derived greeting from the name."
    must_include:
      - "+page.server.ts exporting both a typed load (PageServerLoad) and actions (Actions)."
      - "PageData / ActionData typing imported from './$types'."
      - "Current user read server-side (locals or DB) — no secret or DB client in a universal +page.ts."
      - "<form method=\"POST\"> with use:enhance from '$app/forms'."
      - "Form action returns fail(...) on invalid input and uses redirect(...) for navigation, both from '@sveltejs/kit'."
      - "Child component uses let { ... } = $props() and a $derived greeting, not $effect."
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall