← スキル一覧に戻る

new-component
by AppleLamps
⭐ 0🍴 0📅 2026年1月7日
SKILL.md
name: new-component description: Scaffold React components with TypeScript and Tailwind. Use when user mentions "create component", "new component", "add component", or describes a UI element to build.
New Component
Create React components following project conventions.
Instructions
-
Determine component requirements:
- Server or Client component?
- Props interface
- Variants (e.g., featured vs standard)
-
Create file at
src/components/<ComponentName>.tsx -
Server Component template (default):
import Image from 'next/image'; import Link from 'next/link'; interface ComponentNameProps { title: string; description?: string | null; href?: string; } export default function ComponentName({ title, description, href = '#', }: ComponentNameProps) { return ( <div className="rounded-lg border border-gray-200 p-4"> <h3 className="font-serif text-lg font-bold">{title}</h3> {description && ( <p className="mt-2 text-sm text-gray-600">{description}</p> )} <Link href={href} className="text-blue-600 hover:underline"> Read more </Link> </div> ); } -
Client Component template (for interactivity):
'use client'; import { useState } from 'react'; interface ComponentNameProps { initialValue?: string; onSubmit?: (value: string) => void; } export default function ComponentName({ initialValue = '', onSubmit, }: ComponentNameProps) { const [value, setValue] = useState(initialValue); const handleSubmit = () => { onSubmit?.(value); }; return ( <div className="flex gap-2"> <input type="text" value={value} onChange={(e) => setValue(e.target.value)} className="rounded border px-3 py-2" /> <button onClick={handleSubmit} className="rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700" > Submit </button> </div> ); }
Project Patterns
- Use
font-seriffor headlines, default sans for body - Use Next.js
Imagecomponent withfillandobject-cover - Use
date-fnsfor date formatting:import { format } from 'date-fns' - Reference existing components in
src/components/for styling patterns
Examples
- "Create a card component for testimonials"
- "New component for newsletter signup"
- "Add a modal component"
Guardrails
- Check if similar component exists before creating new one
- Only add 'use client' if interactivity is required
- Use TypeScript interfaces for all props
- Follow existing Tailwind class patterns from ArticleCard.tsx
スコア
総合スコア
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
レビュー
💬
レビュー機能は近日公開予定です