postgresql-slow-query-runbook-agent

A PostgreSQL slow-query diagnostics tool that uses the pg_stat_statements extension, EXPLAIN ANALYZE output parsing, and pg_stat_user_indexes index usage analysis to identify missing indexes, sequential scan bottlenecks, and lock contention issues.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "postgresql-slow-query-runbook-agent" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-8fc2c311a438f030fa44793dc7ee8790083ede3cc48e8e44068ef0749099ac18. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/postgresql-slow-query-runbook-agent before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

A PostgreSQL slow-query diagnostics tool that uses the pg_stat_statements extension, EXPLAIN ANALYZE output parsing, and pg_stat_user_indexes index usage analysis to identify missing indexes, sequential scan bottlenecks, and lock contention issues.

0 Downloads

Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: "PostgreSQL 慢查询操作手册"
slug: "postgresql-slow-query-runbook-agent"
version: "1.0.0"
displayName: "PostgreSQL 慢查询操作手册"
summary: "使用 pg_stat_statements 扩展、EXPLAIN ANALYZE 输出解析以及 pg_stat_user_indexes 进行索引使用分析,诊断 PostgreSQL 慢查询。识别缺失索引、顺序扫描瓶颈和锁争用问题。"
license: "MIT"
description: "使用 pg_stat_statements 扩展、EXPLAIN ANALYZE 输出解析以及 pg_stat_user_indexes 进行索引使用分析,诊断 PostgreSQL 慢查询。识别缺失的索引、顺序扫描瓶颈和锁争用问题。"
github_stars: 13127
verification: "security_reviewed"
source: "https://github.com/1991513ccie-png/skills"
category: "Runbooks & Diagnostics"
framework: "OpenClaw"
tool_ecosystem:
  github_repo: "1991513ccie-png/skills"
  github_stars: 13127
  npm_package: "pg"
  npm_weekly_downloads: 23169914

PostgreSQL 慢查询操作手册

Diagnoses PostgreSQL slow queries using pg_stat_statements extension, EXPLAIN ANALYZE output parsing, and pg_stat_user_indexes for index usage analysis. Identifies missing indexes, sequential scan bottlenecks, and lock contention issues.

Installation

Use the upstream install or setup path that matches your environment:

  • npm install pg
  • From your workspace root run yarn and then yarn lerna bootstrap
  • Run yarn test to run all the tests.

Requirements and caveats from upstream:

  • node-postgres

  • Build Status
  • Non-blocking PostgreSQL client for Node.js. Pure JavaScript and optional native libpq bindings.

Basic usage or getting-started notes:

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 精准定位 PostgreSQL 慢查询诊断这一高频运维痛点
  • 综合运用 pg_stat_statements、EXPLAIN ANALYZE 和索引分析,具备高实用价值
Trigger Precision95/100

Highlights

  • 触发词精准完整,清晰描述工具链与目标问题
Structure and Standards65/100

Areas to improve

  • 缺少 When to Use/示例章节 Reported severity: Minor

    文档未明确划分 Phase/步骤流程,缺少端到端执行示例及出口条件

    Recommendation: 补充 When to Use 说明,添加完整的慢查询诊断示例流程

Execution Reliability55/100

Areas to improve

  • 重要可靠性问题:核心执行流程缺失关键步骤 Reported severity: Major

    未说明如何启用 pg_stat_statements 扩展、如何获取和解析 EXPLAIN ANALYZE 输出,也未覆盖常见异常处理

    Recommendation: 补充扩展启用步骤、EXPLAIN ANALYZE 获取与解析方法,增加连接失败、权限不足等异常处理说明

Evidence Verifiability (mean of the first four)77/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 28
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com
  • raw.githubusercontent.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.