Skip to main content
subagent CX Codex

svelte-storybook — Claude Code subagent: what it does, how to install

svelte-storybook documents SvelteKit components in Storybook and writes the story files with Svelte CSF. Handy when a single component needs checking away from the running app.

no license ★ 1,357 updated 2026-03-01

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/svelte-storybook.md
Open on GitHub

What svelte-storybook does

This is a Claude subagent tuned for the @storybook/sveltekit framework and the Svelte CSF addon. Tell it which component to show and it produces the story file: defineMeta for metadata, one Story block per state, argTypes with a select control for props such as variant.

SvelteKit modules that fail in isolation get replaced — $app/environment, $app/paths, $lib, @sveltejs/kit/*. The store and navigation fakes sit under the sveltekit_experimental parameter, and that mode is experimental, so stories you plan to keep shouldn't lean on it. Migrations are covered too: CSF v4 stories move to defineMeta with Svelte 5 snippets, and a project on @storybook/svelte switches to the SvelteKit framework.

For checks it reaches for Chromatic or Percy, @storybook/addon-a11y rules, and play functions driven by userEvent — type an email, click the button, assert the success text. The toolset is Read, Write, Edit, MultiEdit, Glob, Grep, Bash and WebFetch, so it edits story files and config directly in your project.

What it helps with

  • write a story for a SvelteKit component without tuning .storybook/main.js by hand
  • mock $app/paths so a story renders outside the app
  • port CSF v4 stories to defineMeta and Svelte 5 snippets
  • add a play function that fills a form and asserts the result
  • turn on the color-contrast rule in @storybook/addon-a11y

Example prompts for the agent

  • Write a story for Button.svelte with defineMeta and separate variants for primary and danger
  • The story crashes on $app/paths — mock that module so it renders on its own
  • Move Card.stories.svelte from CSF v4 to defineMeta and snippets

How to install svelte-storybook

Manually: put the files in place

.claude/agents/svelte-storybook.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about svelte-storybook

How to install svelte-storybook in Claude Code?

Copy the subagent file into your project at .claude/agents/svelte-storybook.md; Claude picks it up from there.

What does svelte-storybook do?

It writes Storybook stories for SvelteKit components: defineMeta for the metadata, a Story per state, controls for the props. It also mocks $app/* and $lib modules so a story loads without the app running.

Does it require Svelte 5?

Snippets, the composition style it uses for stories, arrived in Svelte 5. It also converts older stories built on Template and slots to the newer syntax.

Similar subagents

All subagents for Frontend and UI →

From the same set112

The whole set →
incident-responder incident-responder guides production incident response, from assessing impact and coordinating roles to restoring service and documenting follow-up work. CX Codex ★ 1,357repo stars quick-spec quick-spec reads your codebase, asks up to 10 questions and writes a focused spec file. Built for plain features and refactors where a full elicitation round is overkill. CX Codex +1 ★ 1,357repo stars debugger debugger — a targeted troubleshooting subagent for Claude Code that isolates root causes, inspects test failures, and writes minimal diffs. CX Codex ★ 1,357repo stars extract-video-frames The extract-video-frames skill samples video at a chosen interval and saves matching audio clips when a soundtrack is present. Use it to prepare a recording for visual review, transcription, or handoff to another agent. CX Codex +1 ★ 1,357repo stars data-scientist data-scientist analyzes metrics, constructs advanced SQL workflows, and optimizes BigQuery queries to control data scanning costs. CX Codex ★ 1,357repo stars ux-designer The ux-designer subagent shapes interfaces around user tasks, accessibility, and ease of use. It fits research, interaction design, testing, and handoff work. CX Codex ★ 1,357repo stars product-manager A product-manager subagent that turns one goal into epics, task specs with acceptance criteria, and an ordered queue other agents can pick up. CX Codex ★ 1,357repo stars rule2hook rule2hook translates plain language instructions from memory files into automated Claude Code hook definitions inside hooks.json. CX Codex +1 ★ 1,357repo stars

Project sponsors

Companies that keep this analytics open