← スキル一覧に戻る

react-component-create
by cpa03
🏗️ AI-powered blueprint generator for codebases with autonomous multi-agent CI/CD workflow
⭐ 0🍴 0📅 2026年1月15日
SKILL.md
name: react-component-create description: Create new React components following project patterns and best practices. Includes proper typing, testing, and documentation.
React Component Create Skill
Create production-ready React components.
Component Template
Functional Component
import { memo, useCallback, type FC } from "react";
interface ComponentNameProps {
/** Description of prop */
propName: string;
/** Optional prop with default */
optionalProp?: boolean;
/** Callback handler */
onAction?: (value: string) => void;
}
/**
* ComponentName - Brief description
*
* @example
* <ComponentName propName="value" onAction={handleAction} />
*/
export const ComponentName: FC<ComponentNameProps> = memo(
({ propName, optionalProp = false, onAction }) => {
const handleClick = useCallback(() => {
onAction?.(propName);
}, [propName, onAction]);
return <div className="component-name">{/* Component content */}</div>;
}
);
ComponentName.displayName = "ComponentName";
Test Template
import { render, screen, fireEvent } from "@testing-library/react";
import { describe, it, expect, vi } from "vitest";
import { ComponentName } from "./ComponentName";
describe("ComponentName", () => {
it("renders correctly", () => {
render(<ComponentName propName="test" />);
expect(screen.getByText("test")).toBeInTheDocument();
});
it("calls onAction when clicked", () => {
const onAction = vi.fn();
render(<ComponentName propName="test" onAction={onAction} />);
fireEvent.click(screen.getByRole("button"));
expect(onAction).toHaveBeenCalledWith("test");
});
});
Directory Structure
components/
ComponentName/
index.ts # Export barrel
ComponentName.tsx # Component implementation
ComponentName.test.tsx # Tests
ComponentName.css # Styles (if needed)
Checklist
- Props interface defined with JSDoc
- Component wrapped with memo if pure
- Callbacks wrapped with useCallback
- DisplayName set for debugging
- Tests cover main scenarios
- Accessibility attributes added
- Types exported if needed elsewhere
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です