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 agentmods add commands/mfmezger/ai_agent_dotfiles/fastapigit clone --depth 1 https://github.com/mfmezger/ai_agent_dotfilesWhat 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 | $0.00084 | $0.01207 |
| Opus 5 | $0.00042 | $0.00603 |
| Sonnet 5 | $0.00017 | $0.00241 |
| Haiku 4.5 | $0.00008 | $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 3d 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 — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FastAPI Conventions
Assume the general Python tooling conventions from the python-stack skill. This skill only covers FastAPI-specific patterns.
App Layout
Prefer a small, explicit structure:
src/<package>/
main.py
routers/
__init__.py
items.py
dependencies.py
schemas.py
models.py
settings.py
- Keep the ASGI app in
main.py - Group path operations into routers by bounded area
- Put shared dependency helpers in
dependencies.py - Keep request/response schemas separate from persistence models when that improves clarity
Running the App
Prefer the FastAPI CLI over invoking Uvicorn directly.
uv run fastapi dev src/<package>/main.py
uv run fastapi run src/<package>/main.py
If the project has a stable app entrypoint, prefer configuring it in pyproject.toml:
[tool.fastapi]
entrypoint = "src.<package>.main:app"
Path Operations
Use one HTTP operation per function. Do not collapse multiple methods into a single handler.
Use Annotated for request parameters and dependencies:
from typing import Annotated
from fastapi import APIRouter, Depends, Path, Query
router = APIRouter(prefix="/items", tags=["items"])
ItemId = Annotated[int, Path(ge=1)]
SearchQuery = Annotated[str | None, Query(max_length=100)]
@router.get("/{item_id}")
async def get_item(item_id: ItemId, q: SearchQuery = None) -> dict[str, str | int | None]:
return {"item_id": item_id, "q": q}
- Prefer reusable type aliases for common dependencies and parameter declarations
- Do not use
...as a required marker in FastAPI parameters or Pydantic fields - Do not use
@app.api_route(..., methods=[...])unless there is a strong reason
Request and Response Models
Declare response types deliberately.
- Prefer a concrete return type when the returned value already matches the public schema
- Use
response_model=when the runtime return value differs from the public schema - Treat response models as a data-exposure boundary; never return raw internal models that contain secrets or extra fields
- Prefer regular Pydantic models or standard typed containers over
RootModel
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.
- 3d ago First seen · 167 lines · 84 tokens per session scan A 086b52c06233
fastapi is a command published in the GitHub repository mfmezger/ai_agent_dotfiles (5 stars, last pushed 1mo ago), licensed MIT. It adds 84 tokens to every session and 1,207 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-08-31.
Other commands, from other repositories
implement-python
Senior Python engineer implementation command. Launches a background agent with full Python development capabilities and access to the mastering-python-skill reference materials.
update-python-version
Update the minimum Python version requirement across the entire codebase.
execute-pydantic-ai-prp
Implement a Pydantic AI agent using the PRP file.
run
Command "run" from ErisPulse/ErisPulse, covering erispulse.cli.commands.run 模块, 模块概述, 类列表, class reloadhandler(filesystemeventhandler) and class runcommand(command).
prepare-dataset
Analyse a raw data file (CSV, JSON, JSONL, TSV, Parquet) and generate a complete Python script scripts/dataset/ .py that inherits from BaseDatasetPreparer and transforms the file into a JSONL dataset ready for fine-tuning with Unsloth.
refactor-py-sdk
Command to refactor Python SDK.