一键导入
overview-mdx
Add or update an MDX overview documentation page for a component in Storybook, detailing usage patterns, API surface, and implementation guidance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add or update an MDX overview documentation page for a component in Storybook, detailing usage patterns, API surface, and implementation guidance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Migrate a design-system component off Ant Design to a DS-native styled-components implementation. Encodes the playbook + refinements from the Badge/Typography migrations so each subsequent component is faster. Use when removing antd from a `@synerise/ds-*` package (the antd-removal initiative).
End-to-end DS release — publish bumped packages with lerna, generate a changelog from GitLab MRs, create a Jira release task plus a GitLab release, post a two-audience release changelog to the Teams releases channel, and optionally open DS-upgrade branches/MRs in the portal-ui-bridge and portal-next consumer repos
Audit a design system package for code quality, test coverage, Storybook completeness, and code hygiene issues. Produces a severity-ranked report and a fix plan for critical/important issues.
Verify a component package is ready for publishing by checking documentation, stories, argTypes, code tabs, overview page, unit tests, and interaction tests.
Generate a CLAUDE.md file for a design system component package that documents its structure, API, sub-components, and implementation details for AI-assisted development.
Push current branch to origin, create a GitLab MR if one doesn't exist, and monitor the pipeline until completion
| name | overview-mdx |
| description | Add or update an MDX overview documentation page for a component in Storybook, detailing usage patterns, API surface, and implementation guidance. |
Create or update a component's MDX overview page in Storybook (packages/storybook/stories/components/<PascalName>/<PascalName>.mdx). This page appears as the "Overview" tab (configured via docs.defaultName: 'Overview' in .storybook/main.ts) and serves as the primary developer-facing documentation for consuming the component.
The user must provide:
modal, button, progress-bar (kebab-case directory name under packages/components/)The user may optionally provide:
If the package name was not provided, ask: "Which package would you like to create an overview page for? (e.g. modal, button, popover)"
Read the component source and existing documentation to understand the full API surface:
packages/components/<package-name>/src/ ← component source (all .tsx/.ts files)
packages/components/<package-name>/CLAUDE.md ← AI reference doc (rich context)
packages/components/<package-name>/README.md ← existing docs (if present)
packages/storybook/stories/components/<PascalName>/ ← all story files
From the source, extract:
index.ts and *.types.ts)DSProvider wrapper)From the stories, extract:
Canvas examples)<Meta> tag)Look for an existing file at:
packages/storybook/stories/components/<PascalName>/<PascalName>.mdx
Also check for alternate names: <PascalName>.overview.mdx, <PascalName>.docs.mdx.
Select which story variants to embed as Canvas examples. Choose stories that:
Do NOT embed every story — pick the 3–7 most instructive ones. Visual test stories (*Matrix*, tags: ['visualtests']) and .tests.stories.tsx stories must never be embedded.
Use this structure (adapt based on component complexity — omit sections that don't apply):
import { Meta, Canvas } from '@storybook/addon-docs/blocks';
import { StoryName1, StoryName2 } from './<PascalName>.stories';
// Import from .tests.stories ONLY if a specific interaction demo is needed
// Import the meta for the <Meta> tag:
import <PascalName>Meta from './<PascalName>.stories';
<Meta component={ComponentImport} of={<PascalName>Meta} />
# <ComponentName>
<1-2 sentence description of what the component does and when to use it.>
## Quick overview
- <Bullet points covering the key concepts a developer needs to know>
- <How to import and use the component>
- <Any required wrapper/provider>
- <Key behavioural modes (e.g., controlled vs uncontrolled)>
## Basic example
<Canvas of={Default} sourceState="shown" />
## <Variant/Feature name>
<Brief explanation of this variant or feature.>
<Canvas of={VariantStory} sourceState="shown" />
<!-- Repeat for each major variant/feature -->
## API reference
### `<ComponentName>`
<Brief description.>
{/* MDX does not render markdown tables correctly — always use HTML tables */}
<table>
<thead>
<tr>
<th>Prop</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>propName</code></td>
<td><code>type</code></td>
<td><code>default</code></td>
<td>What it does</td>
</tr>
</tbody>
</table>
{/* Add tables for sub-components if they have their own props */}
### `<SubComponentName>` _(if applicable)_
<table>
<thead>
<tr>
<th>Prop</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
</tbody>
</table>
### Exported types _(if applicable)_
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>TypeName</code></td>
<td>What it represents</td>
</tr>
</tbody>
</table>
## Notes & tips
- <Non-obvious implementation details>
- <Common gotchas>
- <Accessibility considerations>
- <Performance tips for large datasets, etc.>
sourceState="shown" — use on the primary example so the code is visible by default. Omit on subsequent examples to keep the page scannable (users can expand them).*.types.ts file. Include type, default, and description. Do not invent props.import Component from '@synerise/ds-<package-name>'.Canvas component renders the story inline — describe why a pattern matters, not what the code does line-by-line.<table> elements instead.autodocs tags from story filesA manual MDX page replaces the auto-generated docs page. If any story file for this component has tags: ['autodocs'] in its meta (default export), remove the autodocs tag. Leaving it in causes a Storybook warning:
You created a component docs page for '...', but also tagged the CSF file with 'autodocs'. This is probably a mistake.
Check all *.stories.tsx files (excluding *.test.stories.tsx) in the component's stories directory and remove 'autodocs' from the tags array. If autodocs is the only tag, remove the entire tags property.
After writing:
import and <Canvas of={...} />.Output: