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/latitude-dev/latitude-llm/database-postgresnpx skills add latitude-dev/latitude-llm --skill database-postgresgit clone --depth 1 https://github.com/latitude-dev/latitude-llmWhat 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.00039 | $0.03128 |
| Opus 5 | $0.00019 | $0.01564 |
| Sonnet 5 | $0.00008 | $0.00626 |
| Haiku 4.5 | $0.00004 | $0.00313 |
Grade A, and why
database-postgres 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 2d 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 — 279 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Postgres, SqlClient, schema, migrations, mappers
When to use: Drizzle schema, repositories, RLS, SqlClient wiring, Postgres migrations, psql / reset, or platform mappers (toDomain* / toInsertRow).
Database patterns (Postgres)
- Postgres adapter stack uses Drizzle ORM in
packages/platform/db-postgres - Domain models are independent from table/row shapes
- Mapping from DB rows to domain objects belongs in platform adapters
- Apps use SqlClient for all DB access: Boundaries provide
SqlClientLivewith organization context for RLS enforcement
SqlClient and row-level security (RLS)
All Postgres access flows through SqlClient—a domain-level service that abstracts database operations and enforces organization scoping via RLS.
Architecture:
- Domain Layer (
@domain/shared):SqlClientinterface withtransaction()andquery()methods - Platform Layer (
@platform/db-postgres):SqlClientLiveimplementation with automatic RLS context setting - App Layer (
apps/*): Boundaries provideSqlClientLivewith the request's organization context
Key behaviors:
- Every transaction automatically sets
app.current_organization_idsession variable - RLS policies filter all queries by this organization ID at the database level
- Nested transactions share the same connection (pass-through proxy—no nested transaction overhead)
- Domain errors propagate through Effect error channel; database errors become
RepositoryError - On effect failure,
SqlClientLivestill awaits the Drizzle transaction promise so the connection returns to the pool; if the driver surfaces a different error than the Effect failure (for example rollback/commit), that secondary error is logged via@repo/observabilitywhile the original failure remains the propagated error
Usage in boundaries (apps):
// packages/operations/src/operations/projects.ts
import { SqlClientLive } from "@platform/db-postgres"
import { ProjectRepositoryLive } from "@platform/db-postgres"
app.openapi(createProjectRoute, async (c) => {
const project = await Effect.runPromise(
createProjectUseCase(input).pipe(
Effect.provide(ProjectRepositoryLive),
Effect.provide(SqlClientLive(c.var.postgresClient, c.var.organization.id)),
),
)
return c.json(toProjectResponse(project), 201)
})
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.
- 2d ago First seen · 279 lines · 39 tokens per session scan A 3fc6b32ed2c8
database-postgres is a skill published in the GitHub repository latitude-dev/latitude-llm (4,611 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 3,128 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
trulens-evaluation-setup
Configure feedback functions and selectors for TruLens evaluations.
trulens-instrumentation
Instrument LLM apps with TruLens OTEL-based tracing - from setup to debugging and optimization.
trulens-evaluation-workflow
Systematically evaluate your LLM application with TruLens.
trulens-notebook-execution
Execute and display Jupyter notebooks for TruLens demos and quickstarts.
trulens-dataset-curation
Create and curate evaluation datasets with ground truth for TruLens.
trulens-blocking-guardrails
Configure and use feedback functions as runtime blocking guardrails.