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.00052 | $0.01208 |
| Opus 5.5 | $0.00021 | $0.00483 |
| Sonnet 5.5 | $0.00010 | $0.00242 |
| Haiku 4.5 | $0.00005 | $0.00121 |
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 20d 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 — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FastAPI Python APIs AI Skill Guide (Claude)
Overview & Engine Architecture
FastAPI builds HTTP APIs on Starlette with Pydantic validation and automatic OpenAPI. Dependencies inject auth, DB sessions, and settings. Async routes must not block the event loop with sync ORM/socket calls without run_in_threadpool.
Claude operates as a Principal API Engineer: typed I/O, webhook raw bodies, idempotent event processing, and consistent error envelopes.
uvicorn / gunicorn workers
│
FastAPI app
├── APIRouter (domain modules)
├── Depends() graph
├── Pydantic request/response models
└── /docs OpenAPI
When to use / when not to
Use when
- High-throughput JSON APIs with automatic schema docs.
- Webhook receivers (Stripe, GitHub) with signature verification.
- Internal microservices where Python ecosystem fits.
Do not use when
- Heavy CPU work belongs in a queue worker—not
BackgroundTasksalone. - Team standard is Django ORM/admin—don't force FastAPI for CRUD admin.
Operational Capabilities & Agent Directives
- Request + response models on public routes; avoid bare
dictresponses. APIRouterper domain with shared exception handlers.- Settings via
pydantic-settingscached dependency—never hardcode secrets. - Async discipline: async DB drivers in async routes; sync SQLAlchemy → threadpool or sync def routes.
- Webhooks: Read raw body bytes for HMAC verify; use dedicated route without global JSON middleware consuming body.
- Idempotency: UNIQUE on
event_id; return 200 on duplicate; 500 on handler failure so providers retry. - CORS: Explicit origins—never
*with credentials.
App sketch
from fastapi import Depends, FastAPI, HTTPException, Request
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(authorization: str | None = None) -> str:
if not authorization:
raise HTTPException(status_code=401, detail="unauthorized")
return "user"
@app.post("/items", response_model=ItemOut, status_code=201)
async def create_item(body: ItemIn, user: str = Depends(get_current_user)) -> ItemOut:
return ItemOut(id=1, **body.model_dump())
What ships with it
2 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.
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.
- 20d ago Changed · +38 lines · +24 tokens per session 44b6398120dc
- 1mo ago Changed · -4 tokens per session 296fbebf29b8
- 1mo 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 (2 stars, last pushed today), licensed MIT. It adds 52 tokens to every session and 1,208 once invoked, about $0.0002 per session on Opus 5.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 Customer Support Tech Enablement
Comprehensive FastAPI skill for building modern Python web APIs with focus on customer support systems, ticket management, real-time chat, and backend operations.
FastAPI Modern Web Development
Production-grade FastAPI development with async patterns, Pydantic v2, dependency injection, ML/AI endpoint design, and modern Python best practices for building high-performance REST APIs.
FastAPI Patterns
Use this skill when building Python APIs with FastAPI and you want consistent boundary validation, async correctness, and maintainable dependency injection patterns.