This skill should be used when the user asks to "create an API route", "add an endpoint", "build a REST API", "handle POST requests", "create route handlers", "stream responses", or needs guidance on Next.js API development in the App Router.
85
80%
Does it follow best practices?
Impact
93%
1.22xAverage score across 3 eval scenarios
Advisory
Suggest reviewing before use
Optimize this skill with Tessl
npx tessl skill review --optimize ./.trae/skills/route-handlers/SKILL.mdCRUD route file structure and HTTP semantics
Collection route path
100%
100%
Individual route path
100%
100%
Named HTTP method exports
100%
100%
NextResponse.json usage
100%
100%
Zod schema validation
70%
100%
POST returns 201
100%
100%
404 for missing resources
100%
100%
DELETE returns 204
100%
100%
Try/catch with 500 fallback
0%
100%
Awaited dynamic params
0%
100%
Paginated list endpoint with query validation
nextUrl.searchParams
100%
100%
NextRequest type
100%
100%
Zod pagination schema
70%
100%
safeParse used
0%
100%
400 on invalid params
87%
100%
Promise.all for count
0%
0%
Pagination envelope
100%
100%
Pagination fields: total
100%
100%
Pagination fields: totalPages
100%
100%
Pagination fields: hasMore
25%
100%
Try/catch error handling
50%
100%
Sort default value
100%
100%
Server-Sent Events streaming endpoint
ReadableStream + TextEncoder
100%
100%
Content-Type: text/event-stream
100%
100%
Cache-Control: no-cache
100%
100%
Connection: keep-alive
100%
100%
Named event format
100%
100%
Data line format
100%
100%
force-dynamic export
0%
0%
Stream error handling
30%
100%
new Response for stream
100%
100%
CORS OPTIONS handler
100%
100%
Dynamic params awaited
100%
100%
3069d33
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.