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/ocbunknown/fastapi-claude-template/repositorynpx skills add ocbunknown/fastapi-claude-template --skill repositorygit clone --depth 1 https://github.com/ocbunknown/fastapi-claude-templateWrote 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/ocbunknown/fastapi-claude-template/repository)<a href="https://agentmods.dev/skills/ocbunknown/fastapi-claude-template/repository"><img src="https://agentmods.dev/badge/skills/ocbunknown/fastapi-claude-template/repository.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.00073 | $0.02851 |
| Opus 5 | $0.00036 | $0.01425 |
| Sonnet 5 | $0.00015 | $0.00570 |
| Haiku 4.5 | $0.00007 | $0.00285 |
Grade A, and why
repository 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 — 221 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing repositories (src/database/psql/repositories/)
Repositories are thin wrappers around CRUDRepository that add domain semantics (named arguments, loads, ordering, @on_integrity for unique constraints). The CRUD verbs are fixed — do not invent new method names.
Allowed method vocabulary — memorize this list
A repository may expose only these verbs (one per responsibility):
| Method | Purpose | Return |
|---|---|---|
create(**data) |
insert one row | Result[M] |
select(*loads, **filters) |
fetch one row by identifier(s) | Result[M] |
select_many(*loads, **filters, order_by, offset, limit) |
paginated list | Result[tuple[int, Sequence[M]]] |
update(uuid, /, **data) |
update one row by id | Result[M] |
delete(**filters) |
delete one row by id | Result[M] |
exists(**filters) |
existence check | Result[bool] |
count(**filters) |
count matching rows | Result[int] |
upsert(*conflict_cols, **data) |
insert-or-update on conflict | Result[M] |
Do not invent verbs like get, fetch, find_one, find_by_email, list_all, save, remove, get_or_create, paginate, search. If you need "find user by email", that's still select(login=...) with a new named parameter. If the current method doesn't support a filter you need, add a new keyword arg to the existing method — do not add a new method.
The only acceptable additions beyond this vocabulary are domain-specific bulk variants that mirror CRUD (insert_many on CRUDRepository already exists — use it via self._crud.insert_many(...)).
Anatomy of a repository
Every repository inherits BaseRepository[models.X] and accesses CRUD primitives through self._crud:
# src/database/psql/repositories/widget.py
from collections.abc import Sequence
from typing import Optional, Unpack
import uuid_utils.compat as uuid
from sqlalchemy import ColumnExpressionArgument
import src.database.psql.models as models
from src.database.psql.exceptions import InvalidParamsError
from src.database.psql.repositories import Result
from src.database.psql.repositories.base import BaseRepository
from src.database.psql.tools import (
on_integrity,
sqla_offset_query,
sqla_select,
unique_scalars,
)
from src.database.psql.types import OrderBy
from src.database.psql.types.widget import (
CreateWidgetType,
UpdateWidgetType,
WidgetLoads,
)
class WidgetRepository(BaseRepository[models.Widget]):
__slots__ = ()
@on_integrity("name")
async def create(self, **data: Unpack[CreateWidgetType]) -> Result[models.Widget]:
return Result("create", await self._crud.insert(**data))
async def select(
self,
*loads: WidgetLoads,
widget_uuid: Optional[uuid.UUID] = None,
name: Optional[str] = None,
) -> Result[models.Widget]:
if not any([widget_uuid, name]):
raise InvalidParamsError("at least one identifier must be provided")
where_clauses: list[ColumnExpressionArgument[bool]] = []
if widget_uuid:
where_clauses.append(self.model.uuid == widget_uuid)
if name:
where_clauses.append(self.model.name == name)
stmt = sqla_select(model=self.model, loads=loads).where(*where_clauses)
return Result(
"select", unique_scalars(await self._session.execute(stmt)).first()
)
@on_integrity("name")
async def update(
self,
uuid: uuid.UUID,
/,
**data: Unpack[UpdateWidgetType],
) -> Result[models.Widget]:
result = await self._crud.update(self.model.uuid == uuid, **data)
return Result("update", result[0] if result else None)
async def delete(
self, widget_uuid: Optional[uuid.UUID] = None
) -> Result[models.Widget]:
if not widget_uuid:
raise InvalidParamsError("at least one identifier must be provided")
result = await self._crud.delete(self.model.uuid == widget_uuid)
return Result("delete", result[0] if result else None)
async def select_many(
self,
*loads: WidgetLoads,
name: Optional[str] = None,
order_by: OrderBy = "desc",
offset: int = 0,
limit: Optional[int] = None,
) -> Result[tuple[int, Sequence[models.Widget]]]:
where_clauses: list[ColumnExpressionArgument[bool]] = []
if name:
where_clauses.append(self.model.name.ilike(f"%{name}%"))
total = await self._crud.count(*where_clauses)
if total <= 0:
return Result("select", (total, []))
stmt = sqla_offset_query(
self.model,
loads=loads,
offset=offset,
limit=limit,
order=("created_at", order_by),
where=where_clauses,
)
results = unique_scalars(await self._session.execute(stmt)).all()
return Result("select", (total, results))
async def exists(self, name: str) -> Result[bool]:
return Result("exists", await self._crud.exists(self.model.name == name))
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 · 221 lines · 73 tokens per session scan A 669ee4f8683a
repository is a skill published in the GitHub repository ocbunknown/fastapi-claude-template (32 stars, last pushed 4mo ago), licensed MIT. It adds 73 tokens to every session and 2,851 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-30.
Other skills, from other repositories
schema-exploration
Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.
agent-platform-rag-engine-management
Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…
deploy-docker-compose
Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…
moderator-page-migration
Port a moderator page from the main Next.js app (src/pages/moderator/) into apps/moderator. Use when asked to migrate, move or cut over a /moderator/ page to the spoke, or to port its tRPC procedures and Prisma services to SvelteKit loads/actions and Kysely.
dsql
Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…
sql-translate
Translate SQL queries between database dialects (Snowflake, BigQuery, PostgreSQL, MySQL, etc.).