
Postgres
Guides an agent through PostgreSQL schema design, indexing, search, TimescaleDB
Postgres is an open-source agent skill for databases. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 1.9K
- Last commit
- License
- Apache-2.0
- Listing updated
Similar skills
About Postgres
This skill acts as an entry point to a set of PostgreSQL reference guides. It routes the agent to the right guide depending on whether the task is exploring an existing database, designing tables, setting up vector or full-text search, using PostGIS for spatial data, working with TimescaleDB hypertables, or planning schema changes on production systems.
The skill works by pointing the agent at specific reference files, each covering a narrower area such as data types and constraints, pgvector HNSW or IVFFlat indexing, hybrid BM25 and vector search with reciprocal rank fusion, hypertable compression and retention, or DDL lock behavior and safe migration patterns. Several guides contain SQL patterns the agent can adapt. The skill itself ships no scripts.
The agent needs access to a PostgreSQL environment, and some workflows assume particular extensions such as pgvector, PostGIS or TimescaleDB are available. The skill is licensed under Apache-2.0 and is distributed through the aiguide Claude Code plugin marketplace.
When your agent uses it
Use this skill for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations. **Trigger when user asks to:** - Explore an existing PostgreSQL database to understand its objects and relationships - Design or modify PostgreSQL tables, schemas, or data models - Choose data types, constraints, indexes, or partitioning strategies - Work with pgvector embeddings, semantic search, or RAG - Set up full-text search, hybrid search, or BM25 ranking - Use PostGIS for spatial/geographic data - Set up TimescaleDB hypertables for time-series data - Migrate tables to hypertables or evaluate migration candidates - Plan or execute safe schema migrations with zero downtime **Keywords:** PostgreSQL, Postgres, SQL, schema, table design, indexes, constraints, pgvector, PostGIS, TimescaleDB, hypertable, semantic search, hybrid search, BM25, time-series, migration
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 14 files (4 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the pg plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add timescale/pg-aiguide
/plugin install pg@aiguideOr copy only this skill to ~/.claude/skills/postgres:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/timescale/pg-aiguide.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/postgres &&
cp -R "$tmp/skills/postgres" ~/.claude/skills/postgres &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/postgres inside it instead.
Copy the skill folder to ~/.agents/skills/postgres to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/timescale/pg-aiguide.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/postgres &&
cp -R "$tmp/skills/postgres" ~/.agents/skills/postgres &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/postgres inside it instead.
Copy the skill folder to ~/.cursor/skills/postgres to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/timescale/pg-aiguide.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/postgres &&
cp -R "$tmp/skills/postgres" ~/.cursor/skills/postgres &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/postgres inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/timescale/pg-aiguide.git --path skills/postgresOr copy the folder to ~/.gemini/skills/postgres yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/postgres:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/timescale/pg-aiguide.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/postgres &&
cp -R "$tmp/skills/postgres" ~/.copilot/skills/postgres &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/postgres inside it instead.
Get the folder:
git clone --depth 1 https://github.com/timescale/pg-aiguide.gitThen copy pg-aiguide/skills/postgres into your agent's skills folder as postgres. Agents that support SKILL.md read one folder per skill.
What it does
- Existing database exploration
- Read-only, question-driven inspection of schemas, tables, views, triggers, RLS and extensions via pg_catalog.
- Table and index design
- Guidance on data types, constraints, indexes, JSONB patterns and partitioning strategies.
- Vector and hybrid search
- Covers pgvector HNSW and IVFFlat indexes, quantization, and combining BM25 with semantic search.
- Spatial data modeling
- Covers geometry versus geography types, SRIDs, spatial indexing and location queries with PostGIS.
- TimescaleDB hypertables
- Covers hypertable setup, compression, retention policies, continuous aggregates and candidate analysis.
- Zero-downtime migrations
- Covers DDL lock behavior, timeout strategies, rollback planning and fork-based testing.
Good for
- Design a normalized schema for a new orders database
- Add an HNSW index for semantic search over embeddings
- Convert a time-series table into a TimescaleDB hypertable
- Plan a column change on a production table without downtime
- Explore an unfamiliar database to map its tables and relationships
Postgres FAQ
What triggers Postgres?
It is meant for any PostgreSQL database work, including table design, indexing, data types, constraints, extensions such as pgvector, PostGIS and TimescaleDB, search, and migrations.
Does Postgres run scripts or change my database?
The skill contains no scripts. Its guides describe read-only exploration and SQL patterns the agent can apply.
Which extensions are covered?
The guides cover pgvector, PostGIS and TimescaleDB, along with BM25-style keyword ranking for full-text search.
How do I install Postgres in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/postgres to use it in all your projects, or to .claude/skills/postgres in one project. Or install the pg plugin, which includes it: /plugin marketplace add timescale/pg-aiguide, then /plugin install pg@aiguide.
Does Postgres run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Postgres?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Postgres?
The closest alternatives to Postgres are Design postgres tables, PostgreSQL optimization, Design postgis tables, Postgres database migration and Database migrations.
Where this comes from
- Description: from the skill's own SKILL.md.
More from timescale/pg-aiguide

Guides an agent in designing PostGIS spatial tables, types, SRIDs and indexes
- Open source
- 1.9K GitHub stars
- Databases

Guides an agent through PostgreSQL table design, types, constraints and indexing
- Open source
- 1.9K GitHub stars
- Databases

Scores existing PostgreSQL tables to find which should become TimescaleDB hypertables
- Open source
- 1.9K GitHub stars
- Databases

Guides an agent through converting PostgreSQL tables into TimescaleDB hypertables safely
- Open source
- 1.9K GitHub stars
- Databases

Guides an agent through pgvector setup, HNSW indexing and tuning for semantic search
- Open source
- 1.9K GitHub stars
- Databases

Guides an agent through planning, testing and running PostgreSQL schema migrations safely
- Open source
- 1.9K GitHub stars
- Databases


