Agent skill
storybook
Use this skill when creating or updating Storybook stories for Svelte components. Covers Svelte CSF story format, defineMeta, argTypes, snippet-based customization, and autodocs. Apply when adding visual documentation for components, setting up story files, or running Storybook for development.
Install this agent skill to your Project
npx add-skill https://github.com/exceptionless/Exceptionless/tree/main/.agents/skills/storybook
SKILL.md
Storybook
Documentation: storybook.js.org
Running Storybook
npm run storybook
File Location
Co-locate stories with components as *.stories.svelte.
Basic Story Pattern
From stack-status-badge.stories.svelte:
<script module lang="ts">
import { defineMeta } from '@storybook/addon-svelte-csf';
import { StackStatus } from '../models';
import StackStatusBadge from './stack-status-badge.svelte';
const { Story } = defineMeta({
argTypes: {
status: {
control: { type: 'select' },
options: [StackStatus.Open, StackStatus.Fixed, StackStatus.Regressed]
}
},
component: StackStatusBadge,
tags: ['autodocs'],
title: 'Components/Stacks/StackStatusBadge'
});
</script>
<Story name="Open" args={{ status: StackStatus.Open }} />
<Story name="Fixed" args={{ status: StackStatus.Fixed }} />
<Story name="Regressed" args={{ status: StackStatus.Regressed }} />
Story with Snippets
From notification.stories.svelte:
<script module lang="ts">
import { Button } from '$comp/ui/button';
import CheckCircle from '@lucide/svelte/icons/check-circle';
import Ban from '@lucide/svelte/icons/ban';
import { defineMeta } from '@storybook/addon-svelte-csf';
import NotificationDescription from './notification-description.svelte';
import NotificationTitle from './notification-title.svelte';
import Notification from './notification.svelte';
const { Story } = defineMeta({
component: Notification,
tags: ['autodocs'],
title: 'Components/Shared/Notification'
});
</script>
<Story name="Success">
<Notification variant="success">
{#snippet icon()}<CheckCircle />{/snippet}
<NotificationTitle>Operation completed successfully!</NotificationTitle>
<NotificationDescription>Your changes have been saved.</NotificationDescription>
</Notification>
</Story>
<Story name="Destructive">
<Notification variant="destructive">
{#snippet icon()}<Ban />{/snippet}
<NotificationTitle>Something went wrong</NotificationTitle>
<NotificationDescription>An error occurred. Please try again.</NotificationDescription>
</Notification>
</Story>
<Story name="With Action">
<Notification variant="information">
{#snippet action()}
<Button variant="outline" size="sm">Take Action</Button>
{/snippet}
<NotificationTitle>Action required</NotificationTitle>
<NotificationDescription>Click the button to proceed.</NotificationDescription>
</Notification>
</Story>
Key Patterns
defineMeta: ReturnsStorycomponent, configurecomponent,title,tagstags: ['autodocs']: Auto-generate documentation pageargTypes: Configure controls for props (select, text, boolean, etc.)- Simple args:
<Story name="Open" args={{ status: 'open' }} /> - Custom content: Use children with snippets for complex compositions
- Title hierarchy: Use
/for organization (e.g.,Components/Shared/Notification)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
foundatio-repositories
releasenotes
Generate formatted changelogs from git history since the last release tag. Use when preparing release notes that categorize changes into breaking changes, features, fixes, and other sections.
e2e-testing
Use this skill when writing or running end-to-end browser tests with Playwright. Covers Page Object Model patterns, selector strategies (data-testid, getByRole, getByLabel), fixtures, and accessibility audits with axe-playwright. Apply when adding E2E test coverage, debugging flaky tests, or testing user flows through the browser.
tanstack-query
Use this skill when fetching data, managing server state, or handling API mutations in the Svelte frontend. Covers createQuery, createMutation, query keys, cache invalidation, optimistic updates, and WebSocket-driven refetching. Apply when adding API calls, managing loading/error states, or coordinating cache updates after mutations.
dogfood
Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to "dogfood", "QA", "exploratory test", "find issues", "bug hunt", "test this app/site/platform", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.
frontend-testing
Use this skill when writing or running frontend unit and component tests with Vitest and Testing Library. Covers render/screen/fireEvent patterns, vi.mock for mocking, and the AAA (Arrange-Act-Assert) test structure. Apply when adding test coverage for Svelte components, debugging test failures, or setting up test utilities.
Didn't find tool you were looking for?