fastapi-docs

fastapi-docs is a skill for Claude Code, Codex from pledgeandgrow/pledge-skills. It costs 36 tokens per session (2,266 once invoked), scanned A, original, MIT.

A reference guide for FastAPI 0.115+, a Python framework for building web APIs with typed inputs and outputs. It covers request parameters, validation, authentication, middleware, WebSockets, testing, and background tasks.

In plain words
What is it for?
Use it to build Python APIs, define request and response models, add OAuth2 or JWT login, configure dependencies, handle uploads, create WebSocket endpoints, or write tests.
Why use it?
It provides current guidance for defining endpoints and validating data. This helps the coding agent avoid errors in API structure, security, and asynchronous behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build Python APIs, define request and response models, add OAuth2 or JWT login, configure dependencies, handle uploads, create WebSocket endpoints, or write tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pledgeandgrow/pledge-skills/fastapi
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pledgeandgrow/pledge-skills --skill fastapi
Clone the repo
git clone --depth 1 https://github.com/pledgeandgrow/pledge-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fastapi-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/fastapi.svg)](https://agentmods.dev/skills/pledgeandgrow/pledge-skills/fastapi)
Your own site
<a href="https://agentmods.dev/skills/pledgeandgrow/pledge-skills/fastapi"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/fastapi.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,266 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.02266
Opus 5 $0.00018 $0.01133
Sonnet 5 $0.00007 $0.00453
Haiku 4.5 $0.00004 $0.00227

Measured 7d ago against content hash 48f82a08e81d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

fastapi-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/fastapi/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FastAPI Skill

Quick Reference

Topic File
Getting Started (Python types, async/await, environment variables, virtual environments, first steps, path parameters, query parameters, request body) getting-started.md
Tutorial Core (Query/path string & numeric validations, query/body parameter models, body fields, nested models, request examples, extra data types, cookie/header parameters, response model, extra models, response status code, form data, form models, request files, forms and files, handling errors, path operation configuration, JSON encoder, body updates) tutorial-core.md
Tutorial: Dependencies & Security (Dependencies, classes as dependencies, sub-dependencies, decorator dependencies, global dependencies, yield dependencies, security first steps, get current user, OAuth2 with JWT, middleware, CORS, SQL databases, bigger applications with APIRouter, stream JSON lines, server-sent events, background tasks, metadata and docs URLs, frontend, static files, testing, debugging) tutorial-deps-security.md
Advanced User Guide (Stream data, path operation advanced config, additional status codes, return response directly, custom responses: HTML/Stream/File, additional OpenAPI responses, response cookies, response headers, response change status code, advanced dependencies, OAuth2 scopes, HTTP Basic Auth, using request directly, dataclasses, advanced middleware, sub-applications/mounts, behind a proxy, templates, WebSockets, lifespan events, testing WebSockets, testing events, testing dependency overrides, async tests, settings & env vars, OpenAPI callbacks, OpenAPI webhooks, WSGI inclusion, generating SDKs, advanced Python types, JSON with bytes as Base64, strict content-type checking, FastAPI CLI, editor support) advanced.md
Deployment (FastAPI versions, FastAPI Cloud, HTTPS, run server manually, deployment concepts, cloud providers, server workers with Uvicorn, Docker containers) deployment.md
How To — Recipes (General recipes, Pydantic v1→v2 migration, GraphQL, custom request/APIRoute class, conditional OpenAPI, extending OpenAPI, separate input/output schemas, custom docs UI assets, configure Swagger UI, testing a database, old 403 auth error codes) how-to.md
API Reference (FastAPI class, request parameters: Path/Query/Header/Cookie/Body/Form/File, status codes, UploadFile, exceptions: HTTPException/WebSocketException, Depends/Security, APIRouter, BackgroundTasks, Request class, WebSockets, HTTPConnection, Response class, custom response classes, middleware, OpenAPI docs & models, security tools, jsonable_encoder, StaticFiles, Jinja2Templates, TestClient) reference.md
About & Resources (Features: FastAPI/Starlette/Pydantic features; Alternatives & inspiration: Django, Flask, NestJS, Marshmallow, APIStar; History, design & future; Benchmarks: Uvicorn/Starlette/FastAPI hierarchy; Repository management: owner & team; Release notes: all versions 0.1.19–0.139.2+; Help: newsletter, social, GitHub discussions, Discord; Contributing guidelines; Translations: LLM-assisted with native review; Full Stack Template: FastAPI+SQLModel+React+PostgreSQL+Docker; External links: top GitHub repos; FastAPI People: creator, team, experts, contributors, sponsors; Newsletter) about-resources.md

Read the full file on GitHub · 120 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 120 lines · 36 tokens per session scan A 48f82a08e81d

Subscribe to this mod's changes

fastapi-docs is a skill published in the GitHub repository pledgeandgrow/pledge-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 36 tokens to every session and 2,266 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.