postgres
Skill by timescale
Guides an AI assistant through PostgreSQL database work, including table design, indexing, search, and migrations. It covers pgvector, PostGIS and TimescaleDB. It is aimed at developers and database engineers who work with Postgres.
Install postgres
Built from the published package, never by AI.
git clone --depth 1 https://github.com/timescale/pg-aiguide /tmp/pg-aiguide && mkdir -p ~/.claude/skills && cp -r /tmp/pg-aiguide/skills/postgres ~/.claude/skills/postgresRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/timescale/pg-aiguide /tmp/pg-aiguide && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/pg-aiguide/skills/postgres ~/.gemini/antigravity-cli/skills/postgresAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill gives an AI assistant guidance for PostgreSQL database work. It covers table design, data types, constraints, indexes, and partitioning, plus extensions such as pgvector, PostGIS and TimescaleDB. The skill is organized as a set of reference files, and the assistant loads the one that matches the task.
The references cover exploring an existing database with pg_catalog, vector and hybrid search using BM25 and RRF, setting up and migrating TimescaleDB hypertables, and planning schema migrations with minimal downtime. Each reference lists trigger conditions, so the assistant can pick the right one for a request. The source is aimed at developers and database engineers working with PostgreSQL. It is published under the Apache-2.0 license.
Written from the project's SKILL.md and checked against it.
What it can do
- Schema explorationRead-only, question-driven exploration of schemas, tables, views, routines, triggers, RLS, and extensions.
- Table designGuidance on data types, constraints, indexes, JSONB patterns, and partitioning.
- PostGIS table designSpatial table design covering geometry vs geography types, SRIDs, and spatial indexing.
- pgvector searchVector similarity search with HNSW or IVFFlat indexes, halfvec storage, and quantization.
- Hybrid text searchCombines BM25 keyword search with pgvector semantic search using RRF.
- Hypertable setupHypertable creation, compression, retention policies, and continuous aggregates.
- Hypertable candidatesSQL queries that analyze existing tables and score them for hypertable conversion.
- Hypertable migrationStep-by-step migration covering partition column selection, in-place vs blue-green, and validation.
- Safe schema migrationsDDL lock reference, timeout strategies, rollback planning, and fork-based testing.
Try asking
- Explore my existing Postgres database and summarize its tables and relationships
- Design a table for orders with proper data types, constraints and indexes
- Set up hybrid search combining BM25 and pgvector embeddings for my docs
Good to know
- The schema-exploration reference is described as read-only.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/postgres/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md4 KB -
references/backfill-strategies.md67 B -
references/complete-example.md64 B -
references/design-postgis-tables.md36 B -
references/design-postgres-tables.md37 B
Show all 14 files
-
references/find-hypertable-candidates.md41 B -
references/migrate-postgres-tables-to-hypertables.md53 B -
references/pgvector-semantic-search.md39 B -
references/postgres-database-migration.md42 B -
references/postgres-hybrid-text-search.md42 B -
references/schema-exploration/guide.md36 B -
references/schema-exploration/references38 B -
references/setup-timescaledb-hypertables.md44 B -
references/validation-queries.md66 B
Alternatives to postgres
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Compare with hugging-face-datasets, db-repair or alloydb-basics
postgres: common questions
Which PostgreSQL extensions does this skill cover?
The description names pgvector, PostGIS, and TimescaleDB. It includes references for each.
Can it help convert a table to a TimescaleDB hypertable?
Yes. It has queries to score tables as hypertable candidates and a step-by-step migration guide with in-place and blue-green options.
What license is the postgres skill published under?
The skill metadata states the Apache-2.0 license.
How do I install postgres?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is postgres free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is postgres safe to use?
It scores 85 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to postgres?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
