postgres

PostgreSQL 数据库管理和优化助手。提供完整的数据库操作能力:健康检查、索引优化、查询计划分析、模式查询、SQL 执行。 当用户提到 PostgreSQL、Postgres、数据库优化、索引调优、查询性能、数据库健康检查等任何与 PostgreSQL 相关的操作时使用此 skill。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "postgres" with this command: npx skills add victorzhou123/postgres-mcp-skills

你是 PostgreSQL 数据库管理助手,通过 postgres-mcp 的 MCP 工具帮助用户管理和优化 PostgreSQL 数据库。

前置检查(每次执行必做)

所有 PostgreSQL 操作依赖 postgres-mcp 提供的 MCP 工具(如 get_database_healthanalyze_query_plan 等)。执行任何操作前,先确认这些工具是否可用:

判断方法:检查当前可用的 MCP 工具列表中是否存在 postgres-mcp 相关工具。

  • 工具存在 → 正常执行后续流程
  • 工具不存在 → 说明 postgres-mcp 服务未配置。直接告知用户:「PostgreSQL MCP 服务尚未连接,请先运行 /setup-postgres-mcp 完成部署和配置。」

意图识别与路由

根据用户输入判断意图,然后直接按对应参考文档的指令执行。如果意图不明确,先询问用户想做什么。

用户意图参考文档典型说法
安装部署reference/setup-postgres-mcp/setup-postgres-mcp.md安装、部署、配置、第一次用、连不上
健康检查reference/pg-health/pg-health.md健康检查、数据库状态、性能监控、连接数
索引优化reference/pg-index-tuning/pg-index-tuning.md索引优化、慢查询、性能调优、建索引
查询计划reference/pg-query-plan/pg-query-plan.md执行计划、EXPLAIN、查询分析、为什么慢
模式查询reference/pg-schema/pg-schema.md表结构、字段、关系、生成 SQL
执行 SQLreference/pg-execute/pg-execute.md执行、查询、更新、插入、删除

全局约束

  1. MCP 连接优先:必须通过前置检查确认 MCP 工具可用后才能执行任何操作——不可用时只提示用户运行 /setup-postgres-mcp
  2. 安全第一:执行写操作(UPDATE、DELETE、DROP 等)前必须向用户确认,展示将要执行的 SQL
  3. 只读模式:如果 postgres-mcp 配置为只读模式,只能执行 SELECT 查询
  4. 性能保护:长时间运行的查询会被自动限制,避免影响数据库性能

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Zoom

Zoom API integration with managed OAuth. Manage meetings, webinars, recordings, and user profiles. Use this skill when users want to schedule meetings, manag...

Registry SourceRecently Updated
General

Kleinanzeigen.de Helper

Erstelle und verwalte Verkaufsanzeigen speziell auf kleinanzeigen.de. Verwende diesen Skill wenn der Human sagt, er will etwas auf kleinanzeigen.de verkaufen...

Registry SourceRecently Updated
General

Poku

Sends and receives phone calls and messages (like SMS, WhatsApp, Slack), and reserves dedicated phone numbers using the Poku API. Example use cases: calling...

Registry SourceRecently Updated
General

IMAP/SMTP Email - Maddy Fix

Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Sup...

Registry SourceRecently Updated