Skip to content
Back to skills

Fastapi Patterns

ASecurity

FastAPI and Pydantic v2 patterns for Depends, response models, async, errors, and auth. Load before any edit to a file importing fastapi, however small, and for FastAPI questions.

  • 2 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added October 5, 2026
ai-agentsfastapiapi

Works with

  • api

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add ku5ic/claude-kit --skill fastapi-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fastapi Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fastapi Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ku5ic-fastapi-patterns/badge)](https://www.skillsdirectory.com/skills/ku5ic-fastapi-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fastapi-patterns
description: FastAPI and Pydantic v2 patterns for Depends, response models, async, errors, and auth. Load before any edit to a file importing fastapi, however small, and for FastAPI questions.
---

# FastAPI patterns

Default assumption: FastAPI 0.165 and Pydantic 2.14, per the FastAPI release notes and the Pydantic changelog. FastAPI 0.165 requires Starlette 1.6 or later.

A row applies when the FastAPI, Pydantic, or Starlette version the project pins, in `pyproject.toml`, a requirements file, or the lockfile, is at least the row's version.

## Reference files

Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.

| Before                                                                       | Read                                                     |
| ---------------------------------------------------------------------------- | -------------------------------------------------------- |
| Writing FastAPI code, or raising the FastAPI, Pydantic, or Starlette version | [reference/upgrades.md](reference/upgrades.md)           |
| Writing, changing, or reviewing FastAPI code                                 | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Writing a route, a dependency, a schema, an error handler, or auth           | [reference/practices.md](reference/practices.md)         |
| Configuring ruff or mypy for a FastAPI app                                   | [reference/tooling.md](reference/tooling.md)             |

Files in this skill

  • SKILL.md3.2 KB
  • reference/anti-patterns.md3.3 KB
  • reference/async-correctness.md2.5 KB
  • reference/auth.md4.3 KB
  • reference/dependency-injection.md2.8 KB
  • reference/error-handling.md2.9 KB
  • reference/openapi.md2.4 KB
  • reference/pydantic-schemas.md4 KB
  • reference/response-models.md3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.