skills/nextjs-backend/SKILL.md
Unified Next.js backend coding skill — write API routes, server actions, database queries, authentication, and multi-tenant logic using the App Router. Auto-triages: Quick (single route handler, one server action, simple CRUD endpoint, auth check) or Deep (multi-file features: full auth system, multi-tenant setup, CRUD with pagination + validation, webhook integrations). MUST use for ANY Next.js backend request — API routes, route handlers, server actions, database queries (Prisma/Drizzle), JWT auth, middleware, multi-tenant architecture, webhook processing, or server-side data mutations. Triggers: "create an API route," "add a server action," "connect to PostgreSQL," "add authentication," "protect this route," "multi-tenant," "webhook handler," "database query," "Prisma schema," "Drizzle query," "JWT," "middleware auth." Do not use for frontend React components, styling, or client-side state management.
npx skillsauth add cuozg/oh-my-skills nextjs-backendInstall 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.
Detect scope, pick mode, implement. Match local patterns (Prisma vs Drizzle, Auth.js vs custom JWT), verify with TypeScript, deliver complete backend code.
| Signal | Mode | |--------|------| | One file: single route handler, one server action, add auth check, simple query | Quick | | 2+ files: auth system, multi-tenant setup, full CRUD resource, webhook + DB integration | Deep |
State triage: "This is [mode] — [reason]."
Load the relevant reference for the task domain:
read_skill_file("nextjs-backend", "references/api-routes.md")read_skill_file("nextjs-backend", "references/server-actions.md")read_skill_file("nextjs-backend", "references/database.md")read_skill_file("nextjs-backend", "references/auth.md")lsp_diagnostics on changed fileLoad all relevant references for the feature scope.
lsp_diagnostics per layer, then all filesnpx prisma migrate dev), testing guidance (curl examples){ error: string, details?: unknown }TODO, stubs, or placeholder logiclsp_diagnostics after every code change| From | To | When | |------|----|------| | Quick | Deep | Work requires a second file or new data layer | | Deep | Quick | Plan reveals single-file scope |
Carry forward context; tell user why.
Load on demand via read_skill_file("nextjs-backend", "references/<file>"):
api-routes.md — Route handlers (GET/POST/PUT/DELETE), NextRequest/NextResponse, dynamic routes, streaming, CORS, runtime selectionserver-actions.md — 'use server' patterns, useActionState, form validation, revalidation, optimistic updates, securitydatabase.md — PostgreSQL with Prisma/Drizzle, connection pooling, transactions, cursor pagination, full-text search, migrationsauth.md — Auth.js v5 JWT strategy, custom JWT with jose, middleware protection, RBAC, password hashing, refresh tokensmulti-tenant.md — Tenant resolution (subdomain/path/domain), PostgreSQL RLS, Prisma tenant extensions, provisioning flow, Stripe billingvalidation-errors.md — Zod schemas, error response standardization, pagination params, file upload validation, webhook signature verificationtools
Generate Unity raster image assets through Unity MCP: game sprites, item art, backgrounds, UI icons, portraits, concept images, transparent cutouts, image edits, upscales, background removal, and Unity scene or Game View screenshots. Use when a Unity project needs image files imported under Assets or screenshots captured from the editor. Do not use for meshes, audio, animation, materials, gameplay code, UI Toolkit layout, or generic non-Unity image generation.
tools
Create Unity technical solution documents from user requirements, feature ideas, bug goals, specs, or codebase problems. Use when the user asks for a technical approach, architecture, implementation strategy, solution options, feasibility analysis, system design, or "how should we build/fix this" for Unity runtime, Editor, tools, assets, data, UI, WebGL, SDKs, or production pipelines.
tools
Orchestrate Unity Editor via MCP (Model Context Protocol) tools and resources. Use when working with Unity projects through MCP for Unity - creating/modifying GameObjects, editing scripts, managing scenes, running tests, or any Unity Editor automation. Provides best practices, tool schemas, and workflow patterns for effective Unity-MCP integration.
development
Convert a spec document into an implementation TODO list in the same spec folder. U se when the user says goal-todo, todo from spec, generate tasks from spec, turn this spec into todos, create implementation checklist, extract tasks, or asks to read a Docs/Specs design doc and produce what must be implemented. Includes UI/UX review and codebase investigation before writing the checklist. Do not use for implementing the tasks, creating new goal files, writing test cases, or verifying completed work.