backend-endpoint

Generate REST and GraphQL API endpoints with validation, error handling, and tests.

232|12|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/qf-studio/navigator --skill backend-endpoint-qf-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-endpoint
Source: https://github.com/qf-studio/navigator/tree/main/skills/backend-endpoint
Command: npx skills add https://github.com/qf-studio/navigator --skill backend-endpoint-qf-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Writing a new API endpoint by hand means repeating the same boilerplate every time: route handler, request validation, error handling, and tests. This Skill generates all of these pieces consistently across Express, Fastify, NestJS, Next.js App Router, and GraphQL projects, following REST conventions and your project's existing patterns. ## Core Features & Use Cases - Endpoint Generation: Creates route handlers from templates for Express and Next.js (collection and dynamic-segment variants), with auth and validation middleware wired in. - Validation Schemas: Generates Zod validation schemas from field specifications like "name:string:required,email:email:required". - REST Path Validation: Checks route paths against RESTful conventions (plural resources, no trailing slashes, method-to-path intent matching) and suggests fixes. - Test Scaffolding: Produces integration tests covering success, validation errors, 404, 401, and server error cases. - Use Case: Ask to "add a POST /api/users endpoint with email validation" and receive a route file, Zod schema, error handler, and supertest test file ready to wire into your app. ## Quick Start Ask the assistant to create a new API endpoint, for example: add a GET /api/users/:id endpoint with authentication and validation.

Frequently Asked Questions about backend-endpoint

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a REST API endpoint with validation in Express?

Provide the endpoint path, HTTP method, and resource name, and the skill generates an Express route handler with auth and validation middleware, a Zod schema, and a supertest test file. The route validator checks the path against REST conventions before generation.

How do I add a Next.js App Router route handler?

The skill ships two Next.js templates: a collection template for paths like /api/users and a dynamic template for paths with [id]. Both follow Next.js 15+ conventions, including awaiting the params Promise and returning NextResponse.json with explicit status codes.

Which validation libraries are supported for request schemas?

Zod is fully supported via the validation_generator.py script, which builds schemas from field specs like name:string:required. Joi, Yup, and express-validator are listed as options in the workflow, but only Zod generation is currently implemented in the script.

Does the endpoint generator work with GraphQL?

GraphQL is listed as a supported framework option in the requirements gathering step, but no GraphQL template file ships with the skill. GraphQL resolvers are produced inline by the model rather than from a template or generator script.

Why does my generated route return 404?

Common causes are route registration order (specific routes must come before generic ones), case-sensitive path mismatches, middleware blocking the request, or an HTTP method mismatch. Verify the router is registered with the correct prefix in your app entry file.

When should I use Server Actions instead of Route Handlers in Next.js?

Prefer Server Actions for mutations triggered from your own UI, such as forms and buttons. Use Route Handlers for webhooks, third-party callers, and public REST endpoints, which is what this skill's Next.js templates target.