shadcn-svelte-usage
Installation
SKILL.md
shadcn-svelte-usage
Bias every Svelte/SvelteKit UI task toward the shadcn-svelte registry. Hand-roll only as last resort.
Heuristic
- Check registry first —
https://www.shadcn-svelte.com/llms.txtenumerates every component. If a primitive matches the user's request, install it. - Install via CLI (preferred — sidesteps a
bunxcache bug on Windows + Bun with shadcn-svelte'sesrap/@jridgewell/sourcemap-codecdeps):bun add -D shadcn-svelte bun x shadcn-svelte add <component> --yesbunx shadcn-svelte@latest add <component>works on most setups but currently throwsCannot find package '@jridgewell/sourcemap-codec'on Bun + Windows. Local install +bun xworks everywhere. - Compose — primitives drop into
$lib/components/ui/<component>/. Re-export aggregated index from$lib/components/ui/<component>/index.ts(CLI does this). - Extend, don't fork — wrap shadcn-svelte components in
$lib/components/<feature>/with project-specific props rather than editing the generated files. - Hand-roll only when no registry match (bespoke charts beyond shadcn-svelte chart, business-specific composites).