postgres
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
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- 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. **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
02 资源文件 31
- 参考文档evals/evals.json1.6 KB
- 许可证LICENSE.upstream9.4 KB
- 参考文档references/backfill-strategies.md2.3 KB
- 参考文档references/complete-example.md2.0 KB
- 参考文档references/design-postgis-tables.md16.5 KB
- 参考文档references/design-postgres-tables.md16.5 KB
- 参考文档references/find-hypertable-candidates.md10.3 KB
- 参考文档references/migrate-postgres-tables-to-hypertables.md14.7 KB
- 参考文档references/mode-authoring.md7.7 KB
- 参考文档references/pgvector-semantic-search.md14.8 KB
- 参考文档references/postgres-database-migration.md24.2 KB
- 参考文档references/postgres-hybrid-text-search.md12.3 KB
- 参考文档references/schema-exploration/guide.md4.3 KB
- 参考文档references/schema-exploration/references/data-values.md5.7 KB
- 参考文档references/schema-exploration/references/extensions.md1.8 KB
- 参考文档references/schema-exploration/references/foreign-tables.md3.9 KB
- 参考文档references/schema-exploration/references/overview.md5.9 KB
- 参考文档references/schema-exploration/references/partitioning-and-inheritance.md6.7 KB
- 参考文档references/schema-exploration/references/psql.md2.1 KB
- 参考文档references/schema-exploration/references/query-authoring.md2.1 KB
- 参考文档references/schema-exploration/references/routines.md2.9 KB
- 参考文档references/schema-exploration/references/security.md2.5 KB
- 参考文档references/schema-exploration/references/tables.md7.7 KB
- 参考文档references/schema-exploration/references/triggers.md1.6 KB
- 参考文档references/schema-exploration/references/views.md2.4 KB
- 参考文档references/setup-timescaledb-hypertables.md18.4 KB
- 参考文档references/telegram.md3.4 KB
- 参考文档references/validation-queries.md3.4 KB
- 脚本scripts/configure-telegram.mjs8.2 KB
- 脚本scripts/install-mode.mjs9.9 KB
- 参考文档UPSTREAM.md478 B
03 SKILL.md 正文
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
- Identify which reference matches the user's task from the descriptions above.
- Load the reference file to get detailed instructions and SQL patterns.
- For tasks spanning multiple areas (e.g., "design a table with vector search"), load multiple references as needed.
04 同仓库更多 Skills
lintlang
Lint AI agent instruction files (SKILL.md, CLAUDE.md, AGENTS.md, GEMINI.md), tool definitions, system prompts, and agent configs with the deterministic LintLang CLI. Use when writing, editing, or reviewing agent instructions to catch ambiguous tool descriptions, missing stop conditions, schema/description mismatches, mixed output formats, or prompts embedded in Python before they reach runtime. Zero-LLM static analysis; no model calls and no network calls during a scan.
untangle-codebase
Untangle a whole codebase in one pass, so agents working in it read less per change, break less without noticing, and debug faster.
agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
find-docs
Retrieves up-to-date documentation, API references, and code examples for any developer technology. Use this skill whenever the user asks about a specific library, framework, SDK, CLI tool, or cloud service — even for well-known ones like React, Next.js, Prisma, Express, Tailwind, Django, or Spring Boot. Your training data may not reflect recent API changes or version updates. Always use for: API syntax questions, configuration options, version migration issues, "how do I" questions mentioning a library name, debugging that involves library-specific behavior, setup instructions, and CLI tool usage. Use even when you think you know the answer — do not rely on training data for API details, signatures, or configuration options as they are frequently outdated. Always verify against current docs. Prefer this over web search for library documentation and API details.
test-audit
Writing/changing/reviewing/sweeping tests: reject duplicate or implementation-coupled proof; remove test-only production seams.
tmux
Remote control tmux sessions for interactive CLIs (python, gdb, etc.) by sending keystrokes and scraping pane output. Use when a task needs an interactive terminal program, such as a REPL, debugger, or TUI, that a one-shot shell command cannot drive.