scaffold-api-endpoint

Generate FastAPI REST controllers with DTOs, RBAC, and entrypoint registration.

9|2|Updated Nov 29, 2024
One-click install
npx skills add https://github.com/bbvch-ai/aihub-core --skill scaffold-api-endpoint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scaffold-api-endpoint
Source: https://github.com/bbvch-ai/aihub-core/tree/main/.claude/skills/scaffold-api-endpoint
Command: npx skills add https://github.com/bbvch-ai/aihub-core --skill scaffold-api-endpoint

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually creating consistent, production-ready REST API controllers with proper authentication, DTOs, pagination, and project-specific conventions is time-consuming and prone to human error, especially for teams building on the Swiss AI Hub core stack.

Core Features & Use Cases

  • Full Controller Generation: Creates a complete REST controller with CRUD endpoints, fluent builder pattern, and role-based permission checks aligned with Swiss AI Hub core architecture rules.
  • Integrated Boilerplate Setup: Automatically generates associated DTOs, service stubs, directory structure, application entrypoint registration, i18n keys, and test stubs to match existing project patterns.
  • Use Case: For example, if you need to add a new "dataset" API endpoint to your Swiss AI Hub deployment, this skill generates all required files and configuration in seconds instead of manually writing hundreds of lines of repetitive boilerplate code.

Quick Start

Use the scaffold-api-endpoint skill to generate a complete REST API controller for the "client" resource, including all associated DTOs, service stubs, and main.py registration.

Frequently Asked Questions about scaffold-api-endpoint

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

FAQPage Schema
How do I generate FastAPI controllers with role-based access control and pagination?

To generate FastAPI controllers with role-based access control and pagination, use a scaffolding tool that creates production-ready REST API endpoints, typed DTOs, and permission-secured CRUD operations automatically.

What's the best way to eliminate manual boilerplate when creating REST API endpoints?

The best way to eliminate manual boilerplate when creating REST API endpoints is to use a code-generation skill that automatically scaffolds controllers, service stubs, DTOs, and i18n keys to match existing project architecture.

Does scaffolding a FastAPI controller automatically register it in the application entrypoint?

Yes, scaffolding a FastAPI controller automatically registers the new endpoints in the application entrypoint, ensuring the generated API routes are instantly integrated without requiring manual configuration updates.

Can I generate CRUD API endpoints with typed DTOs and fluent builder patterns for FastAPI?

Yes, you can generate CRUD API endpoints with typed DTOs and fluent builder patterns for FastAPI. This process aligns the new API endpoints with existing project conventions and internationalization standards.

What files are generated when scaffolding a REST API controller for a new resource?

When scaffolding a REST API controller for a new resource, the generated files include the controller itself, associated typed DTOs, service stubs, test stubs, and the necessary directory structure configurations.

Why does manually creating FastAPI controllers with permission checks slow down backend development?

Manually creating FastAPI controllers with permission checks slows down backend development because writing repetitive boilerplate code for DTOs, pagination, and role-based access control is highly time-consuming and prone to human error.