# svelte-layerchart

svelte-layerchart — a skill for Svelte 5 chart work with LayerChart, covering tooltip snippets, chart context, gradients, highlights, and axes.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 111 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-layerchart/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-layerchart

## What it does

This skill guides chart component work with LayerChart in Svelte 5. It focuses on snippet syntax for tooltips, chart context, and gradients, with patterns for highlights and axes. Tooltip modes include `band`, `bisect-x`, `quadtree-x`, and `quadtree`, each suited to a different chart shape.

The included patterns cover Area, Bar, Pie, and Calendar charts. There are also examples for ForceGraph plus zoom and pan behavior. Your project needs `layerchart` and `d3-scale`; without those packages, the documented examples cannot be built.

The skill can be installed for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode. Its Svelte 5 examples use snippets such as `data`, `context`, and `gradient` rather than the older `let:data` form.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

2. **Manually: put the files in place**
- File: `.cursor/skills/svelte-layerchart/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-layerchart
```

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add spences10/svelte-skills-kit --skill svelte-layerchart -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-layerchart/SKILL.md

## When to use it
- build an Area or Bar chart with LayerChart
- choose a tooltip mode for time-series data
- type the data passed into a tooltip snippet
- add a gradient or highlight points
- implement zoom and pan for a graph

## Example prompts
- Build a Svelte 5 Area chart from `salesData` and use `bisect-x` for its tooltip.
- Show how to read chart `context` inside a snippet and add zoom and pan behavior.
- Replace a `let:data` tooltip with a typed snippet using `MyType`, then configure `band` for a bar chart.

## Similar
- [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
- [shadcn-svelte](https://affpapa.org/en/nevibecode/skills/shadcn-svelte.md) — skill · 7600 installs
- [sentry-svelte-sdk](https://affpapa.org/en/nevibecode/skills/sentry-svelte-sdk.md) — skill · 2300 installs
- [svelte](https://affpapa.org/en/nevibecode/skills/svelte.md) — skill · 1300 installs
- [svelte-development](https://affpapa.org/en/nevibecode/skills/svelte-development.md) — skill · 437 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
