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/andresquirogadev/skillsense/postgresqlnpx 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.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.1 | $0.00000 | $0.00575 |
| Opus 5 | $0.00000 | $0.00287 |
| Sonnet 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 5d 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.
- 5d 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 5mo 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
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.
postgresql-review
PostgreSQL query review, optimalisering og beste praksis for Nav-applikasjoner.
postgres-patterns
PostgreSQL schema, query, indexing, and performance patterns.
postgres
Execute queries on the Postgres database. Use this skill DIRECTLY whenever the user asks anything about database contents, counts, or data — do NOT read compose.yml or SQL migration files first.
django-safe-migration
Write, review, and rewrite Django migrations for PostgreSQL with zero-downtime guarantees. Use this skill whenever the user mentions migrations, Django schema changes, or deployment safety — even if they don't say "zero downtime" explicitly. Trigger on: "review this migration", "is this migration safe?", "write a…
postgresql-cli
PostgreSQL interactive terminal (psql) reference and usage guide. Use this skill whenever the user mentions psql, PostgreSQL command-line client, backslash commands, meta-commands, \d commands, database inspection, SQL scripting in PostgreSQL, importing/exporting data with psql, \copy, psql formatting, psql variables…