Tooluck logoTooluck
SKILL.md

fastapi-expert

Agent skill fromJeffallan/claude-skills

Use when building high-performance async Python APIs with FastAPI and Pydantic V2. Invoke to create REST endpoints, define Pydantic models, implement authentication flows, set up async SQLAlchemy database operations, add JWT authentication, build WebSocket endpoints, or generate OpenAPI documentation. Trigger terms: FastAPI, Pydantic, async Python, Python API, REST API Python, SQLAlchemy async, JWT authentication, OpenAPI, Swagger Python.

How to install fastapi-expert

install fastapi-expert
# install the claude-skills pack with the skills CLI
npx skills add Jeffallan/claude-skills

# or add only this skill to Claude Code: copy the folder

skills/fastapi-expert/

# into

~/.claude/skills/fastapi-expert/ (all projects)

.claude/skills/fastapi-expert/ (one project)

skills/fastapi-expert/SKILL.md

MITFull file
1# FastAPI Expert
2
3Deep expertise in async Python, Pydantic V2, and production-grade API development with FastAPI.
4
5## When to Use This Skill
6
7- Building REST APIs with FastAPI
8- Implementing Pydantic V2 validation schemas
9- Setting up async database operations
10- Implementing JWT authentication/authorization
11- Creating WebSocket endpoints
12- Optimizing API performance
13
14## Core Workflow
15
161. **Analyze requirements** — Identify endpoints, data models, auth needs
172. **Design schemas** — Create Pydantic V2 models for validation
183. **Implement** — Write async endpoints with proper dependency injection
194. **Secure** — Add authentication, authorization, rate limiting
205. **Test** — Write async tests with pytest and httpx; run `pytest` after each endpoint group and verify OpenAPI docs at `/docs`
21
22> **Checkpoint after each step:** confirm schemas validate correctly, endpoints return expected HTTP status codes, and `/docs` reflects the intended API surface before proceeding.
23
24## Minimal Complete Example
25
26Schema + endpoint + dependency injection in one cohesive unit:
27
28```python
29# schemas.py
30from pydantic import BaseModel, EmailStr, field_validator, model_config
31
32class UserCreate(BaseModel):
33 model_config = model_config(str_strip_whitespace=True)
34
35 email: EmailStr
36 password: str
37 name: str | None = None
38
39 @field_validator("password")
40 @classmethod
41 def password_strength(cls, v: str) -> str:
42 if len(v) < 8:
43…

Excerpt shown under the repository's MIT license.

More skills in claude-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates