
Description
fastapi is the official agent skill from the FastAPI project, which sets out best practices and conventions for writing FastAPI code and is kept up to date with new versions and features. The quick reference covers the places where FastAPI code most often goes wrong. For a frontend built into the app, it points to app.frontend() or router.frontend(). For Server-Sent Events it shows using EventSourceResponse with yield, and it covers JSON Lines and byte streaming in the streaming reference. For tracing, metrics and logs it points to FastAPI's native OpenTelemetry support. Dependencies should be declared with Annotated and Depends, and the dependency reference covers yield, scopes and class dependencies. For response models it prefers return types, and it advises a response_model only when the public schema differs from the internal return value. It says not to use the ellipsis or RootModel patterns for Pydantic models. Routers should declare their prefix, tags and shared dependencies on the APIRouter. It suits developers building Python APIs with FastAPI.…
Highlights
- Annotated dependencies and yield scopes
- Server-Sent Events and streaming guidance
- Response models and Pydantic conventions
- Uses the fastapi CLI for development
Ratings & Reviews
No ratings yet
Be the first to rate fastapi.
People also visit

fastify-best-practices
Guides development of Fastify Node.js backend servers and REST APIs
MiniMax-AI/fullstack-dev
Backend architecture with REST API design, auth flows, real-time features

agent-dev-backend-api
Agent skill for dev-backend-api - invoke with $agent-dev-backend-api
fastapi FAQ
What does the fastapi skill do?
It gives an agent FastAPI best practices and conventions, covering dependencies, streaming, response models, Pydantic, routing and tooling.
How do I install it?
Run: npx skills add https://github.com/fastapi/fastapi --skill fastapi
Is it the official skill?
The skill describes itself as the official FastAPI skill, kept up to date with new versions and features.
How does it handle streaming?
It covers Server-Sent Events with EventSourceResponse and yield, plus JSON Lines and byte streaming in its streaming reference.
What security checks has it passed?
skills.sh lists three audits: Gen Agent Trust Hub Pass, Socket Pass and Snyk Pass.
What are the best fastapi alternatives?
Popular alternatives to fastapi include fastapi-patterns, fastify-best-practices and fastapi-python. See all fastapi alternatives
















