スキル一覧に戻る
LEE-SANG-BOK

vkc-api-route-pattern

by LEE-SANG-BOK

0🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: vkc-api-route-pattern description: Standardize Next.js App Router API route implementations under src/app/api/** (auth/session, input validation, Drizzle queries, rate limiting, response shape). Use when creating or refactoring API routes in this repo. metadata: short-description: API Route skeleton + rules

VKC API Route Pattern

When to use

  • Creating new endpoints under src/app/api/**
  • Refactoring existing endpoints to match house style

House style (this repo)

  • Auth: getSession (user) or getAdminSession (admin)
  • DB: db from @/lib/db, tables from @/lib/db/schema
  • Rate limit (if needed): checkRateLimit + rateLimitResponse
  • Responses:
    • Public APIs: prefer @/lib/api/response helpers
    • Admin APIs: typically NextResponse.json(...) directly (keep consistent within /api/admin/**)
  • Validation: repo currently uses explicit runtime checks (no Zod dependency yet). If Zod is added later, migrate route-by-route.

Canonical references

  • Public route w/ validation + rate-limit: src/app/api/reports/route.ts
  • Public route w/ typed allowlists: src/app/api/events/route.ts
  • Admin CRUD + schedule fields: src/app/api/admin/news/route.ts

Template

  • Full skeleton (copy + customize): .codex/skills/vkc-api-route-pattern/references/api-route-template.ts

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です