원클릭으로
update-storybook-autodoc
Update React components with JSDoc and enhanced Storybook stories with autodoc functionality.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Update React components with JSDoc and enhanced Storybook stories with autodoc functionality.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Bump version to next alpha and update dependencies after release.
Create a release branch, tag, and GitHub release for Backend.AI WebUI.
Enhance React component documentation with JSDoc, improved Storybook stories, and autodoc configuration.
Create or Update BUI Component Story (project)
Generate Relay-based Nodes components with BAITable integration following established patterns (BAIUserNodes, SessionNodes, BAISchedulingHistoryNodes, BAIRouteNodes). Automatically creates component file with GraphQL fragment, type definitions, column configurations, and customization patterns. Minimal user input required - just provide GraphQL type name and the skill generates a complete starting template.
Use when creating a new React component under `react/src/` or `packages/backend.ai-ui/src/`, or refactoring one's file layout, import order, `'use memo'` placement, hook call order, or prop interface. Covers naming conventions (`BAI*`, `*Nodes`, `*Page`) and React 19 rules.
| name | update-storybook-autodoc |
| description | Update React components with JSDoc and enhanced Storybook stories with autodoc functionality. |
| argument-hint | <component-path> |
| model | sonnet |
| disable-model-invocation | true |
Update React components with comprehensive JSDoc documentation and enhanced Storybook stories with autodoc functionality.
/update-storybook-autodoc <component-path>
/update-storybook-autodoc packages/backend.ai-ui/src/components/Table/
For each component file, add comprehensive JSDoc documentation:
/**
* Component description with key features
*
* @param props - Props interface description
* @returns React component
*
* @example
* ```tsx
* <Component prop="value" />
* ```
*/
export const Component = (props: ComponentProps) => {
// implementation
};
Component.displayName = 'Component';
Key documentation patterns:
Important: Due to version compatibility issues between Storybook versions, use this simplified approach:
Update .storybook/main.ts:
const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-docs',
'@storybook/addon-onboarding',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
docs: {
defaultName: 'Documentation',
},
typescript: {
reactDocgen: false, // Disable to prevent "Cannot convert a symbol to a string" errors
},
};
Update .storybook/preview.tsx (note .tsx extension for JSX support):
import type { Preview } from '@storybook/react-vite';
import { ConfigProvider } from 'antd';
import React from 'react';
const preview: Preview = {
tags: ['autodocs'],
decorators: [
(Story) => (
<ConfigProvider>
<div style={{ padding: '16px' }}>
<Story />
</div>
</ConfigProvider>
),
],
parameters: {
docs: {
extractComponentDescription: (_component: any, { notes }: any) => {
return notes?.markdown || notes?.text || null;
},
},
layout: 'padded',
},
};
export default preview;
For each component, create comprehensive stories:
const meta: Meta<typeof Component> = {
title: 'Components/Component',
component: Component,
tags: ['autodocs'], // Enable autodocs
parameters: {
docs: {
description: {
component: `
Detailed component description with:
- Key features
- Usage patterns
- Configuration options
`,
},
},
},
argTypes: {
// Example of manual argTypes definition
status: {
control: { type: 'select' },
options: ['default', 'success', 'warning', 'error'],
description: 'Visual status affecting border color and extra button icons',
table: {
type: { summary: 'string' },
defaultValue: { summary: 'default' },
},
},
title: {
control: { type: 'text' },
description: 'Card title displayed in the header',
table: {
type: { summary: 'ReactNode' },
},
},
children: {
control: false, // Non-interactive prop
description: 'Card body content',
table: {
type: { summary: 'ReactNode' },
},
},
},
};
export const Default: Story = {
parameters: {
docs: {
description: {
story: 'Story-specific description and usage notes',
},
},
},
args: {
// story args
},
};
Create stories for common patterns:
Component Documentation:
Story Documentation:
ArgTypes Configuration (Manual Approach):
control: false for non-interactive props like ReactNodesrc/components/
├── Component/
│ ├── Component.tsx # Main component with JSDoc
│ ├── Component.stories.tsx # Enhanced stories
│ └── SubComponent.stories.tsx # Additional component stories
After running this command:
.tsx extension for preview files to support JSX syntax