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 hmj1026/dhpk --skill dhpk-fastapi-progit clone --depth 1 https://github.com/hmj1026/dhpkWrote 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/hmj1026/dhpk/dhpk-fastapi-pro)<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-fastapi-pro"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-fastapi-pro/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/hmj1026/dhpk/dhpk-fastapi-pro"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-fastapi-pro.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.00075 | $0.01079 |
| Opus 5 | $0.00037 | $0.00540 |
| Sonnet 5 | $0.00015 | $0.00216 |
| Haiku 4.5 | $0.00007 | $0.00108 |
Grade A, and why
dhpk-fastapi-pro 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 7d 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 — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FastAPI + SQLAlchemy (async) Pro
Web-API layer guidance. Builds on the python module (typing, async discipline,
ruff/pyright). Layering: Router → Service → Repository; routers stay thin
(validate, delegate, shape response), business logic lives in services,
data-access in repositories.
Routers & dependency injection
- Inject collaborators via
Depends(...)— DB session, current user, settings. Don't instantiate sessions/clients inside the handler. - Declare an explicit
response_model=andstatus_code=on every route. Never return raw ORM objects — return a Pydantic response schema (prevents lazy-load serialization surprises and leaking columns). - Keep one session per request, yielded by a dependency; commit/rollback at the edge of the unit of work, not scattered through services.
- Version/prefix routers (
APIRouter(prefix=...)); group by domain. Paginate list endpoints with a consistent envelope (ccas standardized/pipeline/runspagination) and bound max page size.
Pydantic schemas
- Separate request (
...Create/...Update) and response (...Out) models from ORM models. Usemodel_config = ConfigDict(from_attributes=True)for ORM→schema conversion. - Validate at the boundary: constrained types, field validators. Reject bad input with 422 rather than letting it reach the DB.
- Don't put secrets/internal fields in response schemas.
SQLAlchemy 2.0 async
async with AsyncSession(...) as session:— every query isawait session.execute(select(...)); use.scalars()/.scalar_one_or_none().- One transaction per unit of work. Wrap multi-statement writes in
async with session.begin():. Don't hold a session across anawaitto an external service it doesn't need. - Avoid N+1: eager-load with
selectinload/joinedloadfor relationships you render. ccas batch-aggregates monthly budget totals to kill a 1+N frontend load. - Set
busy_timeout/ pool sensibly (SQLite WAL in ccas uses a 30s busy timeout for write atomicity). Always parameterize — never f-string SQL. - Repositories return domain objects or
None; they don't leakSessionupward.
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.
- 7d ago First seen · 90 lines · 75 tokens per session scan A 6fcf0365bd40
dhpk-fastapi-pro is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed yesterday), licensed MIT. It adds 75 tokens to every session and 1,079 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-05.
Other skills, from other repositories
fastapi
FastAPI best practices and conventions. Use when working with FastAPI APIs and Pydantic models for them. Keeps FastAPI code clean and up to date with the latest features and patterns, updated with new versions. Write new code or refactor and update old code.
cloudflare-workers-multi-lang
Multi-language Workers development with Rust, Python, and WebAssembly. Use when building Workers in languages other than JavaScript/TypeScript, or when integrating WASM modules for performance-critical code.
python-services
Python patterns for CLI tools, async parallelism, and backend services. Use when building CLI apps, async/parallel Python, FastAPI services, background jobs, or configuring Python project tooling (uv, ruff, ty).
functions-development
Build serverless Go or Python functions for Falcon Foundry apps. TRIGGER when user asks to "create a function", "write a serverless function", "build backend logic", runs foundry functions create, or needs help with FDK handler patterns, function testing, or collection integration from functions. Also TRIGGER when…
litestar-granian
Auto-activate for litestargranian, GranianPlugin, litestar run Granian options, runtime threads, HTTP/2, TLS, access logs, metrics, static mounts, or worker lifecycle. Not for non-Granian servers.
litestar-autowire
Auto-activate for litestarautowire, AutowirePlugin, AutowireConfig, domainpackages, AutowireIntegration, AutowireLoader, or clearautowirecache. Not for manual Router composition — use explicit routes.