api-scaffold

Generates API endpoints, routes, and handlers following existing project framework patterns.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/medispis/opencode-config --skill api-scaffold-medispis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-scaffold
Source: https://github.com/medispis/opencode-config/tree/main/skills/api-scaffold
Command: npx skills add https://github.com/medispis/opencode-config --skill api-scaffold-medispis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing new API endpoints by hand is repetitive and error-prone: you must match existing routing conventions, middleware chains, auth checks, validation, and response formats. This Skill automates that scaffolding so new endpoints stay consistent with the codebase. ## Core Features & Use Cases - Framework-aware generation: Detects and follows conventions for Express/Fastify, FastAPI/Flask, Gin/Echo, Spring Boot, NestJS, and GraphQL. - Complete endpoint scaffolding: Creates route definitions, handler/controller functions with input validation, error handling, auth checks, and type definitions (DTOs, schemas). - Safe conflict handling: Appends to existing route files, creates alongside conflicts, and asks for confirmation before overwriting. - Use Case: You need CRUD endpoints for a new orders resource in a FastAPI project. The Skill analyzes existing routers and Pydantic models, then generates matching routes, handlers, and schemas under the current /api/v1 version. ## Quick Start Generate REST CRUD endpoints for a new orders resource following the existing patterns in this project.

Frequently Asked Questions about api-scaffold

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

FAQPage Schema
How do I generate REST API endpoints from an OpenAPI spec?

Provide the OpenAPI specification or describe the endpoints, and the Skill analyzes your project's existing routes, controllers, and middleware before generating matching route definitions, handlers with validation, and type definitions.

How to scaffold CRUD operations in Express or FastAPI?

The Skill detects the framework in use, such as Express router files with middleware chains or FastAPI routers with Pydantic models, then generates routes, controllers, and schemas following those exact conventions.

Which frameworks does API scaffolding support?

It supports Express/Fastify, FastAPI/Flask, Gin/Echo, Spring Boot, NestJS, and GraphQL. Each framework gets its idiomatic pattern, such as NestJS modules with guards and pipes or Spring Boot controllers with a service layer.

Will generated routes overwrite my existing route files?

No. New routes are appended to existing files, conflicting endpoints are created alongside rather than overwritten, and any required overwrite shows a diff and asks for confirmation first.

Does it handle versioned APIs like /api/v1?

Yes. If the project uses versioned routes, new endpoints are placed in the current version by default and follow the existing version pattern. A new version is only created when explicitly requested.