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.
npx skills add alivirgo/Major-AI-Skills --skill fastapigit clone --depth 1 https://github.com/alivirgo/Major-AI-SkillsWrote 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.
[](https://agentmods.dev/skills/alivirgo/major-ai-skills/fastapi)<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/fastapi"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/fastapi/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/fastapi"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/fastapi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.00825 |
| Opus 5 | $0.00016 | $0.00413 |
| Sonnet 5 | $0.00006 | $0.00165 |
| Haiku 4.5 | $0.00003 | $0.00082 |
Grade A, and why
fastapi 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FastAPI Python APIs AI Skill Guide
Overview & Engine Architecture
FastAPI builds HTTP APIs with type hints and Pydantic validation, generating OpenAPI automatically. Routes can be sync or async; dependencies inject auth, DB sessions, and settings. Agents keep CPU-bound or blocking ORM calls from stalling the event loop, validate every input model, and document response models explicitly.
uvicorn / gunicorn workers
|
FastAPI app
+----+----+----+
| routers |
| Depends() |
| Pydantic I/O |
| OpenAPI /docs |
+---------------+
When to use this skill
- Creating versioned REST/JSON APIs in Python
- Adding auth dependencies and consistent error handlers
- Generating clients from
/openapi.json - Writing API tests with
TestClientor httpx ASGI transport
Operational directives
- Define request and response models; avoid raw
dictreturns in public APIs. - Use
APIRouterper domain (/users,/billing). - Put shared settings in a cached
Settingsdependency (pydantic-settings). - Prefer async DB drivers for async routes; otherwise run sync work in a threadpool consciously.
- Never commit secrets; load from environment.
App sketch
from fastapi import Depends, FastAPI, HTTPException
from pydantic import BaseModel, Field
app = FastAPI(title="Inventory API", version="1.2.0")
class ItemIn(BaseModel):
sku: str = Field(min_length=1, max_length=64)
qty: int = Field(ge=0)
class ItemOut(ItemIn):
id: int
def get_current_user(auth: str | None = None) -> str:
if not auth:
raise HTTPException(status_code=401, detail="unauthorized")
return "user"
@app.post("/items", response_model=ItemOut)
def create_item(body: ItemIn, user: str = Depends(get_current_user)) -> ItemOut:
return ItemOut(id=1, **body.model_dump())
Commands
uvicorn app.main:app --reload --port 8000
# OpenAPI UI: http://127.0.0.1:8000/docs
pytest -q
Testing sketch
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_create_item_unauthorized():
r = client.post("/items", json={"sku": "A", "qty": 1})
assert r.status_code == 401
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.
- 5d ago First seen · 110 lines · 32 tokens per session scan A be114b08ba39
fastapi is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 825 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-09-05.
Other skills, from other repositories
fastapi-expert
Expert-level FastAPI development for high-performance Python APIs with async support. Use when the user mentions Python, API, async, REST, OpenAPI, or Pydantic, or when the task involves FastAPI Features.
python
Use when building FastAPI applications, implementing async endpoints, setting up Pydantic schemas, working with SQLAlchemy, or writing pytest tests for Python backend services.
fastapi-patterns
FastAPI production patterns — routing, dependency injection, background tasks, streaming, error handling, and async. Use when building or reviewing a FastAPI service.
FastAPI Patterns
Use this skill when building Python APIs with FastAPI and you want consistent boundary validation, async correctness, and maintainable dependency injection patterns.
python-api
Professional Python API Expert skill. Build performant, secure, and scalable backend logic and RESTful or GraphQL APIs.
datamodel-code-generator
Use this skill when the user wants Python data models, Pydantic models, dataclasses, TypedDicts, msgspec structs, or type-safe Python classes generated from OpenAPI, AsyncAPI, JSON Schema, GraphQL, JSON/YAML/CSV sample data, MCP tool schemas, Protocol Buffers, XML Schema, Apache Avro, or existing Python model objects.…