blomqma/next-rest-framework/create-next-rest-framework-api
Claude Code and agent skill by blomqma/next-rest-framework
- community
Checking that the SKILL.md file is still in the repository.
Set up and implement type-safe Next.js APIs with next-rest-framework. Use when creating or refactoring App Router or Pages Router docs endpoints, REST routes, RPC routes, JSON or form-data handlers, middleware chains, typed outputs with TypedNextResponse, OpenAPI customization, or next-rest-framework CLI generation and validation workflows.
Install
npx vskill@latest install blomqma/next-rest-framework/create-next-rest-framework-apiSKILL.md
Create Next REST Framework API
Implement Next.js APIs with next-rest-framework using schema-driven request validation, typed responses, and OpenAPI generation.
Workflow
- Pick router surface first: App Router (
docsRoute,route,routeOperation,rpcRoute) or Pages Router (docsApiRoute,apiRoute,apiRouteOperation,rpcApiRoute). - Load only the reference file needed for the task:
references/app-router.mdreferences/pages-router.mdreferences/forms-and-typed-responses.mdreferences/openapi-and-cli.md
- Define input and output schemas before handler logic.
- Add middleware only for cross-cutting concerns (auth, tracing, feature flags), and pass derived context through middleware return values.
- Wire docs and CLI (
generateandvalidate) so OpenAPI stays current in CI.
Router Selection
- Use App Router handlers when files live under
src/app/**/route.ts. - Use Pages Router handlers when files live under
src/pages/api/**/*.ts. - Keep RPC routes at:
- App Router:
.../[operationId]/route.ts - Pages Router:
.../[operationId].ts
Guardrails
- Use
zod-form-dataschemas forapplication/x-www-form-urlencodedandmultipart/form-datarequest bodies. - Use plain Zod schemas for JSON request/response bodies.
- For multipart file schemas that cannot be represented correctly from Zod, provide explicit
bodySchemaJSON Schema overrides. - In App Router, return
TypedNextResponsewhen you want compile-time enforcement of declared status/content-type outputs. - In Pages Router multipart handlers, disable Next body parser (
export const config = { api: { bodyParser: false } }). - Use
openApiPathat route level andopenApiOperationat operation level for targeted OpenAPI overrides.
Done Criteria
- Endpoints compile with inferred input/output types.
- Error and success responses match declared
outputs. - Docs endpoint renders and includes intended paths (
allowedPaths/deniedPaths). next-rest-framework generateandnext-rest-framework validatepass for the intended docs config path.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/create-next-rest-framework-api/SKILL.md
Popularity
- Repository stars
- 213
- Repository forks
- 29
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 8 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/blomqma/next-rest-framework/create-next-rest-framework-api)