postgres

GitHub

提供PostgreSQL全栈专家技能,涵盖表设计、索引优化、pgvector语义搜索、PostGIS空间数据及TimescaleDB时序数据处理。支持安全零停机迁移与现有库结构探索,适用于复杂数据库建模与分析任务。

skills/postgres/SKILL.md timescale/pg-aiguide

Trigger Scenarios

探索现有PostgreSQL数据库结构与关系 设计或修改PostgreSQL表、模式或数据模型 配置pgvector向量检索或混合搜索 设置PostGIS空间数据或TimescaleDB时序表 执行安全的数据库Schema迁移

Install

npx skills add timescale/pg-aiguide --skill postgres -g -y
More Options

Use without installing

npx skills use timescale/pg-aiguide@postgres

指定 Agent (Claude Code)

npx skills add timescale/pg-aiguide --skill postgres -a claude-code -g -y

安装 repo 全部 skill

npx skills add timescale/pg-aiguide --all -g -y

预览 repo 内 skill

npx skills add timescale/pg-aiguide --list

SKILL.md

Frontmatter
{
    "name": "postgres",
    "license": "Apache-2.0",
    "metadata": {
        "author": "tigerdata"
    },
    "description": "Use this skill for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations.\n\n**Trigger when user asks to:**\n- Explore an existing PostgreSQL database to understand its objects and relationships\n- Design or modify PostgreSQL tables, schemas, or data models\n- Choose data types, constraints, indexes, or partitioning strategies\n- Work with pgvector embeddings, semantic search, or RAG\n- Set up full-text search, hybrid search, or BM25 ranking\n- Use PostGIS for spatial\/geographic data\n- Set up TimescaleDB hypertables for time-series data\n- Migrate tables to hypertables or evaluate migration candidates\n- Plan or execute safe schema migrations with zero downtime\n\n**Keywords:** PostgreSQL, Postgres, SQL, schema, table design, indexes, constraints, pgvector, PostGIS, TimescaleDB, hypertable, semantic search, hybrid search, BM25, time-series, migration\n"
}

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.

Search

  • 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.

Version History

  • b236d35 Current 2026-09-28 06:08

    新增 schema-exploration 参考文档,支持只读方式通过 pg_catalog 安全探索现有数据库结构、视图、触发器及扩展,辅助理解库对象关系。

  • 2bf9f11 2026-09-09 12:58

    移除了Ghost相关技能和内容引用

  • b4f11a4 2026-07-25 11:29

Same Skill Collection

skills/design-postgis-tables/SKILL.md
skills/design-postgres-tables/SKILL.md
skills/find-hypertable-candidates/SKILL.md
skills/ghost-database/SKILL.md
skills/migrate-postgres-tables-to-hypertables/SKILL.md
skills/pgvector-semantic-search/SKILL.md
skills/postgres-database-migration/SKILL.md
skills/postgres-hybrid-text-search/SKILL.md
skills/schema-exploration/SKILL.md
skills/setup-timescaledb-hypertables/SKILL.md

Metadata

Files
0
Version
b236d35
Hash
6855e5cb
Indexed
2026-07-25 11:29

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-30 06:13
浙ICP备14020137号-1