By timescale
Design, migrate, and optimize PostgreSQL databases with best practices for schema design, indexing, and safe production migrations. Includes TimescaleDB hypertable setup, pgvector vector search for AI/ML embeddings, hybrid keyword+semantic search, and spatial data patterns with PostGIS.
Comprehensive PostGIS spatial table design reference covering geometry types, coordinate systems, spatial indexing, and performance patterns for location-based applications
Use this skill for general PostgreSQL table design. **Trigger when user asks to:** - Design PostgreSQL tables, schemas, or data models when creating new tables and when modifying existing ones. - Choose data types, constraints, or indexes for PostgreSQL - Create user tables, order tables, reference tables, or JSONB schemas - Understand PostgreSQL best practices for normalization, constraints, or indexing - Design update-heavy, upsert-heavy, or OLTP-style tables **Keywords:** PostgreSQL schema, table design, data types, PRIMARY KEY, FOREIGN KEY, indexes, B-tree, GIN, JSONB, constraints, normalization, identity columns, partitioning, row-level security Comprehensive reference covering data types, indexing strategies, constraints, JSONB patterns, partitioning, and PostgreSQL-specific best practices.
Use this skill to analyze an existing PostgreSQL database and identify which tables should be converted to Timescale/TimescaleDB hypertables. **Trigger when user asks to:** - Analyze database tables for hypertable conversion potential - Identify time-series or event tables in an existing schema - Evaluate if a table would benefit from Timescale/TimescaleDB - Audit PostgreSQL tables for migration to Timescale/TimescaleDB/TigerData - Score or rank tables for hypertable candidacy **Keywords:** hypertable candidate, table analysis, migration assessment, Timescale, TimescaleDB, time-series detection, insert-heavy tables, event logs, audit tables Provides SQL queries to analyze table statistics, index patterns, and query patterns. Includes scoring criteria (8+ points = good candidate) and pattern recognition for IoT, events, transactions, and sequential data.
Use this skill for persistent PostgreSQL storage in agent workflows — spin up databases on demand, test schema migrations safely on forks, and pass databases as assets between agents using Ghost. **Trigger when user asks to:** - Create a new PostgreSQL database quickly - Manage database lifecycle in agent workflows - Fork a database to test changes safely - Run analytics or heavy queries on a fork without impacting the production database - Share a database snapshot so others can spin up their own copy - Pass a database as an input or output between agents - Create a database for agents - Need many databases that are billed only when queried - Set up the Ghost MCP server or CLI **Note:** If the Ghost MCP server is already installed, use its tools directly — this skill is for environments without the MCP or as a reference for what's possible. **Keywords:** Ghost, ghost.build, database, create database, fork database, PostgreSQL, managed Postgres, MCP, agent database, connection string
Use this skill to migrate identified PostgreSQL tables to Timescale/TimescaleDB hypertables with optimal configuration and validation. **Trigger when user asks to:** - Migrate or convert PostgreSQL tables to hypertables - Execute hypertable migration with minimal downtime - Plan blue-green migration for large tables - Validate hypertable migration success - Configure compression after migration **Prerequisites:** Tables already identified as candidates (use find-hypertable-candidates first if needed) **Keywords:** migrate to hypertable, convert table, Timescale, TimescaleDB, blue-green migration, in-place conversion, create_hypertable, migration validation, compression setup Step-by-step migration planning including: partition column selection, chunk interval calculation, PK/constraint handling, migration execution (in-place vs blue-green), and performance validation queries.
External network access
Connects to servers outside your machine
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
AI-optimized PostgreSQL expertise for coding assistants
pg-aiguide helps AI coding tools write dramatically better PostgreSQL code. It provides:
Use it as:
npx skills — works with Claude Code, Cursor, Codex, Gemini CLI, and 40+ other agentsAI coding tools often generate Postgres code that is:
pg-aiguide fixes that by giving AI agents deep, versioned PostgreSQL knowledge and proven patterns.
https://github.com/user-attachments/assets/5a426381-09b5-4635-9050-f55422253a3d
Prompt given to Claude Code:
Please describe the schema you would create for an e-commerce website two times, first with the tiger mcp server disabled, then with the tiger mcp server enabled. For each time, write the schema to its own file in the current working directory. Then compare the two files and let me know which approach generated the better schema, using both qualitative and quantitative reasons. For this example, only use standard Postgres.
Result (summarized):
GENERATED ALWAYS AS IDENTITY, NULLS NOT DISTINCT)Conclusion: pg-aiguide produces more robust, performant, maintainable schemas.
Install curated PostgreSQL best-practice skills for your AI coding agent:
npx skills add timescale/pg-aiguide --skill postgres
Or pick individual skills interactively:
npx skills add timescale/pg-aiguide
Works with Claude Code, Cursor, Codex, Gemini CLI, VS Code, and 40+ other agents.
For even deeper PostgreSQL knowledge, also add the MCP server to give your agent semantic search over the official PostgreSQL, TimescaleDB, and PostGIS manuals.
For semantic search over PostgreSQL, TimescaleDB, and PostGIS documentation, add the public MCP server:
https://mcp.tigerdata.com/docs
{
"mcpServers": {
"pg-aiguide": {
"url": "https://mcp.tigerdata.com/docs"
}
}
}
Or it can be used as a Claude Code Plugin:
claude plugin marketplace add timescale/pg-aiguide
claude plugin install pg@aiguide
This repo serves as a claude code marketplace plugin. To install, run:
claude plugin marketplace add timescale/pg-aiguide
claude plugin install pg@aiguide
npx claudepluginhub timescale/pg-aiguideCaptures user prompts and agent responses to Memory Engine for persistent context across sessions
Database architecture and SQL optimization with PostgreSQL expertise
Design a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features
SQL optimization, query tuning, and database performance expert for production systems
Postgres performance optimization and best practices from Supabase. 30 rules across 8 categories prioritized by impact.
Create, connect, and interact with a Cloud SQL for PostgreSQL database and data.
Database query optimization with index recommendations and EXPLAIN analysis