Daleui
DaleStudy/daleui
Use the daleui React design system with semantic Panda CSS tokens and accessible components.
Storybook best practices for Wonder Blocks component stories.
$ npx skills add Khan/wonder-blocks --skill storybook -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Khan/wonder-blocks storybook --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Khan/wonder-blocks.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/storybook .claude/skills/storybook && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "storybook" agent skill from https://github.com/Khan/wonder-blocks/tree/main/.agents/skills/storybook into .claude/skills/storybook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Khan/wonder-blocks/tree/main/.agents/skills/storybookType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Khan/wonder-blocks --skill storybook -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Khan/wonder-blocks storybook --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Khan/wonder-blocks.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/storybook .agents/skills/storybook && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "storybook" agent skill from https://github.com/Khan/wonder-blocks/tree/main/.agents/skills/storybook into .agents/skills/storybook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Khan/wonder-blocks --skill storybook -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Khan/wonder-blocks storybook --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Khan/wonder-blocks.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/storybook .cursor/skills/storybook && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "storybook" agent skill from https://github.com/Khan/wonder-blocks/tree/main/.agents/skills/storybook into .cursor/skills/storybook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Khan/wonder-blocks.git --path .agents/skills/storybook--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Khan/wonder-blocks --skill storybook -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Khan/wonder-blocks storybook --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Khan/wonder-blocks.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/storybook .gemini/skills/storybook && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "storybook" agent skill from https://github.com/Khan/wonder-blocks/tree/main/.agents/skills/storybook into .gemini/skills/storybook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Khan/wonder-blocks storybookInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Khan/wonder-blocks --skill storybook -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Khan/wonder-blocks.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/storybook .github/skills/storybook && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "storybook" agent skill from https://github.com/Khan/wonder-blocks/tree/main/.agents/skills/storybook into .github/skills/storybook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Khan/wonder-blocks --skill storybook -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Khan/wonder-blocks storybook --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Khan/wonder-blocks.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/storybook .opencode/skills/storybook && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "storybook" agent skill from https://github.com/Khan/wonder-blocks/tree/main/.agents/skills/storybook into .opencode/skills/storybook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
storybookStorybook best practices for Wonder Blocks component stories.
Storybook is an agent skill from Khan/wonder-blocks. Storybook best practices for Wonder Blocks component stories. Use when creating or editing .stories.tsx / .stories.ts files.
Its SKILL.md is about 4.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Frontend & Design, covering React components and Design systems. It works with Storybook and React. The repository describes itself as: React components for Wonder Blocks design system. The licence is MIT.
12 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 04b6068. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Storybook loads about 4.2k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 1,028 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Khan/wonder-blocks at commit 04b6068, republished under its MIT licence (© Khan). 1,028 words, ~4,202 tokens.
.claude/skills/storybook/SKILL.md (or your agent's skills folder).This guide covers conventions and best practices for creating Storybook stories (.stories.tsx or .stories.ts) in the Wonder Blocks design system.
✅ Define story types consistently (avoid any):
type StoryComponentType = StoryObj<typeof Component>;
export const Default: StoryComponentType = {
args: {
// props here
},
};✅ Include all relevant meta properties:
export default {
title: "Packages / ComponentName / SubComponent",
component: ComponentName,
subcomponents: {SubComponent1, SubComponent2}, // If applicable
parameters: {
componentSubtitle: (
<ComponentInfo
name={packageConfig.name}
version={packageConfig.version}
/>
),
chromatic: {
disableSnapshot: false, // or true with reason
},
},
argTypes: ComponentArgTypes,
args: {
// Default args for all stories
},
decorators: [
// Optional decorators
],
} as Meta<typeof ComponentName>;Key properties:
title: Hierarchical path in Storybook sidebarcomponent: The main component being documentedsubcomponents: Related components shown in docsparameters: Meta-level configuration (Chromatic, a11y, etc.)argTypes: Control definitions (usually imported from separate file)args: Default values applied to all storiesdecorators: Layout wrappers applied to all stories✅ Follow the hierarchy (avoid flat titles like "Button Stories"):
title: "Packages / Button / Button"
title: "Packages / Dropdown / SingleSelect"
title: "Packages / Button / Testing / Snapshots / ActivityButton"✅ Follow these best practices when writing stories:
✅ Export stories with descriptive JSDoc comments:
/**
* This is the default state of the button showing standard usage.
* It demonstrates the basic props and expected behavior.
*/
export const Default: StoryComponentType = {
args: {
children: "Click me",
onClick: () => {},
},
};✅ Use render functions for stateful stories:
export const WithState: StoryComponentType = {
render: function Render(args) {
const [value, setValue] = React.useState(args.value || "");
return (
<Component
{...args}
value={value}
onChange={setValue}
/>
);
},
args: {
// initial args
},
};⚠️ Important: Use function declarations, not arrow functions:
// ✅ Good - Named function for better debugging
render: function Render(args) {
// ...
}
// ❌ Avoid - Arrow functions don't have clear names
render: (args) => {
// ...
}✅ Show different variants in a single story:
/**
* Buttons have three kinds: `primary` (default), `secondary`, and `tertiary`.
*/
export const Kinds: StoryComponentType = {
render: () => (
<View style={{gap: spacing.medium_16}}>
<Button onClick={() => {}}>Primary</Button>
<Button kind="secondary" onClick={() => {}}>Secondary</Button>
<Button kind="tertiary" onClick={() => {}}>Tertiary</Button>
</View>
),
};✅ Include comprehensive JSDoc comments:
/**
* This example demonstrates how SingleSelect behaves with an initial value.
* The screen reader will not announce the initial value on mount, but will
* announce when the value changes through user interaction.
*/
export const WithInitialValue: StoryComponentType = {
// story configuration
};"union"), the type can be overridden in an argTypes.ts file.Visual style, Events, Accessibility. Use the table.category property in argTypes to group props.When to use: Override auto-generated prop types when they're not helpful or need customization.
✅ Create an argTypes file for your component:
// __docs__/wonder-blocks-button/button.argtypes.ts
import type {ArgTypes} from "@storybook/react-vite";
export default {
// Override type display for union types
kind: {
control: {type: "select"},
options: ["primary", "secondary", "tertiary"],
table: {
category: "Visual style",
type: {summary: `"primary" | "secondary" | "tertiary"`},
defaultValue: {summary: `"primary"`},
},
},
// Group related props
size: {
control: {type: "select"},
table: {
category: "Layout",
type: {summary: `"medium" | "small" | "large"`},
},
},
// Improve descriptions for complex props
style: {
table: {
category: "Layout",
type: {summary: "StyleType"},
},
},
} satisfies ArgTypes;✅ Use argTypes in your story's meta:
import ComponentArgTypes from "./component.argtypes";
export default {
title: "Packages / Component",
component: Component,
argTypes: ComponentArgTypes,
} as Meta<typeof Component>;Common argTypes configurations:
| Property | Purpose |
|---|---|
control.type | Control widget ("select", "boolean", "text", etc.) |
options | Available options for select controls |
table.category | Group props in the docs table |
table.type.summary | Override the displayed type |
table.defaultValue.summary | Show default value in docs |
mapping | Map control values to actual prop values |
✅ Disable snapshots with clear reasoning:
export const Interactive: StoryComponentType = {
render: () => {/* ... */},
parameters: {
chromatic: {
// Disabling because this is for manual testing purposes
disableSnapshot: true,
},
},
};✅ Configure snapshot timing when needed:
export const ControlledOpened: StoryComponentType = {
render: (args) => <Component {...args} />,
parameters: {
// Added to ensure that the dropdown menu is rendered using PopperJS.
chromatic: {delay: 500},
},
};✅ Enable snapshots for important visual states:
export const WithIcon: StoryComponentType = {
render: () => <IconExample />,
parameters: {
chromatic: {
modes: allThemeModes, // Test in multiple themes
},
},
};Theme modes allow Chromatic to capture snapshots of components in multiple themes (e.g., default and Khanmigo/ThunderBlocks themes).
✅ Import and use allThemeModes for visual regression testing:
import {allThemeModes} from "../../.storybook/modes";
export default {
title: "Packages / Component / Testing / Snapshots",
parameters: {
chromatic: {
modes: allThemeModes, // Captures snapshots in all themes
},
},
tags: ["!autodocs"],
} as Meta<typeof Component>;⚠️ Use theme modes sparingly - Each mode multiplies the number of Chromatic snapshots. Only add theme modes to snapshot stories that specifically test theming or visual appearance.
⚠️ Important: StateSheet and Scenarios stories are specifically designed for Chromatic visual regression testing. These stories systematically capture different states and edge cases to ensure visual consistency across code changes.
✅ Create dedicated snapshot stories:
/**
* The following stories are used to generate the pseudo states for the
* ActivityButton component. This is only used for visual testing in Chromatic.
*/
export default {
title: "Packages / Button / Testing / Snapshots / ActivityButton",
tags: ["!autodocs"], // Exclude from auto-generated docs
parameters: {
chromatic: {
modes: allThemeModes,
},
},
} as Meta;✅ Use StateSheet for pseudo-state testing (Chromatic visual regression):
const kinds = [
{name: "Primary", props: {kind: "primary"}},
{name: "Secondary", props: {kind: "secondary"}},
{name: "Tertiary", props: {kind: "tertiary"}},
];
const actionTypes = [
{name: "Progressive", props: {actionType: "progressive"}},
{name: "Neutral", props: {actionType: "neutral"}},
{name: "Disabled", props: {disabled: true}},
];
export const StateSheetStory: Story = {
name: "StateSheet",
render: (args) => (
<StateSheet rows={kinds} columns={actionTypes} title="Kind / Action Type">
{({props, className}) => (
<Component {...args} {...props} className={className} />
)}
</StateSheet>
),
parameters: {
pseudo: defaultPseudoStates, // Includes focus, hover, active states
},
};⚠️ StateSheet stories should cover: focus (:focus-visible), hover, active, disabled states, and relevant prop combinations (kind, actionType, size, etc.)
✅ Test edge cases with ScenariosLayout (Chromatic visual regression):
export const Scenarios: Story = {
render() {
const scenarios = [
{name: "Long label", props: {children: <Component>{longText}</Component>}},
{name: "RTL", decorator: <div dir="rtl" />, props: {children: <Component>یہ اردو میں لکھا ہے۔</Component>}},
];
return (
<ScenariosLayout scenarios={scenarios}>
{(props) => props.children}
</ScenariosLayout>
);
},
};⚠️ Scenario stories should include: RTL layouts (use decorator: <div dir="rtl" />), custom style overrides, and edge cases (long text, long text with no word break, overflow, truncation, empty states).
✅ Create playtesting stories for testing of specific behaviors:
export default {
title: "Packages / Component / Testing / Component - Playtesting",
parameters: {
chromatic: {disableSnapshot: true}, // For testing purposes only, snapshots are not needed
},
} as Meta<typeof Component>;
/**
* Describe the scenario and what to test manually.
* Example: "When selecting a tab with Space/Enter, the page should not scroll."
*/
export const ScrollBehavior: Story = {
render: (args) => (
// Set up the scenario for manual testing
),
};Good candidates for playtesting stories:
⚠️ Playtesting stories should: disable Chromatic snapshots, include clear JSDoc comments explaining what to test, and use the Testing / Component - Playtesting title pattern.
✅ Use clear, descriptive names:
// ✅ Good - Clear and descriptive
export const Default: StoryComponentType = {/* ... */};
export const WithIcon: StoryComponentType = {/* ... */};
export const Disabled: StoryComponentType = {/* ... */};
export const LongOptionLabels: StoryComponentType = {/* ... */};
export const ErrorFromValidation: StoryComponentType = {/* ... */};✅ Override story names when needed:
export const WithRouter: StoryComponentType = {
name: "Navigation with React Router", // Overrides story name in UI
render: () => {/* ... */},
};✅ Do not duplicate the existing story name
Named exports should not use the name annotation if it is redundant to the name that would be generated by the export name.
✅ Use storybook actions for event logging:
import {action} from "storybook/actions";
export const Default: StoryComponentType = {
args: {
onClick: action("clicked"),
onChange: action("changed"),
},
};For stateful stories, combine actions with state updates: action("onChange")(newValue); setValue(newValue);
⚠️ Use Storybook interaction tests for behaviors that rely on real browser APIs not available in jsdom (scroll, layout/geometry, clipboard, complex focus management).
⚠️ Don't test styling in interaction tests - visual appearance is covered by Chromatic snapshot tests.
✅ Use the play function:
import {expect, within} from "storybook/test";
export const BrowserBehaviorTest: StoryComponentType = {
render: (args) => (
// Set up the DOM structure needed to test the behavior
),
play: async ({canvasElement}) => {
const canvas = within(canvasElement);
// Interact with the component (if needed)
// Assert things based on browser-specific behavior
// (e.g., ResizeObserver, getBoundingClientRect, scrollIntoView)
},
parameters: {
/** These stories are used for testing purposes only so we disable snapshots */
chromatic: {disableSnapshot: true},
},
};⚠️ It's okay to have both: Unit tests with proper mocking work for browser behavior, but interaction tests provide additional confidence in a real browser. See .agents/skills/unit-tests/SKILL.md for mocking guidance.
title: "Packages / Button / Testing / Snapshots" with tags: ["!autodocs"] for snapshot storieschromatic: {disableSnapshot: true} for interaction tests and playtesting storiesReact.FC - Use (props: Props) => insteadplay functions for browser-specific behavior that jsdom can't handle© Khan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/storybook of Khan/wonder-blocks.
Open the folder on GitHubat commit 04b6068
Storybook next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Storybook this skillKhan/wonder-blocks | 163 | — | ~4.2k | Automated safety check: Pass | MIT | |
| DaleuiDaleStudy/daleui | 119 | — | ~675 | Automated safety check: Pass | MIT | |
| Creative Tim UI Blockscreativetimofficial/ui | 12k | — | ~2.1k | Automated safety check: Notes | MIT | |
| Skillshare UI Website Stylerunkids/skillshare | 2.8k | — | ~4.5k | Automated safety check: Pass | MIT | |
| Animated React Component LibrariesHainrixz/editor-pro-max | 264 | 1 repos | ~5.7k | Automated safety check: Pass | Custom licence | |
| Fast Typescript Checkinternet-development/www-sacred | 1.6k | — | ~4.3k | Automated safety check: Pass | MIT |
DaleStudy/daleui
Use the daleui React design system with semantic Panda CSS tokens and accessible components.
creativetimofficial/ui
Helps install, generate and review Creative Tim UI blocks: shadcn/ui-based React and Tailwind sections that follow a restrained, production-minded design philosophy.
runkids/skillshare
Skillshare frontend design system for the React dashboard (ui/) and Docusaurus website (website/).
Hainrixz/editor-pro-max
Helps choose and drop in animated React components from Magic UI and React Bits for landing pages, marketing sites and dashboards, instead of hand-coding animations.
internet-development/www-sacred
Keep www-sacred's TypeScript fast to type-check and fast to run.
carere/zaidan
React-to-SolidJS transformation patterns for porting shadcn-style React components, examples, docs snippets, and blocks into Zaidan.
Khan/wonder-blocks
Implements user interfaces using the Wonder Blocks (WB) design system — Khan Academy's React component library.
Khan/wonder-blocks
Jest + React Testing Library best practices for Wonder Blocks unit tests.
Categories
Storybook best practices for Wonder Blocks component stories. Storybook is an agent skill from Khan/wonder-blocks. Storybook best practices for Wonder Blocks component stories.
Storybook fits situations like: editing .stories.tsx / .stories.ts files; tasks that involve React components; tasks that involve Design systems.
Run `npx skills add Khan/wonder-blocks --skill storybook -a claude-code`. Or copy the skill folder (.agents/skills/storybook in Khan/wonder-blocks) into .claude/skills/storybook in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Khan/wonder-blocks --skill storybook -a codex`. Or copy the skill folder (.agents/skills/storybook in Khan/wonder-blocks) into .agents/skills/storybook in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Khan/wonder-blocks --skill storybook -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/storybook, .gemini/skills/storybook, .github/skills/storybook and .opencode/skills/storybook in your project.
SKILL.md names no scripts, command-line tools or credentials: Storybook is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Storybook is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.2k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Storybook: Daleui (DaleStudy/daleui, 119 stars), Creative Tim UI Blocks (creativetimofficial/ui, 12k stars), Skillshare UI Website Style (runkids/skillshare, 2.8k stars) and Animated React Component Libraries (Hainrixz/editor-pro-max, 264 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Khan (a GitHub organization) maintains it in Khan/wonder-blocks, which has 163 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 9, 2026.
Source: Khan/wonder-blocks on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.