←Leaderboard/Databases/pg-aiguide
Last commit on September 25, 2026·Created on July 23, 2025

timescale/pg-aiguide

“A technical reference for optimizing PostgreSQL table design, spatial data, and migrations”
Combined rank
#209
across all skills
In Databases
#2
category rank
Stars
1.9k
+0.3% in last 7d
Forks
111
+0.9% in last 7d
Watchers
12
0.0% in last 7d
Traction scoreGitHub stars can be faked, so popularity alone can be misleading. Traction Score looks for broader signs of recent attention, adoption, and active maintenance.
TL;DR

This collection provides structured guidance for backend and infrastructure engineers working with PostgreSQL. It focuses on improving the precision of AI-generated database code through expert patterns for table design and migration strategies.

The repository includes specialized knowledge for implementing location-based applications using PostGIS, as well as identifying hypertable candidates for time-series data optimization.

WHO IT'S FOR
Backend / infrastructure engineers
optimizing PostgreSQL table design and migrations
AI / ML engineers
implementing semantic and hybrid search in Postgres
GIS developers
designing spatial tables with PostGIS
Database architects
migrating time-series data to TimescaleDB hypertables
Repository contents

10 skill files

Compatible AgentsThe repository documents support for these agents. The skills may also work with other agents that can load SKILL.md files, but they may need some setup or small changes.

Use this skill collection

Follow the documented setup, then try a first task.

I’m using

Claude Code plugin

Installs: Complete pg Claude Code plugin, including the skills in the repository's skills directory and the public pg-aiguide MCP server. · Claude Code

Before you start
  • Claude Code with plugin support
  1. In a terminal, add the repository as a Claude Code plugin marketplace.

    claude plugin marketplace add timescale/pg-aiguide
  2. After adding the marketplace, install the pg plugin in a terminal.

    claude plugin install pg@aiguide
README.md ↗ · Checked Oct 2, 2026.claude-plugin/marketplace.json ↗ · Checked Oct 2, 2026

Give it something to do.

Suggested first task

Draft a small PostgreSQL schema

Uses design-postgres-tables

  • A short application description
  • Two or three core entities and their fields
  • Common lookup and join patterns
  • Target PostgreSQL version
Use the design-postgres-tables skill to draft, but not execute, a PostgreSQL schema for [describe the small application]. Start with only [list the two or three core entities] and the access patterns [list common lookups or joins]. Include appropriate data types, primary and foreign keys, semantic NOT NULL constraints, checks, and only the indexes justified by those access patterns. Target PostgreSQL [version]. Briefly explain each design choice.
README.md ↗ · Checked Oct 2, 2026.claude-plugin/marketplace.json ↗ · Checked Oct 2, 2026skills/design-postgres-tables/SKILL.md ↗ · Checked Oct 2, 2026
Suggested first task

Explore one database question safely

Uses schema-exploration

  • A focused question about the database
  • An available database connection or PostgreSQL schema files
  • The authorized database and schema scope
Use the schema-exploration skill to answer this focused question about my PostgreSQL database: [question]. Work only within the authorized database and schemas [scope]. Begin with read-only catalog metadata, identify the most relevant schema-qualified objects and relationships, distinguish observations from inferences, and stop once you can answer. Do not inspect rows or data-derived statistics unless you first request my approval. If no database connection is available, work from the schema files I provide.
skills/schema-exploration/SKILL.md ↗ · Checked Oct 2, 2026README.md ↗ · Checked Oct 2, 2026.claude-plugin/marketplace.json ↗ · Checked Oct 2, 2026
Suggested first task

Draft a pgvector semantic-search setup

Uses pgvector-semantic-search

  • PostgreSQL 15 or newer
  • pgvector 0.8.0 or newer installed in the target environment
  • Content type to store
  • Embedding dimension N
  • Embedding model used for stored and query vectors
  • Desired result count k
Use the pgvector-semantic-search skill to draft, but not execute, the default SQL setup for semantic search over [content type]. My embedding dimension is [N], and both stored and query embeddings come from [embedding model]. Include the extension, a minimal table, a default HNSW cosine index, and a parameterized top-[k] nearest-neighbor query with an explicit halfvec([N]) cast. Briefly identify the placeholders I must replace.
skills/pgvector-semantic-search/SKILL.md ↗ · Checked Oct 2, 2026README.md ↗ · Checked Oct 2, 2026.claude-plugin/marketplace.json ↗ · Checked Oct 2, 2026