claude-code-framework/essential/skills/scaffolding/next-api-scaffold/SKILL.md
Creates Next.js API routes with TypeScript, error handling, and validation. Use when user says "create API route", "add endpoint", "new API", mentions /api/ paths, or wants to add a Next.js route handler.
npx skillsauth add tokenized2027/claude-initilization-v7 next-api-scaffoldInstall 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.
// app/api/users/route.ts
import { NextRequest, NextResponse } from 'next/server'
export async function GET(request: NextRequest) {
try {
const searchParams = request.nextUrl.searchParams
const limit = searchParams.get('limit') || '10'
// TODO: Fetch from database
const users = []
return NextResponse.json({ success: true, data: users })
} catch (error) {
console.error('GET /api/users error:', error)
return NextResponse.json(
{ success: false, error: 'Internal server error' },
{ status: 500 }
)
}
}
import { NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
const schema = z.object({
name: z.string().min(1),
email: z.string().email(),
})
export async function POST(request: NextRequest) {
try {
const body = await request.json()
const validation = schema.safeParse(body)
if (!validation.success) {
return NextResponse.json(
{ success: false, errors: validation.error.errors },
{ status: 400 }
)
}
// TODO: Save to database
return NextResponse.json({ success: true, data: validation.data }, { status: 201 })
} catch (error) {
return NextResponse.json({ success: false, error: 'Internal server error' }, { status: 500 })
}
}
// app/api/users/[id]/route.ts
export async function GET(
request: NextRequest,
{ params }: { params: { id: string } }
) {
const { id } = params
// TODO: Fetch user by id
return NextResponse.json({ success: true, data: { id } })
}
development
Methodical debugging using reproducible steps, instrumentation, and root-cause analysis. Use when something is broken and you don't know why. Triggers on "bug", "broken", "not working", "error", "fails intermittently", "regression", "unexpected behavior".
development
Optimize prompts for Claude Code agents, API calls, and multi-agent orchestration. Use when writing system prompts, agent instructions, or refining LLM interactions. Triggers on "improve prompt", "write a prompt", "agent instructions", "system prompt", "prompt not working", "LLM output quality".
tools
Structured ideation and design review before any creative or constructive work. Use before building features, components, architecture, dashboards, or automation workflows. Triggers on "plan this", "design this", "brainstorm", "think through", "what should we build", "how should I approach".
testing
Generates test files for components and functions with setup, basic tests, and mocks. Use when user says "add tests", "create test", "test this component", or mentions testing.