fastapi-expert

fastapi-expert is a skill for Claude Code from Aarvion-AI/stackwise-skills. It costs 134 tokens per session (1,874 once invoked), scanned A, original, MIT.

A development skill for building and debugging FastAPI services, Python software for creating web APIs. It covers modern Pydantic data models, asynchronous database access, authentication, settings, and tests.

In plain words
What is it for?
Use it to create API endpoints, define and validate request data, connect to databases, add OAuth2 or JWT login, configure services, and write asynchronous tests.
Why use it?
It helps avoid mixing incompatible library versions or patterns when changing an existing API. It also provides a consistent way to inspect the project before making changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the stackwise plugin — 15 skills shipped together

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.

agentmods
npx agentmods add skills/aarvion-ai/stackwise-skills/fastapi-expert
Any agent
npx skills add Aarvion-AI/stackwise-skills --skill fastapi-expert
Clone the repo
git clone --depth 1 https://github.com/Aarvion-AI/stackwise-skills

Made for: Claude Code.

Or install stackwise, the plugin that ships this one along with the rest of its 15 skills.

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-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/aarvion-ai/stackwise-skills/fastapi-expert.svg)](https://agentmods.dev/skills/aarvion-ai/stackwise-skills/fastapi-expert)
Your own site
<a href="https://agentmods.dev/skills/aarvion-ai/stackwise-skills/fastapi-expert"><img src="https://agentmods.dev/badge/skills/aarvion-ai/stackwise-skills/fastapi-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,874 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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.00134 $0.01874
Opus 5 $0.00067 $0.00937
Sonnet 5 $0.00027 $0.00375
Haiku 4.5 $0.00013 $0.00187

Measured 5d ago against content hash 2458af5604fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

fastapi-expert scanned grade A with 1 finding 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 5d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

6. **Prove it works** - start the app (`uv run uvicorn app.main:app --reload` or `uv run fastapi dev`), hit the changed endpoints with `curl` (including one invalid payload to confirm the 422 shape), and check `/docs` re
skills/fastapi-expert/SKILL.md · 122 lines

How it starts

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

FastAPI Expert

Turns Claude into a senior Python backend engineer who ships FastAPI 0.115+ services with Pydantic v2 idioms, async SQLAlchemy 2.0, and a uv/ruff/mypy toolchain.

When to Use This Skill

  • Scaffold a new FastAPI service or add routers/endpoints to an existing one
  • Design request/response schemas with Pydantic v2 (validators, ConfigDict, serialization)
  • Wire async SQLAlchemy 2.0 sessions, models, and eager-loading into endpoints
  • Add authentication (OAuth2 password flow + JWT) and per-route authorization
  • Migrate Pydantic v1 patterns (.dict(), @validator, class Config) to v2
  • Write async test suites with httpx AsyncClient and dependency overrides
  • Configure settings, lifespan startup/shutdown, and background work

Core Workflow

  1. Analyze - read pyproject.toml (dependency versions, tool config for ruff/mypy/pytest), the app factory / main.py, existing routers, and the session/settings modules. Match the project's layout (routers vs. flat, repository layer vs. inline queries) before writing anything. Confirm Pydantic is v2 and SQLAlchemy is 2.0 async - never mix v1 idioms in.
  2. Implement - write endpoints with Annotated dependencies, Pydantic v2 schemas (separate Create/Update/Read models), and async def only where the body actually awaits. Register new routers on the app. Prefer editing existing modules over new files.
  3. Verify lint/format - run uv run ruff check . && uv run ruff format --check .; fix all reported issues and re-run until clean.
  4. Verify types - run uv run mypy .; fix all reported issues and re-run until clean. Do not silence errors with blanket # type: ignore - fix the types.
  5. Test - write or update pytest tests using httpx AsyncClient with ASGITransport and app.dependency_overrides for DB/auth (see references/testing.md). Run uv run pytest -q; fix every failure and re-run until all tests pass.
  6. Prove it works - start the app (uv run uvicorn app.main:app --reload or uv run fastapi dev), hit the changed endpoints with curl (including one invalid payload to confirm the 422 shape), and check /docs renders the new routes. Fix anything broken and re-verify until the live behavior matches the spec.

Read the full file on GitHub · 122 lines

Files

What ships with it

5 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. 5d ago First seen · 122 lines · 134 tokens per session scan A 2458af5604fe

Subscribe to this mod's changes

fastapi-expert is a skill published in the GitHub repository Aarvion-AI/stackwise-skills (5 stars, last pushed 2d ago), licensed MIT. It adds 134 tokens to every session and 1,874 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

fastapi

FastAPI best practices and conventions. Use when working with FastAPI APIs and Pydantic models for them. Keeps FastAPI code clean and up to date with the latest features and patterns, updated with new versions. Write new code or refactor and update old code.

ReflexioAI/claude-smart · 57 tokens

update-public-docs

Update public API reference docs to match Python source code. Compares client.py, schema files, and config models against MDX docs and fixes any gaps. Triggers on: update docs, sync docs, update public docs, update api reference, refresh documentation.

ReflexioAI/claude-smart · 57 tokens

cloudflare-workers-multi-lang

Multi-language Workers development with Rust, Python, and WebAssembly. Use when building Workers in languages other than JavaScript/TypeScript, or when integrating WASM modules for performance-critical code.

secondsky/claude-skills · 45 tokens

tia-python

Reference for Siemens TIA Scripting Python V1.4.3. Load only when the user explicitly chooses Python TIA Scripting or the TIA roadmap routes to it.

Czarnak/totally-integrated-claude · 39 tokens

python-services

Python patterns for CLI tools, async parallelism, and backend services. Use when building CLI apps, async/parallel Python, FastAPI services, background jobs, or configuring Python project tooling (uv, ruff, ty).

iliaal/whetstone · 48 tokens

functions-development

Build serverless Go or Python functions for Falcon Foundry apps. TRIGGER when user asks to "create a function", "write a serverless function", "build backend logic", runs foundry functions create, or needs help with FDK handler patterns, function testing, or collection integration from functions. Also TRIGGER when…

CrowdStrike/foundry-skills · 195 tokens