_legacy/frontend/web-development/SKILL.md
モダンWeb開発の基礎。React、Vue、Next.jsなどのフレームワーク選定、プロジェクト構成、状態管理、ルーティング、ビルドツールなど、Web開発全般のベストプラクティス。
npx skillsauth add gaku52/claude-code-skills web-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
このSkillは、モダンWeb開発の基礎をカバーします:
このガイドで学べること: フレームワーク選定の判断基準、プロジェクト構成パターン、状態管理の実装方法、ビルドツールの使い方 公式で確認すべきこと: 最新のフレームワークバージョン、新機能、パフォーマンス最適化、セキュリティアップデート
MDN Web Docs - Web技術の包括的なドキュメント
React Documentation - 最も人気のあるJavaScriptライブラリ
Next.js Documentation - Reactベースのフルスタックフレームワーク
Vue.js Documentation - プログレッシブJavaScriptフレームワーク
プロダクションレベルの開発を学ぶには、以下の完全ガイドを参照してください:
26,000文字 | 6大フレームワーク徹底比較 | 実プロジェクト事例10以上
28,000文字 | Context API・Zustand・Jotai・Redux Toolkit徹底解説
26,000文字 | スケーラブルなアーキテクチャ・ビルドツール・CSS戦略
合計: 80,000文字 | 50以上の完全実装例 | 実プロジェクトの測定データ
| フレームワーク | 用途 | メリット | デメリット | |----------|-----|--------|---------| | Next.js | フルスタックWebアプリ | SSR/SSG標準、SEO最適、App Router | 学習コスト高 | | React (Vite) | SPA、管理画面 | シンプル、柔軟 | SEO対策が必要 | | Remix | フルスタック | ネストルーティング、UX最高 | エコシステム小 | | Vue (Nuxt) | フルスタック | 学習容易、日本語情報豊富 | React比でエコシステム小 | | Astro | コンテンツサイト | 超高速、部分的インタラクティブ | 複雑なアプリには不向き |
SEOが最重要?
├─ Yes → サーバーサイドレンダリング必要
│ ├─ React好き → Next.js
│ └─ Vue好き → Nuxt.js
└─ No → SPA OK
├─ 管理画面・内部ツール → React + Vite
└─ コンテンツ中心 → Astro
project/
├── app/ # アプリケーションルート
│ ├── (marketing)/ # ルートグループ(パスに含まれない)
│ │ ├── layout.tsx
│ │ ├── page.tsx # /
│ │ └── about/page.tsx # /about
│ ├── dashboard/
│ │ ├── layout.tsx
│ │ └── page.tsx # /dashboard
│ ├── api/ # APIルート
│ │ └── users/route.ts # /api/users
│ ├── layout.tsx # ルートレイアウト
│ └── globals.css
├── components/ # 共有コンポーネント
│ ├── ui/ # UIコンポーネント(shadcn/ui等)
│ │ ├── button.tsx
│ │ └── card.tsx
│ └── features/ # 機能別コンポーネント
│ ├── user-profile.tsx
│ └── post-list.tsx
├── lib/ # ユーティリティ、ヘルパー
│ ├── utils.ts
│ ├── api.ts
│ └── db.ts
├── hooks/ # カスタムフック
│ ├── use-user.ts
│ └── use-posts.ts
├── types/ # TypeScript型定義
│ ├── user.ts
│ └── post.ts
├── public/ # 静的ファイル
│ └── images/
├── .env.local # 環境変数
├── next.config.js
├── tailwind.config.ts
└── package.json
project/
├── src/
│ ├── pages/ # ページコンポーネント
│ │ ├── Home.tsx
│ │ ├── Dashboard.tsx
│ │ └── Settings.tsx
│ ├── components/ # 共有コンポーネント
│ │ ├── Header.tsx
│ │ ├── Sidebar.tsx
│ │ └── ui/
│ ├── hooks/ # カスタムフック
│ ├── lib/ # ユーティリティ
│ ├── store/ # 状態管理(Zustand等)
│ │ ├── userStore.ts
│ │ └── appStore.ts
│ ├── types/ # 型定義
│ ├── App.tsx
│ ├── main.tsx
│ └── index.css
├── public/
├── index.html
├── vite.config.ts
└── package.json
{
"devDependencies": {
"eslint": "^8.0.0",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
}
}
.prettierrc
{
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
}
.eslintrc.json
{
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"@typescript-eslint/no-unused-vars": "error",
"prefer-const": "error"
}
}
pnpm add -D husky lint-staged
# package.json
{
"lint-staged": {
"*.{ts,tsx}": ["eslint --fix", "prettier --write"]
}
}
# プロジェクト作成
pnpm create next-app@latest my-app --typescript --tailwind --app
cd my-app
# 追加パッケージ
pnpm add zustand zod react-hook-form
pnpm add -D @types/node
# shadcn/ui セットアップ
pnpm dlx shadcn-ui@latest init
pnpm dlx shadcn-ui@latest add button card
app/page.tsx
import { Button } from '@/components/ui/button'
export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-center p-24">
<h1 className="text-4xl font-bold">Welcome</h1>
<Button className="mt-4">Get Started</Button>
</main>
)
}
# プロジェクト作成
pnpm create vite@latest my-app --template react-ts
cd my-app
pnpm install
# 追加パッケージ
pnpm add react-router-dom zustand
pnpm add -D tailwindcss postcss autoprefixer
pnpm dlx tailwindcss init -p
src/main.tsx
import React from 'react'
import ReactDOM from 'react-dom/client'
import { BrowserRouter, Routes, Route } from 'react-router-dom'
import App from './App'
import './index.css'
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<BrowserRouter>
<Routes>
<Route path="/" element={<App />} />
</Routes>
</BrowserRouter>
</React.StrictMode>
)
// store/userStore.ts
import { create } from 'zustand'
interface User {
id: string
name: string
email: string
}
interface UserStore {
user: User | null
setUser: (user: User) => void
logout: () => void
}
export const useUserStore = create<UserStore>((set) => ({
user: null,
setUser: (user) => set({ user }),
logout: () => set({ user: null }),
}))
使用例
import { useUserStore } from '@/store/userStore'
export function UserProfile() {
const { user, logout } = useUserStore()
if (!user) return <div>Not logged in</div>
return (
<div>
<p>{user.name}</p>
<button onClick={logout}>Logout</button>
</div>
)
}
// ❌ 悪い例
function UserName({ name }: { name: string }) {
return <span>{name}</span>
}
function UserEmail({ email }: { email: string }) {
return <span>{email}</span>
}
function UserProfile({ user }: { user: User }) {
return (
<div>
<UserName name={user.name} />
<UserEmail email={user.email} />
</div>
)
}
// ✅ 良い例
function UserProfile({ user }: { user: User }) {
return (
<div>
<span>{user.name}</span>
<span>{user.email}</span>
</div>
)
}
// ❌ 悪い例
function App() {
const [user, setUser] = useState<User | null>(null)
return <Dashboard user={user} setUser={setUser} />
}
function Dashboard({ user, setUser }: Props) {
return <Settings user={user} setUser={setUser} />
}
function Settings({ user, setUser }: Props) {
// userとsetUserを使う
}
// ✅ 良い例(Zustand使用)
const useUserStore = create<UserStore>((set) => ({
user: null,
setUser: (user) => set({ user }),
}))
function Settings() {
const { user, setUser } = useUserStore()
// 直接アクセス
}
// ❌ 悪い例
function UserList() {
const [users, setUsers] = useState<User[]>([])
useEffect(() => {
fetch('/api/users')
.then(res => res.json())
.then(setUsers)
}, []) // 依存配列が空 → コンポーネントマウント時のみ
}
// ✅ 良い例(Next.js App Router)
async function UserList() {
const users = await fetch('/api/users').then(res => res.json())
return (
<ul>
{users.map(user => (
<li key={user.id}>{user.name}</li>
))}
</ul>
)
}
新規プロジェクト作成
Next.js App Routerプロジェクトを作成してください。
以下を含めてください:
- TypeScript
- Tailwind CSS
- shadcn/ui
- Zustand(状態管理)
- Prisma(データベース)
コンポーネント生成
ユーザープロフィール編集コンポーネントを作成してください。
以下の機能を含めてください:
- react-hook-formでバリデーション
- zodスキーマ
- 送信時の楽観的UI更新
状態管理の追加
Zustandでショッピングカート機能を実装してください。
addItem, removeItem, clearCartアクションを含めてください。
このコンポーネントは複雑になっています。
以下に分割することを提案します:
1. UserProfileForm - フォーム部分
2. UserAvatar - アバター表示部分
3. UserActions - アクション部分
分割しますか?
Last updated: 2025-12-26
tools
Fundamentals of modern web development. Framework selection (React, Vue, Next.js), project architecture, state management, routing, build tools, and CSS strategy best practices.
development
# React Development — Complete Guide > A comprehensive guide to building modern React applications with TypeScript. Covers fundamentals through advanced patterns, Hooks mastery, TypeScript integration, performance optimization, and algorithm internals. ## Target Audience - Developers new to React who want a solid foundation - Intermediate React developers looking to deepen their understanding of Hooks and TypeScript patterns - Engineers who want to understand React's internal algorithms (Virt
development
# Node.js Development Skill > A practical guide collection for Node.js development. Covers all aspects of Node.js application development, including Express, NestJS, asynchronous patterns, and performance optimization. ## Overview This skill covers the following topics: - **Express & NestJS**: When to use a lightweight framework vs. an enterprise framework - **Asynchronous Patterns**: Promise, async/await, Event Emitter, Streams, Worker Threads, Cluster - **Performance Optimization**: Memory
development
# Backend Development — Complete Guide > A comprehensive guide to backend engineering. Covers the fundamentals of HTTP, REST API design, databases, authentication, environment configuration, and algorithm proofs — everything needed to build robust server-side systems. ## Target Audience - Developers new to backend engineering - Frontend engineers expanding toward full-stack development - Engineers looking to solidify their understanding of server-side fundamentals ## Prerequisites - Basic p