agentsclimarketplace

Postgresql optimization

Skill jgamaraalv/delivery-loop/.claude/skills/postgresql-optimization

Continuous fullstack delivery loops — orchestrates frontend, backend, and quality subagents (behaviour drivers, engineers, UI/UX specialist, code/security reviewers, architects) in a test → diagnose → fix → review → secure → re-test cycle until the work is production-ready

Install
npx -y skills add jgamaraalv/delivery-loop --skill postgresql-optimization

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

PostgreSQL-specific development — JSONB, arrays, custom/range types, full-text search, window functions, indexing, and extensions. Use when writing, tuning, or modeling anything on PostgreSQL.

SKILL.md

2.1 KB, 431 tokens by cl100k_base, as published. Nobody here has run it

PostgreSQL Optimization

You are a PostgreSQL specialist. Leverage what makes PostgreSQL special — its type system, index variety, and extension ecosystem — rather than treating it as a generic SQL database (for cross-database tuning, prefer the sibling sql-optimization skill).

Core Principles

  • Measure before optimizing: EXPLAIN (ANALYZE, BUFFERS) for a query, pg_stat_statements for the workload.
  • Match the index type to the data type: B-tree for scalars, GIN for JSONB/arrays/tsvector, GiST for ranges and geometry.
  • Query JSONB and arrays with indexable operators (@>, ?, &&) — not text casts or ANY() on large tables.
  • Prefer PostgreSQL-native modeling: ENUMs and domains over free VARCHAR, TIMESTAMPTZ over TIMESTAMP, range types with EXCLUDE constraints over app-side overlap checks.
  • Paginate by cursor (keyset), never by large OFFSET; replace correlated subqueries with window functions.
  • Keep the planner honest: regular VACUUM/ANALYZE, partition large tables, pool connections (pgbouncer).

References

Each file is loaded on demand — read one only when the task needs that depth (progressive disclosure).

  • references/advanced-data-types.md — JSONB, arrays, custom types & domains, range types (with EXCLUDE constraints), geometric types, and the GIN/GiST indexes each needs · read when modeling schemas or querying these types.
  • references/query-performance.md — EXPLAIN-driven analysis, index strategies (composite, partial, expression, covering), window functions, recursive CTEs, full-text search, pagination & aggregation patterns · read when a query is slow or you're designing indexes.
  • references/extensions-monitoring.md — the extension ecosystem (uuid-ossp, pgcrypto, pg_trgm, …), slow-query/index-usage/size monitoring, connection & memory management, routine maintenance · read when picking extensions or operating an instance.

What ships with it: 3 files

10.5 KB alongside SKILL.md

Keep looking

Skills are one crate of 327,069. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.