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 personamanagmentlayer/pcl --skill fastapi-expertgit clone --depth 1 https://github.com/personamanagmentlayer/pclWrote 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/personamanagmentlayer/pcl/fastapi-expert)<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/fastapi-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/fastapi-expert.svg" alt="Measured on agentmods" 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.00049 | $0.01911 |
| Opus 5 | $0.00024 | $0.00955 |
| Sonnet 5 | $0.00010 | $0.00382 |
| Haiku 4.5 | $0.00005 | $0.00191 |
Grade A, and why
fastapi-expert 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 yesterday.
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 — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FastAPI Expert
Expert guidance for FastAPI - modern, fast Python web framework for building APIs with automatic OpenAPI documentation and type safety.
Core Concepts
FastAPI Features
- Fast performance (Starlette + Pydantic)
- Automatic OpenAPI/Swagger docs
- Type hints and validation
- Async/await support
- Dependency injection
- OAuth2 and JWT
- WebSocket support
Key Components
- Path operations (routes)
- Request/response models (Pydantic)
- Dependency injection
- Middleware
- Background tasks
- Testing with TestClient
Basic FastAPI Application
from fastapi import FastAPI, HTTPException, Depends
from pydantic import BaseModel, EmailStr, Field
from typing import List, Optional
import uvicorn
app = FastAPI(
title="My API",
description="Production-ready FastAPI",
version="1.0.0"
)
# Models
class UserCreate(BaseModel):
email: EmailStr
name: str = Field(..., min_length=2, max_length=100)
age: Optional[int] = Field(None, ge=0, le=150)
class UserResponse(BaseModel):
id: int
email: str
name: str
class Config:
from_attributes = True
# Routes
@app.post("/users", response_model=UserResponse, status_code=201)
async def create_user(user: UserCreate):
# Create user in database
db_user = await db.users.create(**user.dict())
return db_user
@app.get("/users/{user_id}", response_model=UserResponse)
async def get_user(user_id: int):
user = await db.users.get(user_id)
if not user:
raise HTTPException(status_code=404, detail="User not found")
return user
@app.get("/users", response_model=List[UserResponse])
async def list_users(skip: int = 0, limit: int = 100):
return await db.users.find_many(skip=skip, limit=limit)
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000)
Dependency Injection
from fastapi import Depends, HTTPException, status
from fastapi.security import OAuth2PasswordBearer
from sqlalchemy.ext.asyncio import AsyncSession
# Database dependency
async def get_db() -> AsyncSession:
async with async_session() as session:
yield session
# Auth dependency
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
async def get_current_user(
token: str = Depends(oauth2_scheme),
db: AsyncSession = Depends(get_db)
):
credentials_exception = HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Could not validate credentials"
)
payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
user_id: int = payload.get("sub")
if user_id is None:
raise credentials_exception
user = await db.get(User, user_id)
if user is None:
raise credentials_exception
return user
# Use dependencies
@app.get("/me", response_model=UserResponse)
async def read_users_me(current_user: User = Depends(get_current_user)):
return current_user
@app.post("/posts")
async def create_post(
post: PostCreate,
current_user: User = Depends(get_current_user),
db: AsyncSession = Depends(get_db)
):
db_post = Post(**post.dict(), user_id=current_user.id)
db.add(db_post)
await db.commit()
return db_post
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.
- yesterday Changed · +5 lines · +31 tokens per session 5961978f83e6
- 7d ago First seen · 294 lines · 18 tokens per session scan A 58e8d1b8ddd3
fastapi-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (41 stars, last pushed yesterday), licensed Apache-2.0. It adds 49 tokens to every session and 1,911 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-30.
Other skills, from other repositories
fastapi-patterns
FastAPI production patterns — routing, dependency injection, background tasks, streaming, error handling, and async. Use when building or reviewing a FastAPI service.
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
Operational skill for FastAPI: Pydantic models, dependency injection, async routes, OpenAPI, authentication hooks, and TestClient-based testing.
FastAPI Patterns
Use this skill when building Python APIs with FastAPI and you want consistent boundary validation, async correctness, and maintainable dependency injection patterns.
fastapi
Use when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0, OAuth2/JWT, ASGITransport tests, production wiring. NOT language-level Python or packaging (that is python), NOT engine-level SQL (that is…
fastapi
FastAPI best practices + Pydantic. Use when building or reviewing FastAPI APIs.