← スキル一覧に戻る

api-routes
by pluginagentmarketplace
Next.js Development Plugin
⭐ 1🍴 0📅 2026年1月5日
SKILL.md
name: api-routes description: "Next.js API Routes - Route handlers, middleware, edge runtime" sasmp_version: "1.3.0" bonded_agent: nextjs-expert bond_type: PRIMARY_BOND
Api Routes Skill
Overview
Build API endpoints with Next.js Route Handlers and middleware.
Capabilities
- Route Handlers: app/api/route.ts files
- HTTP Methods: GET, POST, PUT, DELETE, PATCH
- Request/Response: Web API standard
- Middleware: Edge runtime processing
- Dynamic Routes: [param] patterns
Examples
// app/api/users/route.ts
import { NextResponse } from 'next/server'
export async function GET() {
const users = await db.users.findMany()
return NextResponse.json(users)
}
export async function POST(request: Request) {
const body = await request.json()
const user = await db.users.create(body)
return NextResponse.json(user, { status: 201 })
}
// app/api/users/[id]/route.ts
export async function GET(
request: Request,
{ params }: { params: { id: string } }
) {
const user = await db.users.findById(params.id)
return NextResponse.json(user)
}
Middleware Example
// middleware.ts
export function middleware(request: NextRequest) {
const token = request.cookies.get('token')
if (!token) {
return NextResponse.redirect(new URL('/login', request.url))
}
}
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です