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 khalilbenaz/claude-skills-collection --skill fastapi-guidegit clone --depth 1 https://github.com/khalilbenaz/claude-skills-collectionWrote 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/khalilbenaz/claude-skills-collection/fastapi-guide)<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/fastapi-guide"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/fastapi-guide/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/khalilbenaz/claude-skills-collection/fastapi-guide"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/fastapi-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Privilege Escalation · line 51 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
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.00072 | $0.02264 |
| Opus 5 | $0.00036 | $0.01132 |
| Sonnet 5 | $0.00014 | $0.00453 |
| Haiku 4.5 | $0.00007 | $0.00226 |
Grade A, and why
fastapi-guide 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 6d 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 — 274 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Guide FastAPI
Workflow
1. Bootstrapper le projet
pip install "fastapi[standard]" sqlalchemy[asyncio] alembic pydantic-settings httpx pytest pytest-asyncio
Structure recommandée :
app/
main.py # lifespan, include_router, middleware
config.py # Settings via pydantic-settings
dependencies.py # Depends() partagés (db, auth, pagination)
routers/
users.py
items.py
schemas/
user.py # UserCreate, UserUpdate, UserResponse
models/
user.py # SQLAlchemy ORM
services/
user_service.py
repositories/
user_repo.py
tests/
conftest.py # fixtures DB, client async
test_users.py
2. Config typée avec pydantic-settings
# app/config.py
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
database_url: str
secret_key: str
debug: bool = False
cors_origins: list[str] = []
model_config = {"env_file": ".env"}
settings = Settings()
3. Schémas Pydantic v2 — séparer Create / Update / Response
# app/schemas/user.py
from pydantic import BaseModel, EmailStr, Field
from datetime import datetime
class UserCreate(BaseModel):
email: EmailStr
password: str = Field(min_length=8)
username: str = Field(max_length=50)
class UserUpdate(BaseModel):
username: str | None = Field(None, max_length=50)
class UserResponse(BaseModel):
id: int
email: EmailStr
username: str
created_at: datetime
model_config = {"from_attributes": True}
Règle : jamais réutiliser UserCreate comme response_model — le schéma de réponse ne doit pas contenir le mot de passe.
4. Lifespan + application factory
# app/main.py
from contextlib import asynccontextmanager
from fastapi import FastAPI
from app.routers import users, items
@asynccontextmanager
async def lifespan(app: FastAPI):
# startup
yield
# shutdown
def create_app() -> FastAPI:
app = FastAPI(
title="Mon API",
lifespan=lifespan,
docs_url="/docs" if settings.debug else None,
)
app.include_router(users.router, prefix="/users", tags=["users"])
app.include_router(items.router, prefix="/items", tags=["items"])
return app
app = create_app()
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.
- 6d ago First seen · 274 lines · 72 tokens per session scan A ca7e8327f2ef
fastapi-guide is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 15d ago), licensed MIT. It adds 72 tokens to every session and 2,264 once invoked, about $0.0004 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-03.
Other skills, from other repositories
plugin-system
Generic plugin system for Python applications. Auto-discovery, validation, fault tolerance. Zero dependencies (Python stdlib only).
fastapi
Apply when building FastAPI endpoints, Pydantic models, or async APIs. Covers routing, dependency injection, error handling, testing, and OpenAPI hygiene.
frappe-impl-controllers
Use when building Document Controllers in a custom Frappe app: file creation, lifecycle hooks, validation, autoname, submittable workflows, controller override, child table controllers, flags system, migration from hooks.py and Server Scripts. Keywords: how to implement controller, which hook to use, validate vs…
frappe-syntax-controllers
Use when writing Python Document Controllers for ERPNext/Frappe DocTypes. Covers lifecycle hooks (validate, onupdate, onsubmit), controller override, submittable documents, autoname patterns, UUID naming (v16), and the flags system. Keywords: document controller, lifecycle hook, validate, onupdate, onsubmit, autoname…
frappe-syntax-serverscripts
Use when writing Python code for ERPNext/Frappe Server Scripts including Document Events, API endpoints, Scheduler Events, and Permission Queries. Prevents the #1 AI mistake: using import statements in Server Scripts (sandbox blocks ALL imports). Covers frappe. methods, event name mapping, and correct v14/v15/v16…
fastapi-templates
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.