# pg-aiguide — Postgres Skills + MCP Search > pg-aiguide upgrades AI coding assistants for PostgreSQL: install best-practice skills via `npx skills` and add an MCP server for semantic doc search. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use ```bash # install curated Postgres skills for your agent npx skills add timescale/pg-aiguide --skill postgres # (optional) install all skills interactively npx skills add timescale/pg-aiguide # (optional) Claude Code plugin claude plugin marketplace add timescale/pg-aiguide ``` ## Intro pg-aiguide upgrades AI coding assistants for PostgreSQL: install best-practice skills via `npx skills` and add an MCP server for semantic doc search. - **Best for:** Teams writing production Postgres schemas and migrations with AI help - **Works with:** npx skills; public MCP server at `https://mcp.tigerdata.com/docs` (per README) - **Setup time:** 5–20 minutes ## Practical Notes - GitHub: 1,723 stars · 89 forks; pushed 2026-04-28 (verified via GitHub API). - README quickstart includes `npx skills add timescale/pg-aiguide --skill postgres` and an interactive install mode. - README provides a manual MCP config snippet and a public endpoint: `https://mcp.tigerdata.com/docs`. ## Main Make the “skills” measurable: - Before you add skills, run your agent on one real migration task and keep the output. - Add `postgres` skills, then repeat the same task and compare: naming, constraints, indexing, and clarity of comments. - Treat the MCP doc search as a backstop: ask the agent to cite which manual section it relied on when generating non-trivial SQL. This is a low-effort way to prevent “AI SQL roulette” from reaching production. ### FAQ **Q: Is it only for Claude Code?** A: No—README says it works with multiple agents via `npx skills` and also offers an MCP server endpoint. **Q: Do I need to self-host the MCP server?** A: Not necessarily—README provides a public server URL for doc search. **Q: How do I avoid overfitting?** A: Use skills as defaults, but still review migrations and require citations for risky changes. ## Source & Thanks > Source: https://github.com/timescale/pg-aiguide > License: Apache-2.0 > GitHub stars: 1,723 · forks: 89 --- ## 快速使用 ```bash # 给 agent 安装 Postgres 最佳实践技能 npx skills add timescale/pg-aiguide --skill postgres #(可选)交互式安装全部技能 npx skills add timescale/pg-aiguide #(可选)Claude Code 插件 claude plugin marketplace add timescale/pg-aiguide ``` ## 简介 pg-aiguide 为 AI 编程助手提供 PostgreSQL 技能与文档语义搜索:可用 npx skills 安装最佳实践,也可通过公共 MCP/Claude 插件提升生成 SQL 与 schema 的质量。 - **适合谁:** 用 AI 写生产级 Postgres schema/migration 的团队 - **可搭配:** npx skills;公共 MCP server:`https://mcp.tigerdata.com/docs`(见 README) - **准备时间:** 5–20 分钟 ## 实战建议 - GitHub:1,723 stars · 89 forks;最近更新 2026-04-28(GitHub API 验证)。 - README quickstart 包含 `npx skills add ... --skill postgres`,也支持交互式安装。 - README 给出手动 MCP 配置示例,并提供公共 endpoint:`https://mcp.tigerdata.com/docs`。 ## 主要内容 把“技能”做成可量化改进: - 加技能前,先让 agent 做一次真实迁移任务并保留输出。 - 安装 `postgres` skills 后复跑同一任务,对比命名、约束、索引策略与注释清晰度。 - 把 MCP 文档检索当作兜底:要求 agent 在生成复杂 SQL 时说明参考了哪段手册/文档。 这样能以很小成本减少“AI 写 SQL 靠运气”进入生产。 ### FAQ **只能用于 Claude Code 吗?** 答:不是。README 表示可通过 `npx skills` 适配多种 agent,同时也提供 MCP server endpoint。 **需要自托管 MCP server 吗?** 答:不一定。README 提供公共 URL 供文档语义检索。 **怎么避免“技能过拟合”?** 答:把技能当默认规则,但迁移仍需 code review;高风险变更要求引用依据。 ## 来源与感谢 > Source: https://github.com/timescale/pg-aiguide > License: Apache-2.0 > GitHub stars: 1,723 · forks: 89 --- Source: https://tokrepo.com/en/workflows/pg-aiguide-postgres-skills-mcp-search Author: MCP Hub