agentleFS
rajnandan1rajnandan1/such-skills/skills/shadcn-svelte/SKILL.md

shadcn-svelte

Skill3 starsChanged 9 months agoMITView on GitHub

Use shadcn-svelte components in SvelteKit projects. Detects whether the current project is a SvelteKit app with shadcn-svelte installed, lists available components, and provides access to full component documentation via the official llms.txt. Helps choose the right UI components for the job — buttons, forms, dialogs, tables, charts, and more — following shadcn-svelte best practices. Use this skill whenever the user is working in a SvelteKit project and wants to: add UI components, build forms, create dialogs or modals, add a data table, use a date picker, build a sidebar or navigation, add charts, use a combobox or select, create an alert or toast notification, or generally build UI with pre-built accessible components. Also trigger when the user mentions "shadcn", "shadcn-svelte", "bits-ui", or asks about available components in their Svelte project.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. vercel-labs/json-render★ 18ksame name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the right shadcn-svelte components when building UI in SvelteKit projects.

    line 17
  2. Distinctive:

    Run the detection script to verify this is a SvelteKit project with shadcn-svelte and see which components are already installed:

    line 32
  3. Distinctive:

    If the script exits with code 1, the project either isn't SvelteKit or doesn't have shadcn-svelte — do not proceed with shadcn-svelte …

    line 44
  4. Very specific:

    When you need to use a specific component, read its individual documentation page from the links provided in llms.txt.

    line 56
  5. Distinctive:

    Import statements and usage examples

    line 57
  6. Distinctive:

    When building UI, follow this decision process:

    line 64
  7. Distinctive:

    Always run detection first: before suggesting shadcn-svelte components

    line 118
  8. Distinctive:

    Always read component docs: before using a component — don't guess at props or patterns

    line 119

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

shadcn-svelte — Component-Aware Svelte UI Assistant

Use the right shadcn-svelte components when building UI in SvelteKit projects. This skill detects your project setup, shows what's available, and gives you access to full component documentation.

Prerequisites

The project must be a SvelteKit app with shadcn-svelte initialized:

# Initialize shadcn-svelte in an existing SvelteKit project
npx shadcn-svelte@latest init

How to use

Step 1: Detect project setup

Run the detection script to verify this is a SvelteKit project with shadcn-svelte and see which components are already installed:

bash "${CLAUDE_SKILL_DIR}/scripts/detect.sh" .

This will:

  • Confirm it's a SvelteKit project (checks for svelte.config.js/ts and @sveltejs/kit in package.json)
  • Confirm shadcn-svelte is installed (checks for components.json, bits-ui, or shadcn-svelte in package.json)
  • List all currently installed components in the project's UI directory
  • Provide the documentation URL

If the script exits with code 1, the project either isn't SvelteKit or doesn't have shadcn-svelte — do not proceed with shadcn-svelte components in that case.

Step 2: Read the component documentation

The full component documentation for LLMs is available at:

https://www.shadcn-svelte.com/llms.txt

Fetch this URL to get a structured index of all available components organized by category, with links to individual component documentation pages (in .md format).

When you need to use a specific component, read its individual documentation page from the links provided in llms.txt. Each component doc includes:

  • Import statements and usage examples
  • Available props, events, and slots
  • Variants and configuration options
  • Accessibility information

Step 3: Use the right component for the job

When building UI, follow this decision process:

  1. Run detection to confirm shadcn-svelte is available and see installed components
  2. Fetch llms.txt to see all available components
  3. Read the specific component docs for the components you plan to use
  4. Check if the component is installed — if not, add it:
    npx shadcn-svelte@latest add <component-name>
  5. Import and use the component following the documentation patterns

Component categories

shadcn-svelte components are organized into these categories:

CategoryComponents
LayoutAspect Ratio, Collapsible, Resizable, Scroll Area, Separator, Sidebar
Form & InputButton, Calendar, Checkbox, Combobox, Date Picker, Input, Input OTP, Label, Radio Group, Range Calendar, Select, Slider, Switch, Textarea, Toggle, Toggle Group
Data DisplayAccordion, Avatar, Badge, Card, Carousel, Chart, Table, Data Table
FeedbackAlert, Alert Dialog, Progress, Skeleton, Sonner (Toast)
OverlayContext Menu, Dialog, Drawer, Dropdown Menu, Hover Card, Menubar, Popover, Sheet, Tooltip
NavigationBreadcrumb, Command, Pagination, Tabs
TypographyTypography

Adding new components

# Add a single component
npx shadcn-svelte@latest add button

# Add multiple components
npx shadcn-svelte@latest add button card dialog

# List all available components
npx shadcn-svelte@latest add

Import patterns

Components are typically imported from the project's $lib/components/ui directory:

<script lang="ts">
  import { Button } from "$lib/components/ui/button";
  import * as Card from "$lib/components/ui/card";
  import * as Dialog from "$lib/components/ui/dialog";
</script>

Some components use namespace imports (with * as) when they have multiple sub-components (Card, Dialog, Sheet, Table, etc.), while simpler components use named imports (Button, Input, Badge, etc.).

Important guidelines

  • Always run detection first before suggesting shadcn-svelte components
  • Always read component docs before using a component — don't guess at props or patterns
  • Check installed components and add missing ones before importing
  • Use the project's configured path — the components directory may vary based on components.json configuration
  • Follow Svelte 5 patterns — shadcn-svelte uses runes ($state, $derived, $effect) and snippet-based composition
  • Prefer composition — shadcn-svelte components are designed to be composed together, not used as monolithic blocks

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.