React開発ルール。コンポーネント(関数コンポーネント、Props、条件付きレンダリング)、カスタムフック(use*命名、状態管理)、Storybook(CSF3.0)の規約を定義。React実装時に参照。
From react-rules-pluginnpx claudepluginhub dio0550/d-market --plugin react-rules-pluginThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
Reactコンポーネント、カスタムフック、Storybookの規約を定義するスキル。
React.FC は使用しない)React.memo を使用type Props として定義PascalCasecamelCase// ✅ 推奨: 三項演算子
{isLoading ? <Spinner /> : <Content />}
// ❌ 非推奨: 論理演算子(falsy値の問題)
{count && <Badge count={count} />}
use で始める(例: useUserData)type UseUserDataResult = {
user: User | null;
isLoading: boolean;
error: Error | null;
refetch: () => void;
};
export const useUserData = (userId: string): UseUserDataResult => {
const [user, setUser] = useState<User | null>(null);
const [isLoading, setIsLoading] = useState(true);
const [error, setError] = useState<Error | null>(null);
// ...
return { user, isLoading, error, refetch };
};
import { renderHook, act } from "@testing-library/react";
test("初期値が0である", () => {
const { result } = renderHook(() => useCounter());
expect(result.current.count).toBe(0);
});
ComponentName.stories.tsxMeta<typeof Component> と StoryObj<typeof Component>| Story | 内容 |
|---|---|
| Default | 基本的な使用例 |
| AllProps | 全props設定状態 |
| EdgeCases | 境界値・特殊状態 |
import type { Meta, StoryObj } from "@storybook/react";
import { fn } from "@storybook/test";
import { Button } from "./Button";
const meta: Meta<typeof Button> = {
component: Button,
args: { onClick: fn() },
};
export default meta;
type Story = StoryObj<typeof Button>;
export const Default: Story = {
args: { label: "Click me" },
};