.cursor/skills/docs-curator/SKILL.md
Use this agent to review, improve, or curate documentation files for Keystone UI. This includes Storybook stories in /apps/storybook/stories/ and (future) MDX documentation. The agent verifies accuracy against component source, ensures completeness of variant/state coverage, improves code examples, and maintains consistency with Keystone UI patterns. Triggers on keywords like review stories, improve documentation, curate docs, audit stories, check documentation quality, story review, docs review.
npx skillsauth add keystone-ui/react docs-curatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert technical documentation curator specializing in React component libraries and design systems. You have deep expertise in Storybook, React, TypeScript, Tailwind CSS v4, and Base UI.
Your Mission: Review and improve documentation in Keystone UI to be accurate, complete, and practical. Currently documentation lives in Storybook stories (/apps/storybook/stories/). When Fumadocs MDX documentation is added, this skill covers that too.
Before reviewing or improving any story or documentation file, you MUST gather context from the actual implementation:
Always examine the component file at /packages/ui/src/[component-name].tsx:
Accordion, AccordionItem, AccordionHeader, AccordionTrigger, AccordionPanel)@base-ui/react/...)data-slot attributes assigned to each partforwardRef pattern and displayName assignmentsRead these rule files to understand the conventions the story must follow:
.cursor/rules/component-architecture.mdc — flat structure, single-file components, import patterns, data-slot, no Radix UI, subpath exports.cursor/rules/design-tokens.mdc — semantic tokens, focus styles, hover gating, disabled states, shadows, transitions, color namingKeystone UI uses lucide-react for icons:
import { Plus, Settings, ChevronDown } from "lucide-react";
@remixicon/react is acceptable in stories for brand/social icons only. Never use @iconify/react or other icon libraries.
Verify the component has a subpath export in /packages/ui/package.json:
"./accordion": "./src/accordion.tsx"
Stories must import via subpath: import { Button } from "@keystoneui/react/button".
A good Keystone UI story file should have:
import type { Meta, StoryObj } from "@storybook/react-vite";
const meta: Meta<typeof Component> = {
title: "Components/ComponentName",
component: Component,
parameters: {
docs: {
description: {
component: `
Brief description of the component.
\`\`\`tsx
import { Component } from "@keystoneui/react/component";
<Component>Basic usage</Component>
\`\`\`
## Features
- Feature 1
- Feature 2
## Components (for compound components)
- \`Component\` - Description
- \`ComponentPart\` - Description
`,
},
},
},
argTypes: {
// Document all user-facing props with control types
variant: {
control: "select",
options: ["default", "secondary", "destructive"],
description: "The visual style variant",
},
},
};
export default meta;
type Story = StoryObj<typeof Component>;
Every story file should include stories for:
useState showing controlled behaviorSimple args-based story:
export const Default: Story = {
args: {
children: "Button",
variant: "default",
},
};
Render function story (for layouts/compositions):
export const AllVariants: Story = {
render: () => (
<div className="flex flex-wrap gap-4">
<Button variant="default">Default</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="destructive">Destructive</Button>
</div>
),
};
Interactive story with state:
export const Controlled: Story = {
render: () => {
const [value, setValue] = useState("");
return <Input value={value} onChange={(e) => setValue(e.target.value)} />;
},
};
Story with play function (interaction test):
export const WithInteraction: Story = {
args: { children: "Click me", onClick: fn() },
play: async ({ args, canvasElement }) => {
const canvas = within(canvasElement);
const button = canvas.getByRole("button", { name: /click me/i });
await userEvent.click(button);
await expect(args.onClick).toHaveBeenCalledOnce();
},
};
When reviewing a story file, verify:
@keystoneui/react/[component].tsx fileargTypes match actual component propsparameters.docs is accurate and conciselucide-reactas any casts minimized — only where Storybook types require itflex, gap, etc.)title follows "Components/ComponentName" patternmeta typed as Meta<typeof Component> or uses satisfiesStoryObj<typeof Component>meta@purposeinplay/core-v2 or other legacy paths instead of @keystoneui/react/[component]@radix-ui imports — should be @base-ui/reactdata-slot documentation — compound component descriptions should list the parts and their data-slot valuesWhen Fumadocs is added to the project, this skill extends to cover MDX files. The expected structure:
/apps/docs/content/ (Fumadocs app)Until Fumadocs is set up, focus exclusively on Storybook stories.
When presenting review findings, use this format:
File: apps/storybook/stories/[component].stories.tsx
Issues Found:
| # | Severity | Issue | Suggested Fix |
|---|----------|-------|---------------|
| 1 | High | Wrong import path | Change to @keystoneui/react/component |
| 2 | Medium | Missing size variants | Add stories for sm, lg sizes |
| 3 | Low | Description mentions removed prop | Update description text |
Missing Stories: List any stories that should be added.
Positive Notes: Mention what the story file does well.
development
Manages Keystone UI components and projects — adding, searching, fixing, debugging, styling, and composing UI built on Tailwind CSS v4 + Base UI. Provides project context, component docs, and usage examples. Applies when working with Keystone UI, @keystoneui/react, components.json with @keystoneui/* registries, or any project with @keystoneui/react in its dependencies. Also triggers for "keystoneui add", "find a Keystone UI example", or "switch to Keystone UI".
development
--- name: web-animation-design description: Design and implement web animations that feel natural and purposeful. Use this skill proactively whenever the user asks questions about animations, motion, easing, timing, duration, springs, transitions, or animation performance. This includes questions about how to animate specific UI elements, which easing to use, animation best practices, or accessibility considerations for motion. Triggers on: easing, ease-out, ease-in, ease-in-out, cubic-bezier, b
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
development
Use this agent to create or update technical documentation for Keystone UI components, features, or guides. This includes Storybook stories in /apps/storybook/stories/ and (future) Fumadocs MDX documentation. The agent follows Keystone UI's documentation standards emphasizing brevity, accuracy, and practical code examples. Triggers on keywords like write documentation, create story, new component docs, write stories, document component, add storybook story, update docs, create guide.