PluginInstalls cleanly

Design a safe database

pg-aiguide

Timescale's Postgres guide for agents: skills and a docs lookup that help write clean table designs, indexes and queries in PostgreSQL.

Works with
Claude Code, Codex CLI, Gemini CLI
Good for
Web developers, Build an app

What it does

pg-aiguide, from Timescale (now called Tiger Data), helps your assistant write better PostgreSQL. PostgreSQL is a very common database. Assistants often write tables and queries that work but are weak: missing indexes, wrong data types, slow joins. pg-aiguide has two parts. You can use them together or alone.

The skills. A skill is a text file with instructions that your assistant reads when a task fits. The repository has 11 skill folders. They cover table design, indexes, data types, constraints (rules the database enforces, such as "this email must be unique"), naming and speed. One skill explores a database that already exists. Others cover PostGIS maps data, TimescaleDB time-series tables, text search, migrations and pgvector search.

The docs server. This is a hosted MCP server, a service that gives your assistant extra tools. Its search_docs tool searches the official PostgreSQL manual (matched to your version), the TimescaleDB docs and the PostGIS docs. The pgvector docs are not in the search yet; the README lists them as coming soon. A second tool, view_skill, serves skills from the server. Those skills can change without an update on your side.

The server is a public service. Your question leaves your computer, so keep private table names and data out of it.

The README shows a demo that compares a schema made with and without the tool. It reports 4x more constraints, 55% more indexes and newer PostgreSQL features. That is the vendor's own test. Treat it as a claim, not a benchmark.

In Claude Code, the plugin gives you both parts at once. In Codex CLI and Gemini CLI you need two commands: one for the skills and one for the server. The server command alone gives docs search but no skills.

Who it is for

People who let their assistant design or change a PostgreSQL database, for example for a Supabase, Neon or self-hosted app, and who want sound tables and indexes.

Example prompts

  • "Create a Postgres table schema for storing usernames and unique email addresses."
  • "Design the database for a small online shop with products, orders and customers."
  • "Look at my existing database and explain how the tables relate."
  • "Which index should I add to speed up this query? use pg-aiguide"

How to install

claude plugin marketplace add timescale/pg-aiguide
claude plugin install pg@aiguide
npx skills add timescale/pg-aiguide
codex mcp add --url "https://mcp.tigerdata.com/docs" pg-aiguide

How to use it

Ask the agent to design tables or fix a slow query. The skills tell it to follow Postgres good practice. The docs server lets it look up the PostgreSQL manual instead of guessing.

Other assistants

Codex CLI:

  1. Add the main skill with the Skills CLI, a third-party installer:
npx skills add timescale/pg-aiguide --skill postgres
  1. Add the docs server:
codex mcp add pg-aiguide --url https://mcp.tigerdata.com/docs
  1. Start Codex and type /mcp to check the server.

Gemini CLI:

  1. Add the main skill:
npx skills add timescale/pg-aiguide --skill postgres
  1. Add the docs server for all your projects. The -s user part does this; without it, Gemini saves the server for the current project only.
gemini mcp add -s user pg-aiguide "https://mcp.tigerdata.com/docs" -t http

Check it works

Type /mcp in your assistant. pg-aiguide must show as connected, with a search_docs tool. Then ask for a small schema. A working setup mentions constraints and indexes in the answer.

Common problems

  • The assistant ignores the docs server — it answers from memory — Add "use pg-aiguide" to your prompt. The README suggests this for some clients.
  • You only want to inspect an existing database — the main skill is about new designs — Add the exploration skill: npx skills add timescale/pg-aiguide --skill schema-exploration.
  • You do not know which skills to add — the list is long — Run npx skills add timescale/pg-aiguide without --skill. It lets you pick skills one by one.
  • You have docs search but no skills — answers cite docs but skip good practice — You added only the server. Run the npx skills add command too.

What to watch out for

  • The optional docs server is a hosted service. Your search questions leave your computer.
  • The skills are text. They do not connect to your database unless you set up a separate database tool.
  • The hosted server can also serve skills through its view_skill tool. Those skills can change without an update on your side.
  • Do not put private table names or data in a question to the hosted server. It is a public service.

Licence and author

Licence
Apache-2.0
Author
Timescale
Source code
github.com/timescale/pg-aiguide

How we tested it

We installed it on an empty test computer on 12 Oct 2026. Installed and started in a clean test system. Not yet used in a real AI session.

Test level

We did not design a real schema with it. The Codex, Gemini and npx routes were not run.

Technical details of the test
Date
12 Oct 2026
Method
Added the marketplace and installed the pg plugin with the Claude Code command line in a clean container with no account. The plugin showed as enabled and the folder held 11 skills. All 11 skill files have a name and a description, and the marketplace file is valid JSON. The hosted docs server was not called.

Checked again on 15 Oct 2026

Alternatives

  • Context7: Current documentation for many code libraries. It is not focused on database design.
  • Supabase or Neon MCP servers: They act on your hosted database account. pg-aiguide only gives knowledge and docs search.

FAQ

Is it free? The code is open source under the Apache-2.0 licence. The README calls the docs search a public MCP server and lists no price.

Does it connect to my database? No. It gives guidance and docs search. Your assistant needs its own tools to reach the database.

Does it only work with TimescaleDB? No. It covers plain PostgreSQL, with extra docs for TimescaleDB and PostGIS.

Do I need both the skills and the docs server? No. The skills give good practice. The server adds docs search. The README suggests the server for deeper knowledge.

Sources