api-builder

Generate a FastAPI backend scaffold from an OpenAPI specification.

1|1|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/H2OSLabs/SynnovatorZero --skill api-builder-h2oslabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-builder
Source: https://github.com/H2OSLabs/SynnovatorZero/tree/main/.claude/skills/api-builder
Command: npx skills add https://github.com/H2OSLabs/SynnovatorZero --skill api-builder-h2oslabs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, jinja2, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the creation of a full FastAPI backend scaffold from an OpenAPI specification, eliminating repetitive boilerplate and accelerating API delivery.

Core Features & Use Cases

  • Generates SQLAlchemy models, Pydantic schemas, FastAPI routers, CRUD operations, and Alembic migrations.
  • Outputs tests and an optional Next.js TypeScript client for end-to-end full-stack tooling.
  • Use Case: Provide an OpenAPI YAML/JSON file (e.g., petstore.yaml) to produce a ready-to-run backend and client, then customize business logic.

Quick Start

To generate code, run the CLI with your spec file. Example:

  • python3 cli.py --spec your-api.yaml --output ./generated
  • Add --generate-client to create a Next.js API client.
  • Review the generated code in the output directory and implement domain logic.

Frequently Asked Questions about api-builder

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

FAQPage Schema
How do I auto-generate a FastAPI backend from an OpenAPI spec?

To generate a FastAPI backend from an OpenAPI spec, run the CLI with your YAML or JSON file to output SQLAlchemy models, Pydantic schemas, routers, CRUD operations, and Alembic migrations automatically.

Can I generate a Next.js frontend client along with the FastAPI backend?

Yes, you can generate a Next.js frontend client by adding the --generate-client flag to the CLI command, producing a TypeScript App Router client for end-to-end full-stack tooling.

What do I need to scaffold a FastAPI project from an OpenAPI specification?

Scaffolding a FastAPI project from an OpenAPI specification requires Python 3.12+, FastAPI, SQLite or a supported database, SQLAlchemy, Alembic, pytest, and Next.js App Router for the optional frontend client.

What is the best way to eliminate FastAPI boilerplate from an OpenAPI YAML file?

The best way to eliminate FastAPI boilerplate from an OpenAPI YAML file is automated code generation, which scaffolds routers, Pydantic schemas, and database models directly from your defined endpoints.

Does the generated FastAPI scaffold include database migrations and tests?

Yes, the generated FastAPI scaffold includes Alembic database migrations and pytest tests alongside SQLAlchemy models and CRUD operations, providing a ready-to-run backend structure to implement domain logic.

When should I avoid automated FastAPI code generation from OpenAPI?

You should avoid automated FastAPI code generation from OpenAPI when your project requires highly custom non-standard CRUD logic or lacks a defined OpenAPI specification file to drive the scaffolding process.