home / skills / ehtbanton / claudeskillsrepo / fastapi-endpoint-generator
This skill generates complete FastAPI router files with async CRUD endpoints and Pydantic models for rapid backend API development.
npx playbooks add skill ehtbanton/claudeskillsrepo --skill fastapi-endpoint-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: fastapi-endpoint-generator
description: Generate FastAPI endpoint files with Pydantic models, dependency injection, and async handlers. Triggers on "create fastapi endpoint", "generate fastapi router", "python API endpoint", "fastapi route".
---
# FastAPI Endpoint Generator
Generate FastAPI router files with Pydantic models, dependency injection, and async handlers.
## Output Requirements
**File Output:** `*.py` router files
**Format:** Valid Python 3.10+ with FastAPI
**Standards:** FastAPI best practices
## When Invoked
Immediately generate a complete FastAPI router with CRUD endpoints and Pydantic models.
## Example Invocations
**Prompt:** "Create FastAPI router for products"
**Output:** Complete `products.py` with async CRUD endpoints.
This skill generates complete FastAPI router files including Pydantic models, dependency injection stubs, and async CRUD handlers. It produces ready-to-use Python 3.10+ code following FastAPI best practices so you can drop the file into a project and iterate quickly.
When invoked with a resource name or prompt like "create fastapi endpoint" it synthesizes a single .py router file containing Pydantic schemas, a dependency-injected service interface, and async route handlers (create, read, update, delete, list). The generated code targets idiomatic FastAPI patterns: APIRouter, dependency injection via Depends, response models, status codes, and type annotations.
What Python/FastAPI version does the output target?
The generated code targets Python 3.10+ and modern FastAPI idioms (APIRouter, async handlers, Pydantic v1/v2-compatible patterns).
Does it include database implementation?
No. It generates dependency-injected service stubs you should implement to connect your ORM or database layer.