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 andresquirogadev/skillsense --skill postgresqlgit clone --depth 1 https://github.com/andresquirogadev/skillsenseWrote 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/andresquirogadev/skillsense/postgresql)<a href="https://agentmods.dev/skills/andresquirogadev/skillsense/postgresql"><img src="https://agentmods.dev/badge/skills/andresquirogadev/skillsense/postgresql/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/andresquirogadev/skillsense/postgresql"><img src="https://agentmods.dev/badge/skills/andresquirogadev/skillsense/postgresql.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.00000 | $0.00575 |
| Opus 5.5 | $0.00000 | $0.00230 |
| Sonnet 5.5 | $0.00000 | $0.00115 |
| Haiku 4.5 | $0.00000 | $0.00057 |
Grade A, and why
postgresql 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 1mo 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 — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL Skill
You are working with a PostgreSQL database. Apply these best practices.
Schema Design
- Always define a primary key — prefer
BIGSERIALorUUIDwithgen_random_uuid()as default. - Use
NOT NULLconstraints by default; allow NULL only when the absence of a value is meaningful. - Use
TEXTinstead ofVARCHAR(n)unless you have a proven reason to constrain length. - Use
TIMESTAMPTZ(timestamp with time zone) — neverTIMESTAMPwithout time zone. - Define foreign keys with
ON DELETE CASCADEorON DELETE SET NULL(never leave it implicit). - Normalize data to at least 3NF; denormalize with JSON/JSONB columns only when truly needed.
Indexes
- Index every foreign key column — Postgres does NOT create these automatically.
- Add
CREATE INDEX CONCURRENTLYto add indexes without blocking production writes. - Use partial indexes for common filtered queries:
CREATE INDEX ON orders (status) WHERE status = 'pending'. - Use
EXPLAIN ANALYZEto verify index usage; look for Seq Scan on large tables as a red flag. - Composite indexes: column order matters — most selective or most frequently filtered column first.
Queries
- Use
$1,$2parameterized queries — never interpolate user input into SQL strings. - Use
RETURNING *on INSERT/UPDATE/DELETE to avoid a second SELECT round-trip. - Use CTEs (
WITH … AS (…)) for readability; useWITH … AS MATERIALIZEDwhen you need to prevent inlining. - Use window functions (
ROW_NUMBER(),RANK(),LAG(),LEAD()) for ranking and running totals. - Use
UPSERT:INSERT … ON CONFLICT (col) DO UPDATE SET ….
Transactions & Locking
- Use
BEGIN/COMMIT/ROLLBACKfor multi-statement atomic operations. - Use
SELECT … FOR UPDATE SKIP LOCKEDfor queue-like workloads to avoid lock contention. - Keep transactions short — long-running transactions block autovacuum and cause bloat.
Performance
- Run
VACUUM ANALYZEregularly; configure autovacuum aggressively for write-heavy tables. - Use
pg_stat_user_tablesandpg_stat_statementsto identify slow queries. - Use connection pooling (PgBouncer, Supabase Pooler) for serverless/edge environments.
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.
- 1mo ago First seen · 46 lines · 0 tokens per session scan A 7caf5bc7f958
postgresql is a skill published in the GitHub repository andresquirogadev/skillsense (2 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 575 tokens. 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
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…
mesh-memory
Self-hosted semantic memory for AI agents via MCP. Save worklogs, decisions, and notes, then recall them across sessions by meaning, not keyword. Postgres + pgvector with auto-tagging.
cmux-backend
Backend TypeScript and Cloud VM development rules for cmux. Use when editing web/app/api, web/services, backend scripts, Cloud VM lifecycle, provider integrations, Postgres, Stack Auth pricing gates, migrations, or provider image build scripts.
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…
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…