Agent skill

Postgres

by timescale in timescale/pg-aiguide

A skill your agent uses for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations.

Apache-2.0Auto-check passedDatabases

Install Postgres

skills CLI
$ npx skills add timescale/pg-aiguide --skill postgres -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install timescale/pg-aiguide postgres --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/timescale/pg-aiguide.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/postgres .claude/skills/postgres && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
postgres
GitHub stars
1.9k
Token cost
~941 tokens
SKILL.md length
263 words
Files
14 (incl. references)
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations.

  • Works in 3 steps: Identify which reference matches the… → Load the reference file to get detailed… → For tasks spanning multiple areas (e.g.,…
  • Any PostgreSQL database work — table design
  • SKILL.md covers Available References and How to Use
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Postgres is an agent skill from timescale/pg-aiguide. 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…

Its SKILL.md is about 940 tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 other files, including reference files (for example `references/backfill-strategies.md`, `references/complete-example.md` and `references/design-postgis-tables.md`).

It sits in Databases, covering Retrieval-augmented generation, Embeddings and Forecasting and time series. It works with PostgreSQL, pgvector, SQL and Model Context Protocol. The repository describes itself as: MCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code. The licence is Apache-2.0.

When your agent uses it

  • Any PostgreSQL database work — table design
  • Extensions (pgvector
  • User asks to: - Explore an existing PostgreSQL database to understand its objects and relationships - Design
  • Modify PostgreSQL tables

Example prompts

  • “/postgres”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Identify which reference matches the user's task from the descriptions above.
  2. Load the reference file to get detailed instructions and SQL patterns.
  3. For tasks spanning multiple areas (e.g., "design a table with vector search"), load multiple references as needed.

What it can do on your machine

Read from SKILL.md and the folder at commit b236d35. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Postgres loads about 941 tokens when it runs, and up to ~1.1k if it reads all its reference files. Until then it costs about 238 tokens; SKILL.md has 263 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~238
When it runs · the whole SKILL.md, loaded when a task matches
~941
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from timescale/pg-aiguide at commit b236d35, republished under its Apache-2.0 licence (© timescale). 263 words, ~941 tokens.

Download SKILL.mdSave it as .claude/skills/postgres/SKILL.md (or your agent's skills folder). This skill also uses 13 other files; get the full folder from GitHub.
name
postgres
description
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
license
Apache-2.0
metadata.author
tigerdata

PostgreSQL Expert Skills

This skill provides comprehensive PostgreSQL expertise through specialized references. Load the appropriate reference based on the task.

Available References

Existing Databases
  • schema-exploration — Read-only, question-driven exploration of schemas, tables, views, routines, triggers, RLS, and extensions using pg_catalog. Use to understand an existing database before designing changes or writing queries.
Table Design
  • design-postgres-tables — Data types, constraints, indexes, JSONB patterns, partitioning, and PostgreSQL best practices. Use for any general table/schema design task.
  • design-postgis-tables — PostGIS spatial table design: geometry vs geography types, SRIDs, spatial indexing, and location-based query patterns. Use when the task involves geographic or spatial data.
  • pgvector-semantic-search — Vector similarity search with pgvector: HNSW/IVFFlat indexes, halfvec storage, quantization, filtered search, and tuning. Use for embeddings, RAG, or semantic search.
  • postgres-hybrid-text-search — Hybrid search combining BM25 keyword search with pgvector semantic search using RRF. Use when combining keyword and meaning-based search.
TimescaleDB
  • setup-timescaledb-hypertables — Hypertable creation, compression, retention policies, continuous aggregates, and indexes. Use when setting up TimescaleDB from scratch.
  • find-hypertable-candidates — SQL queries to analyze existing tables and score them for hypertable conversion. Use when evaluating which tables to migrate.
  • migrate-postgres-tables-to-hypertables — Step-by-step migration: partition column selection, in-place vs blue-green, validation. Use when executing a migration.
Migrations
  • postgres-database-migration — DDL lock reference, safe migration patterns, timeout strategies, rollback planning, and fork-based testing. Use when planning or executing schema changes on production databases.

How to Use

  1. Identify which reference matches the user's task from the descriptions above.
  2. Load the reference file to get detailed instructions and SQL patterns.
  3. For tasks spanning multiple areas (e.g., "design a table with vector search"), load multiple references as needed.

© timescale, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 13 other files (references) in skills/postgres of timescale/pg-aiguide.

  • SKILL.md
  • references/backfill-strategies.md
  • references/complete-example.md
  • references/design-postgis-tables.md
  • references/design-postgres-tables.md
  • references/find-hypertable-candidates.md
  • references/migrate-postgres-tables-to-hypertables.md
  • references/pgvector-semantic-search.md
  • references/postgres-database-migration.md
  • references/postgres-hybrid-text-search.md
  • references/schema-exploration/guide.md
  • references/schema-exploration/references
  • references/setup-timescaledb-hypertables.md
  • references/validation-queries.md

Open the folder on GitHubat commit b236d35

Compare with similar skills

Postgres next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Postgres compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Postgres this skilltimescale/pg-aiguide1.9k—~941Automated safety check: PassApache-2.0
Searching DocumentsGAIK-project/gaik-toolkit100—~4.2kAutomated safety check: PassMIT
Neon Postgresusenotra/notra255—~4.1kAutomated safety check: NotesAGPL-3.0
Mindsdb MCP SkillLeoYeAI/openclaw-master-skills2.2k—~2.5kAutomated safety check: PassMIT
Vsql Install Serverhashgraph-online/awesome-codex-plugins1.2k—~6.5kAutomated safety check: PassApache-2.0
DBoracle/skills872—~1.4kAutomated safety check: PassUPL-1.0

Similar skills

  • Searching Documents

    GAIK-project/gaik-toolkit

    Builds and debugs retrieval with the gaik toolkit — PgVectorStore, Ranker, FinnishTextProcessor, RelevanceGate — as hybrid search: pgvector similarity plus Postgres full-text, fused by rank, and the…

    100 GitHub stars~4.2k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Neon Postgres

    usenotra/notra

    Guides and best practices for working with Lakebase Postgres, the database behind Neon.

    255 GitHub stars~4.1k tokensUpdated today
    DatabasesAuto-check: notes
  • Mindsdb MCP Skill

    LeoYeAI/openclaw-master-skills

    MindsDB MCP服务器交互技能,用于通过自然语言查询和操作200+企业级数据源。当用户需要查询数据库、分析数据、创建AI模型、连接数据源(MySQL、PostgreSQL、MongoDB、Excel、CSV、Gmail、Slack等)、执行SQL查询、进行数据预测、构建知识库(RAG)、智能问答、文档检索或任何与数据库交互的任务时使用此技能。即使没有明确提到MindsDB,只要涉及数据库操…

    2.2k GitHub stars~2.5k tokensUpdated 2 mo ago
    DatabasesAuto-check passed
  • Vsql Install Server

    hashgraph-online/awesome-codex-plugins

    Get a working VillageSQL server on this machine and prove it works — choose an install path (installer, Docker, or source), start the server, connect, load a bundled extension, and call one of its…

    1.2k GitHub stars~6.5k tokensUpdated yesterday
    DatabasesAuto-check passed
  • DB

    oracle/skills

    Official

    Oracle Database guidance for SQL, PL/SQL, SQLcl, ORDS, Oracle Vector SDK, administration, app development, performance, security, migrations, and agent-safe database workflows.

    872 GitHub stars~1.4k tokensUpdated yesterday
    DatabasesAuto-check passed
  • RAG Implementation

    wshobson/agents

    Build retrieval-augmented generation systems: pick a vector database and embedding model, choose retrieval and reranking strategies, and start from a LangGraph pipeline.

    40k GitHub starsUsed in 9 repos~1.1k tokens
    AI & LLM EngineeringAuto-check passed

More from timescale/pg-aiguide

All 9 skills in this repo
  • Find Hypertable Candidates

    timescale/pg-aiguide

    A skill your agent uses to analyze an existing PostgreSQL database and identify which tables should be converted to Timescale/TimescaleDB hypertables.

    1.9k GitHub starsUsed in 1 repo~2.6k tokens
    Auto-check passed
  • Schema Exploration

    timescale/pg-aiguide

    Explore an existing PostgreSQL database before answering questions about its data or writing SQL.

    1.9k GitHub stars~1.1k tokensUpdated 6 days ago
    Auto-check passed
  • Pgvector Semantic Search

    timescale/pg-aiguide

    A skill your agent uses for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search.

    1.9k GitHub starsUsed in 1 repo~3.8k tokens
    Auto-check passed
  • A skill your agent uses to migrate identified PostgreSQL tables to Timescale/TimescaleDB hypertables with optimal configuration and validation.

    1.9k GitHub starsUsed in 1 repo~3.8k tokens
    Auto-check: warnings
  • Design Postgres Tables

    timescale/pg-aiguide

    A skill your agent uses for general PostgreSQL table design.

    1.9k GitHub stars~4.2k tokensUpdated 6 days ago
    Auto-check passed
  • Postgres Hybrid Text Search

    timescale/pg-aiguide

    A skill your agent uses to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF).

    1.9k GitHub stars~3.1k tokensUpdated 6 days ago
    Auto-check passed

Questions about Postgres

What does Postgres do?

A skill your agent uses for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations. Postgres is an agent skill from timescale/pg-aiguide. Use this skill for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations.

When should I use Postgres?

Postgres fits situations like: any PostgreSQL database work — table design; extensions (pgvector; user asks to: - Explore an existing PostgreSQL database to understand its objects and relationships - Design; modify PostgreSQL tables.

How do I install Postgres in Claude Code?

Run `npx skills add timescale/pg-aiguide --skill postgres -a claude-code`. Or copy the skill folder (skills/postgres in timescale/pg-aiguide) into .claude/skills/postgres in your project. Claude Code loads it when a task matches its description.

How do I install Postgres in Codex?

Run `npx skills add timescale/pg-aiguide --skill postgres -a codex`. Or copy the skill folder (skills/postgres in timescale/pg-aiguide) into .agents/skills/postgres in your project. Codex loads it when a task matches its description.

Can I use Postgres in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add timescale/pg-aiguide --skill postgres -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/postgres, .gemini/skills/postgres, .github/skills/postgres and .opencode/skills/postgres in your project.

What does Postgres need to run?

SKILL.md names no scripts, command-line tools or credentials: Postgres is instructions for the agent only.

Does Postgres access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Postgres safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Postgres use?

Postgres is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Postgres use?

About 941 tokens (SKILL.md is roughly 3.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 152 tokens, read only when the agent opens those files.

What are the alternatives to Postgres?

Skills that share tags, products or a category with Postgres: Searching Documents (GAIK-project/gaik-toolkit, 100 stars), Neon Postgres (usenotra/notra, 255 stars), Mindsdb MCP Skill (LeoYeAI/openclaw-master-skills, 2.2k stars) and Vsql Install Server (hashgraph-online/awesome-codex-plugins, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Postgres?

timescale (a GitHub organization) maintains it in timescale/pg-aiguide, which has 1,857 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 1, 2026.

Source: timescale/pg-aiguide on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.