Fastapi

FastAPI is a Python web framework for building HTTP and WebSocket APIs from type-annotated functions, with request validation by Pydantic and automatic OpenAPI docs at /docs. Use this skill to create a FastAPI project, define routes and Pydantic schemas, use Depends dependency injection and Annotated parameters, add auth headers, background tasks, middleware, lifespan startup, WebSockets, tests with TestClient or httpx, and run the app with the fastapi CLI.

213 stars 34 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add TerminalSkills/skills --skill fastapi
Manual install
git clone --depth 1 https://github.com/TerminalSkills/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/fastapi ~/.claude/skills/fastapi

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# FastAPI

## Overview

FastAPI is built on Starlette (ASGI) and Pydantic v2. Path operation functions declare their inputs with type hints (path, query, header, body); FastAPI validates them, returns 422 with details on bad input, serialises the return value through `response_model`, and serves interactive docs at `/docs` (Swagger UI) and `/redoc` plus the schema at `/openapi.json`. The code below was run with fastapi 0.162.0, Starlette 1.10, Pydantic 2.14 and pytest 9.

## Instructions

### 1. Install and layout

```bash
python -m venv .venv && source .venv/bin/activate
pip install "fastapi[standard]"      # adds the fastapi CLI, uvicorn, httpx, email-validator
```

```
shop-api/
├── app/
│   ├── __init__.py
│   ├── main.py          # FastAPI() app, lifespan, include_router
│   ├── deps.py          # shared dependencies
│   └── routers/
│       ├── __init__.py
│       ├── items.py
│       └── ws.py
├── tests/
│   └── test_items.py
└── conftest.py          # anyio_backend fixture
```

### 2. App and lifespan

Use `lifespan` for startup and shutdown work (`@app.on_event` is deprecated).
Read the full skill on GitHub

Details

Skill name
fastapi
Path
skills/fastapi/SKILL.md
License
Apache-2.0
Repo updated
8 November 2026

FAQ

What does the Fastapi skill do?

FastAPI is a Python web framework for building HTTP and WebSocket APIs from type-annotated functions, with request validation by Pydantic and automatic OpenAPI docs at /docs. Use this skill to create a FastAPI project, define routes and Pydantic schemas, use Depends dependency injection and Annotated parameters, add auth headers, background tasks, middleware, lifespan startup, WebSockets, tests with TestClient or httpx, and run the app with the fastapi CLI.

How do I install the Fastapi skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add TerminalSkills/skills --skill fastapi. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Fastapi popular?

It lives in TerminalSkills/skills, which has 213 GitHub stars and 34 forks.

Related skills

3dsmax Rendering

213

TerminalSkills/skills

Scripts and configures production rendering in Autodesk 3ds Max with the V-Ray and Corona renderers: output size and files, render elements, denoising, light mix, batch and command-line rendering, and network rendering. Use when a user asks to set up a production render, render several cameras in one batch, render from the command line or on a render farm, add render passes for compositing, or cut render time for archviz and product shots.

Other34

3dsmax Scripting

213

TerminalSkills/skills

Covers scripting Autodesk 3ds Max, the 3D modeling and rendering application, with MAXScript and Python (pymxs): scene manipulation, object creation, material assignment, camera and light setup, batch operations, and file I/O. Use when tasks involve automating repetitive 3ds Max workflows, batch processing scenes, running scripts headless with 3dsmaxbatch, creating custom tools, or scripting scene setup for archviz, product visualization, or VFX.

Productivity & Notes34

3proxy

213

TerminalSkills/skills

3proxy is a small open-source proxy server that runs HTTP/HTTPS, SOCKS4/5, SNI and TCP/UDP port-mapping proxies from one config file. Use when a user asks to set up an HTTP or SOCKS5 proxy, add proxy users and passwords, write 3proxy access rules, chain or rotate upstream (parent) proxies, limit bandwidth, connections or monthly traffic per user, run 3proxy in Docker, or fix a 3proxy.cfg that will not start.

DevOps & Cloud34

Fastify

213

TerminalSkills/skills

Fastify is a fast Node.js web framework for building JSON APIs, with JSON Schema validation and serialization, an encapsulated plugin system and lifecycle hooks. Use when the user wants to build or test a Fastify 5 REST API, add schema validation, JWT auth, a database plugin, CORS, hooks or error handling, or asks about Fastify project structure and plugin encapsulation.

Software Development34

Fallow

213

TerminalSkills/skills

Fallow is a fast static analyzer for TypeScript and JavaScript repositories that finds unused files, exports and dependencies, circular imports, copy-pasted code and overly complex functions, and gates pull requests on only the problems a change introduces. Use it when asked to "find dead code", "clean up unused dependencies", "check code health before merging", "find complexity hotspots", "audit this PR", or "migrate from knip". Needs no TypeScript compiler and no config to start.

Software Development34

Fig

213

TerminalSkills/skills

Fig was a macOS terminal app that showed IDE-style autocomplete for CLI commands. It shut down on 1 September 2024; its autocomplete moved into Amazon Q Developer CLI, which became the closed-source Kiro CLI in November 2025. The open completion-spec format (Fig.Spec, the withfig/autocomplete repository) still drives Kiro CLI, Microsoft inshellisense and VS Code's terminal suggestions. Use when a user asks "what happened to Fig", "what replaces Fig autocomplete", "write a Fig completion spec for my CLI", "add terminal autocomplete for our internal tool", or "move from Amazon Q CLI to Kiro CLI"

Software Development34

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.