api-endpoint-generator

Generates CRUD REST API endpoints with validation schemas, typed responses, and error handling.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/zinohome/RTMessage --skill api-endpoint-generator-zinohome
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api-endpoint-generator
Source: https://github.com/zinohome/RTMessage/tree/main/.github/skills/api-contract-normalizer
Command: npx skills add https://github.com/zinohome/RTMessage --skill api-endpoint-generator-zinohome

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building REST API endpoints from scratch involves repetitive boilerplate: route definitions, request validation, typed DTOs, consistent error responses, and documentation. This Skill generates complete CRUD endpoint implementations so developers avoid rewriting the same patterns for every resource. ## Core Features & Use Cases - CRUD Route Generation: Produces POST, GET, PATCH, and DELETE handlers with authentication and validation middleware wired in. - Validation & Typing: Creates Zod schemas, TypeScript interfaces, and Pydantic models for request bodies, query parameters, and responses. - Multi-Framework Patterns: Provides implementations for Express with TypeScript, NestJS with Swagger decorators, and FastAPI with Pydantic. - Use Case: When adding a new "products" resource to an Express backend, generate the full stack—routes, controller, validation schemas, pagination, and standardized error responses—in one pass. ## Quick Start Generate a complete CRUD REST API for a Product resource with Zod validation, pagination, and consistent error responses in Express and TypeScript.

Frequently Asked Questions about api-endpoint-generator

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

FAQPage Schema
How do I generate CRUD REST API endpoints in Express with TypeScript?▼

Define the resource entity and schema, then generate routes for POST, GET, PATCH, and DELETE with a controller, Zod validation middleware, and typed ApiResponse interfaces. The pattern includes pagination, error handling, and consistent response formats.

How to add request validation to Express routes with Zod?▼

Create Zod schemas for body, query, and params, then apply a validateRequest middleware that parses each part before the controller runs. Validation failures return a 400 response with field-level error details from error.flatten().fieldErrors.

Zod vs Joi for API request validation, which should I use?▼

Zod is preferred in TypeScript projects because it infers static types directly from schemas via z.infer, keeping DTOs and validation in sync. Joi works well in plain JavaScript codebases but lacks native type inference.

Does this pattern work with NestJS and FastAPI?▼

Yes, the Skill includes framework-specific patterns: NestJS controllers with DTO classes and Swagger decorators, and FastAPI routers with Pydantic models and dependency injection. The same response format and status code conventions apply across all three.

What HTTP status codes should CRUD endpoints return?▼

Use 200 for successful reads and updates, 201 for resource creation, 204 for deletes with no body, 400 for validation errors, 401 and 403 for auth failures, 404 for missing resources, and 409 for conflicts.