← スキル一覧に戻る

nextjs-advanced-routing
by kensleDev
⭐ 0🍴 0📅 2026年1月16日
SKILL.md
name: nextjs-advanced-routing
IMPORTANT: Keep description on ONE line for Claude Code compatibility
prettier-ignore
description: Advanced Next.js routing: Route Handlers (API routes), Server Actions ('use server'), Parallel Routes (@slot), Intercepting Routes ((.)), Error Boundaries, Draft Mode, Suspense streaming. allowed-tools: Read, Write, Edit, Glob, Grep, Bash
Next.js Advanced Routing
Quick Start
Route Handlers: app/api/*/route.ts with GET/POST/PUT/DELETE exports
Server Actions: 'use server' directive, form actions return void (or use useActionState)
Parallel Routes: @slot/ folders, layout receives slot props
Intercepting Routes: (.) for same-level modal interception
// Route Handler
export async function GET() {
return Response.json({ message: 'Hello' });
}
// Server Action (file-level)
'use server';
export async function createPost(formData: FormData) {
revalidatePath('/posts');
// No return - void for form actions
}
Reference Files
- route-handlers.md - API routes, HTTP methods, cookies, headers, CORS, streaming
- server-actions.md - Server Actions patterns, form handling, cookies, revalidation, ⚠️ return type rules
- parallel-intercepting-routes.md - Parallel/Intercepting routes, modal patterns
- error-boundaries.md - Error handling, not-found, global-error
- draft-mode.md - CMS draft preview mode
- streaming-suspense.md - Progressive rendering with Suspense
Notes
- Form actions MUST return void (or use useActionState for data return)
- Scope parallel routes to feature level, not root, unless app-wide
- Last verified: 2025-01-11
スコア
総合スコア
40/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
レビュー
💬
レビュー機能は近日公開予定です