AGENT SKILL

api-route-structure

暂无简介

License 许可
MIT
最近更新
2026-06-08
Stars
★ 0
Forks
0

03 SKILL.md 正文

api-route-structure Skill

Role & Purpose

Ensures Next.js API routes follow the standard route layout:

  • Include a descriptive JSDoc @module header.
  • Use step-numbered comments with // === separators (e.g. // === STEP 1: Parse params ===).
  • Connect to database with await connectDB().
  • Validate user identity from x-user-id header.
  • Limit payload sizes and format outputs correctly.

04 同仓库更多 Skills