# svelte-styling

svelte-styling is a Claude Code skill that guides Svelte component styling with scoped CSS, custom properties, and style:. It covers runtime values and styles for child components.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 137 installs · ★ 96 repo stars
- Author: spences10
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/spences10/svelte-skills-kit/tree/HEAD/plugins/svelte-skills/skills/svelte-styling/SKILL.md
- Updated: 2026-10-12
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/svelte-styling

## What it does

Svelte `<style>` blocks are scoped to their component by default. The skill shows how to pass a JavaScript value into a CSS custom property with `style:` and then use that property in a layout, such as a grid.

For child components, it favors passing custom properties as props. When that approach does not fit, such as with a library component, `:global` is an alternative. That distinction matters: global selectors are presented as a fallback. More techniques are in `references/styling-patterns.md`, and dynamic values should use `style:` rather than inline style strings.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add spences10/svelte-skills-kit --skill svelte-styling -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/svelte-styling/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/svelte-styling/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add spences10/svelte-skills-kit --skill svelte-styling -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/svelte-styling/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add spences10/svelte-skills-kit --skill svelte-styling -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/svelte-styling/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install spences10/svelte-skills-kit plugins/svelte-skills/skills/svelte-styling
```

2. **Manually: put the files in place**
- File: `.github/skills/svelte-styling/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add spences10/svelte-skills-kit --skill svelte-styling -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/spences10/svelte-skills-kit --path plugins/svelte-skills/skills/svelte-styling
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/svelte-styling/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add spences10/svelte-skills-kit --skill svelte-styling -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/spences10/svelte-skills-kit/tree/HEAD/plugins/svelte-skills/skills/svelte-styling/SKILL.md

## When to use it
- bind a JavaScript value to a CSS custom property
- keep component styles scoped
- pass color or spacing values to a child component
- target a heading inside a library component

## Example prompts
- Make the grid column count dynamic with a CSS custom property and `style:`.
- Pass a color and spacing value to the child component as CSS custom properties.
- Style the heading inside the library component using `:global`.

## Similar
- [svelte](https://affpapa.org/en/nevibecode/skills/oakoss-svelte.md) — skill · 117 installs
- [svelte-code-writer](https://affpapa.org/en/nevibecode/skills/svelte-code-writer.md) — skill · 14200 installs
- [svelte-core-bestpractices](https://affpapa.org/en/nevibecode/skills/svelte-core-bestpractices.md) — skill · 12400 installs
- [svelte-development](https://affpapa.org/en/nevibecode/skills/svelte-development.md) — skill · 437 installs
- [Tailwind Svelte Assistant](https://affpapa.org/en/nevibecode/mcp/tailwind-svelte-assistant.md) — MCP server · 685 installs
- [svelte-debug](https://affpapa.org/en/nevibecode/commands/svelte-debug.md) — command · 134 installs

From the same set: [spences10/svelte-skills-kit](https://affpapa.org/en/nevibecode/by/spences10/svelte-skills-kit.md) — 10 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
