CtrlK
BlogDocsLog inGet started
Tessl Logo

route-handlers

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

1.22x
Quality

80%

Does it follow best practices?

Impact

93%

1.22x

Average score across 3 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Optimize this skill with Tessl

npx tessl skill review --optimize ./.trae/skills/route-handlers/SKILL.md
SKILL.md
Quality
Evals
Security

Evaluation results

100%

23%

Product Catalog REST API

CRUD route file structure and HTTP semantics

Criteria
Without context
With context

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%

90%

21%

Article Search and Listing API

Paginated list endpoint with query validation

Criteria
Without context
With context

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%

90%

7%

Real-Time Job Progress Feed

Server-Sent Events streaming endpoint

Criteria
Without context
With context

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%

Repository
Lingjie-chen/MT5
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

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.