backend_api

Implements REST API endpoints with Zod validation, JWT authentication, and security headers.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill backend-api-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend_api
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/backend_api
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill backend-api-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires zod, helmet, express-rate-limit, jsonwebtoken.

What problem does it solve? Building secure and consistent REST APIs requires juggling endpoint design, input validation, authentication, and security hardening, and missing any of these leads to vulnerabilities or inconsistent behavior. ## Core Features & Use Cases - RESTful Endpoint Design: Standardized URL patterns, HTTP methods, and status code conventions for CRUD resources. - Input Validation with Zod: Schema-based validation of request bodies, query params, and path params with TypeScript type inference. - Security Hardening: Helmet security headers, rate limiting, and JWT-based authentication middleware. - Use Case: When building a Node.js/Express user management API, apply this Skill to structure controllers, services, and data access layers while enforcing validation and auth on every route. ## Quick Start Use the backend_api skill to scaffold a secure REST endpoint for creating users with Zod validation and JWT authentication.

Frequently Asked Questions about backend_api

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

FAQPage Schema
How do I validate API request bodies in Node.js?

Use Zod to define a schema describing the expected shape of the request body, then parse incoming data against it. Zod returns typed, validated data and rejects invalid input with detailed errors, and z.infer generates the matching TypeScript type.

How to structure a REST API with controllers and services?

Keep controllers limited to HTTP request and response handling, place all business logic in a reusable service layer, and abstract database access into a data access layer. This separation prevents SQL or ORM code from leaking into controllers.

What security headers should an Express API use?

Apply Helmet middleware to set standard security headers and express-rate-limit to throttle requests, for example 100 requests per 15-minute window. Combine these with proper CORS configuration and JWT authentication on protected routes.

Which HTTP status codes should a REST API return?

Return 200 for successful GET and PATCH, 201 for created resources, 204 for deletions, 400 for validation errors, 401 for missing authentication, 403 for forbidden access, 404 for missing resources, and 429 for rate limiting.

When should I use api-design instead of backend_api?

Use api-design when planning API contracts or working with GraphQL, and use backend_api during actual implementation of REST endpoints. The backend_api skill focuses on coding-time concerns like validation, middleware, and response formatting.