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 skills/robhowley/py-pit-skills/fastapi-initnpx skills add robhowley/py-pit-skills --skill fastapi-initgit clone --depth 1 https://github.com/robhowley/py-pit-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/robhowley/py-pit-skills/fastapi-init)<a href="https://agentmods.dev/skills/robhowley/py-pit-skills/fastapi-init"><img src="https://agentmods.dev/badge/skills/robhowley/py-pit-skills/fastapi-init.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 | $0.00109 | $0.03545 |
| Opus 5 | $0.00055 | $0.01773 |
| Sonnet 5 | $0.00022 | $0.00709 |
| Haiku 4.5 | $0.00011 | $0.00354 |
Grade A, and why
fastapi-init 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 4d 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 — 459 lines — stays where its author put it; the contents beside it link to each section on GitHub.
fastapi-init
Scaffold a new FastAPI project end-to-end. This skill coordinates with others in the plugin — invoke them at the right steps rather than reinventing what they already encode.
Prerequisite skills
- uv skill: use for all
uv add,uv run, and environment commands — never fall back to pip - click-cli skill: consult if the user wants an extended CLI beyond the basic server entry point
- fastapi-errors skill: the authority on the full error architecture — domain subclasses, error codes, auth error patterns, and existing-repo strategy
Step 1 — Confirm the service name
Ask: "What's the name of this service?"
Use a single snake_case variable {pkg_name} for everything — the project directory, the Python package, the pyproject.toml name, and the CLI command (e.g. my_service). The uv run {pkg_name} serve command will use it directly. Derive {PkgName} as the PascalCase form of {pkg_name} (e.g. my_service → MyService) — used only for the exception class name.
Step 2 — Initialize with uv
uv init {pkg_name} --app --no-workspace
cd {pkg_name}
Remove the stub file uv generates (hello.py), then add dependencies:
uv add fastapi "uvicorn[standard]" "sqlalchemy[asyncio]" aiosqlite "pydantic-settings" click
uv add --dev pytest pytest-asyncio httpx
After uv init, add the hatchling build backend to pyproject.toml so [project.scripts] works:
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["{pkg_name}"]
Step 3 — Directory structure
Build this layout under the project root:
{pkg_name}/
├── pyproject.toml
├── uv.lock
├── {pkg_name}/ ← Python package, same name as project root
│ ├── __init__.py
│ ├── main.py # FastAPI app + lifespan
│ ├── cli.py # click entry point
│ ├── core/
│ │ ├── __init__.py
│ │ ├── config.py # pydantic-settings Settings
│ │ └── exceptions.py # {PkgName}Error base + usage note
│ ├── api/
│ │ ├── __init__.py
│ │ ├── deps.py # shared Annotated Depends providers
│ │ └── v1/
│ │ ├── __init__.py
│ │ └── routes/
│ │ ├── __init__.py
│ │ └── health.py
│ ├── db/
│ │ ├── __init__.py
│ │ ├── base.py # Base, TimestampMixin, naming convention
│ │ └── session.py # engine, AsyncSessionLocal, get_db
│ ├── models/
│ │ └── __init__.py # SQLAlchemy declarative models
│ └── schemas/
│ ├── __init__.py
│ └── base.py # APIModel + ReadModel base schemas
└── tests/
├── __init__.py
├── conftest.py
└── api/
└── v1/
├── __init__.py
└── test_health.py
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.
- 4d ago First seen · 459 lines · 109 tokens per session scan A 938fab91e8fd
fastapi-init is a skill published in the GitHub repository robhowley/py-pit-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 109 tokens to every session and 3,545 once invoked, about $0.0005 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 skills, from other repositories
database
Relational database authority — PostgreSQL, async ORM (SQLAlchemy 2 / asyncpg), Alembic schema migrations, Supabase Python and JS clients, query optimisation, index strategy, connection pooling, transaction patterns, and bulk operations across Python and Node stacks.
fastapi-endpoint
Plan and build production-ready FastAPI endpoints with async SQLAlchemy, Pydantic v2 models, dependency injection for auth, and pytest tests. Uses interview-driven planning to clarify data models, authentication method, pagination strategy, and caching before writing any code.
python
Use when building FastAPI applications, implementing async endpoints, setting up Pydantic schemas, working with SQLAlchemy, or writing pytest tests for Python backend services.
pytest
Advanced Python unit testing framework for customer support tech enablement, covering FastAPI, SQLAlchemy, PostgreSQL, async operations, mocking, fixtures, parametrization, coverage, and comprehensive testing strategies for backend support systems.
FastAPI Testing Patterns
FastAPI application testing with TestClient, dependency injection overrides, async testing, database testing with SQLAlchemy, and OpenAPI validation.
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.…