FastAPI Expert guides Claude through async API work in five steps: analyze requirements, design Pydantic V2 schemas, implement endpoints with dependency injection, add authentication and test with pytest and httpx. A checkpoint after each step confirms schemas, status codes and the /docs page.
Six reference files cover Pydantic V2, async SQLAlchemy, routing, authentication, async testing and a guide for migrating from Django and DRF to FastAPI.
What You Get
- Pydantic V2 request and response schemas with validators
- Routers with typed dependencies and correct HTTP status codes
- Async SQLAlchemy models and CRUD functions
- JWT and OAuth2 password flow with role checks and refresh tokens
- Async tests with pytest and httpx, plus auto-generated OpenAPI docs
Common Use Cases
- Starting a REST API with validated request bodies
- Adding login with JWT and role-based access
- Moving a Django REST Framework project to FastAPI
- Writing async tests and dependency overrides for endpoints
What Makes It Unique
It bans Pydantic V1 syntax (the validator decorator and the inner Config class) and synchronous database calls, and prefers X | None over Optional. A dedicated migration reference maps Django and DRF concepts such as serializers and viewsets to Pydantic models and routers, which few framework skills include.
Under The Hood
The skill is a SKILL.md with six reference files and no scripts, and the references load by topic. The workflow tells the agent to run pytest after each endpoint group and to open the /docs page to check the API surface. The examples create password hashes and signed tokens from a secret key that should come from the environment, and use a database session. The skill itself does not fetch web pages or call outside APIs.