add-rest-endpoint

Automate REST API endpoint creation with schema design, routing, handlers, tests, and documentation.

Updated May 6, 2026
One-click install
npx skills add https://github.com/htayj/src --skill add-rest-endpoint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-rest-endpoint
Source: https://github.com/htayj/src/tree/main/dotfiles/pi/.pi/agent/packages/general-dev-suite/skills/add-rest-endpoint
Command: npx skills add https://github.com/htayj/src --skill add-rest-endpoint

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of adding and modifying REST API endpoints, reducing manual coding and error risks.

Core Features & Use Cases

  • Schema and Contract Design: Assists in defining API structure via OpenAPI, JSON schema, or other documentation tools.
  • Routing and Handler Implementation: Guides the setup of route tables, decorators, and request handlers with validation and security.
  • Use Case: A developer needs to create a new user login API; this Skill helps define the route, implement validation, and generate test cases efficiently.

Quick Start

Use the add-rest-endpoint skill to set up a new API route for user registration with validation and authorization.

Frequently Asked Questions about add-rest-endpoint

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

FAQPage Schema
How do I create a new REST API endpoint with schema validation and routing?

Creating a REST API endpoint involves designing the schema, configuring routing, and implementing handler code. This automates those steps along with validation and test generation to ensure consistency and efficiency.

Can I use OpenAPI and JSON schema to design API contracts for scalable backend development?

Yes, OpenAPI and JSON schema are supported for designing API contracts. This ensures structured API definitions and supports scalable backend development by maintaining consistency across routing, validation, and documentation.

How do I generate test cases for a newly added REST API route?

Test cases for a REST API route are generated during endpoint creation. The process automates test generation alongside schema design and handler implementation to validate routing and security efficiently.

What's the best way to modify existing REST API endpoints without breaking the schema contract?

The best way to modify REST API endpoints is to update the schema contract and routing while regenerating handler code and tests. This ensures modifications remain consistent with OpenAPI or JSON schema definitions.

Do I need codegen tools and validation libraries to set up a REST API endpoint?

Yes, codegen tools and validation libraries are required to set up a REST API endpoint. They automate schema validation, routing, and handler implementation while ensuring responsible error handling practices.

Why does adding a REST API endpoint require updating route tables and decorators?

Adding a REST API endpoint requires updating route tables and decorators to map HTTP requests to the correct handler code. This setup ensures request handlers execute with proper validation and security.