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 xonovex/platform --skill sql-postgresql-guidegit clone --depth 1 https://github.com/xonovex/platformWrote 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/xonovex/platform/sql-postgresql-guide)<a href="https://agentmods.dev/skills/xonovex/platform/sql-postgresql-guide"><img src="https://agentmods.dev/badge/skills/xonovex/platform/sql-postgresql-guide/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/xonovex/platform/sql-postgresql-guide"><img src="https://agentmods.dev/badge/skills/xonovex/platform/sql-postgresql-guide.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.00069 | $0.00649 |
| Opus 5 | $0.00034 | $0.00324 |
| Sonnet 5 | $0.00014 | $0.00130 |
| Haiku 4.5 | $0.00007 | $0.00065 |
Grade A, and why
sql-postgresql-guide 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 — 38 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL Coding Guidelines
Requirements
- PostgreSQL ≥ 15.
Essentials
- Query composition - Use CTEs to decompose complex queries, name descriptively, see references/cte-patterns.md
- Schema design - Choose precise types, index for access paths, avoid over-indexing, see references/data-types.md, references/indexing.md
- Data integrity - Enforce with PK/FK/UNIQUE/CHECK/NOT NULL constraints, see references/constraints.md
- Semi-structured data - Use JSONB with GIN indexes, see references/jsonb.md
- Multi-tenancy - Apply RLS and role-based access for data isolation, see references/row-level-security.md, references/role-based-access.md
- Performance - Analyze query plans and tune, see references/performance.md
Gotchas
ANALYZEupdates planner statistics: bulk inserts without re-analyzing produce stale plans and full scansJSONBsupports indexing (GIN);JSONdoesn't: pick JSONB unless you specifically need preserved formatting- Most DDL participates in transactions, but commands such as
CREATE INDEX CONCURRENTLYcannot run inside a transaction block: check every migration operation before wrapping the whole file - Prefer SQL-standard
GENERATED ... AS IDENTITYfor new auto-generated keys because its sequence relationship and override rules are declared on the column;SERIAL/BIGSERIALremain supported PostgreSQL shorthand, not deprecated syntax
Progressive disclosure
- Read references/cte-patterns.md - Load when breaking down complex queries or improving readability
- Read references/data-types.md - Load when choosing column types or avoiding type mismatches
- Read references/indexing.md - Load when optimizing slow queries or query planning
- Read references/constraints.md - Load when enforcing data integrity rules
- Read references/jsonb.md - Load when storing semi-structured or dynamic data
- Read references/row-level-security.md - Load when implementing multi-tenant data isolation
- Read references/role-based-access.md - Load when configuring database user permissions
- Read references/performance.md - Load when analyzing query plans or tuning performance
What ships with it
11 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- eval-queries.json 5.3 KB
- evals.json 3.2 KB
- references/constraints.md 633 B
- references/cte-patterns.md 592 B
- references/data-types.md 848 B
- references/indexing.md 744 B
- references/jsonb.md 705 B
- references/performance.md 388 B
- references/role-based-access.md 763 B
- references/row-level-security.md 930 B
- SOURCES.md 847 B
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 · 38 lines · 69 tokens per session scan A 331364d1e61c
sql-postgresql-guide is a skill published in the GitHub repository xonovex/platform (5 stars, last pushed 3d ago), licensed MIT. It adds 69 tokens to every session and 649 once invoked, about $0.0003 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-08.
Other skills, from other repositories
alembic-migration
Create, review, and apply database schema changes with Alembic. Use whenever a SQLAlchemy model is added or changed, a column/index/constraint needs to change, or a data backfill is required — anything that alters the PostgreSQL schema.
postgresdb
Use when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles, RLS, pooling, vacuum, partitioning, PITR). PG16, ORM-agnostic. NOT portable query logic (that is sql), NOT a managed provider's platform…
neon
Use when you have picked Neon (serverless Postgres) and need to connect correctly from a serverless or edge runtime, wire database branching into dev, preview and CI, or stop being burned by scale-to-zero cold starts and pooler limits — including choosing HTTP versus WebSocket connections and pooled versus direct…
diesel-guard
Lints Diesel and SQLx Postgres migrations for unsafe schema changes that lock tables or cause downtime, and authors custom Rhai checks. Use when reviewing, writing, or fixing SQL migrations, when diesel-guard reports a violation, when configuring diesel-guard.toml, or when the user mentions migration safety, table…
srtd-cli
This skill should be used when the user mentions "srtd", "sql templates", "migrations-templates", "live reload sql", "supabase functions", when working with files in supabase/migrations-templates/, when .buildlog.json or srtd.config.json is detected, or when writing Postgres functions/views/triggers for Supabase.
database
Query and manage SQLite, PostgreSQL, and MySQL databases from the command line. Use when the user asks to run SQL queries, inspect database schemas, create or alter tables, import or export data, manage indexes, analyze query performance with EXPLAIN, back up or restore databases, or perform CRUD operations via…