Skip to content
Agentmart
Submit a tool

pg-performance-advisor

Performs read-only PostgreSQL performance diagnostics for locks, sessions, table statistics, and index candidates.

Skill by krzysztofbury

IndexedMIT
Write a review

Chalk Labs

Need help deploying pg-performance-advisor?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/krzysztofbury-pg-performance-advisor

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Performs read-only PostgreSQL performance diagnostics for locks, sessions, table statistics, and index candidates. Use for database health checks, slow-query investigations, bloat symptoms, or index reviews.

Use cases: backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/pg-performance-advisor

What's inside

Skill name
pg-performance-advisor
Description
Performs read-only PostgreSQL performance diagnostics for locks, sessions, table statistics, and index candidates. Use for database health checks, slow-query investigations, bloat symptoms, or index reviews.
License
MIT
Compatibility
Requires psql access through a user-managed read-only PostgreSQL service profile.
Instructions
73 lines in SKILL.md · view on GitHub

Files (5)

  • SKILL.md
  • maintenance-and-storage.md · references/
  • platform-observability.md · references/
  • schema-candidates.md · references/
  • workload-and-contention.md · references/

SKILL.md (first lines)

# PostgreSQL Performance Advisor

Diagnose and recommend. Never run DDL, DML, maintenance, privilege changes, or
`EXPLAIN ANALYZE`. Do not ask for passwords or write credentials. Require a
user-managed `PGSERVICE`, `PGPASSFILE`, or equivalent secret-managed connection.

## Preconditions

1. Confirm the target database, its environment, the diagnostic role, and the
   allowed scope.
2. Confirm that the role is read-only and has only the catalog-statistics
   visibility required for the task.
3. Never inspect application-row data, query text, client addresses, roles, or
   application names unless the user explicitly authorizes the extra exposure.

## Modes

### Health Check

Check active sessions, lock waits, idle transactions, table statistics, dead
tuples, index candidates, and database size. Report the statistics-reset or
uptime context before treating cumulative counters as evidence.

### Performance Investigation

Check long-running sessions, locks, cache pressure, sequential scans on large
tables, dead-tuple pressure, and configured query-statistics extensions in that
order. Stop when evidence identifies the primary bottleneck.

### Index Review

Treat index-usage and schema results as review candidates, never automatic
changes. Account for constraints, replica identity, partial indexes, statistics
age, and workload coverage.

## Read-Only Query Rules

Only run vetted `SELECT`, `SHOW`, or non-analyzing `EXPLAIN` statements. Do not
run arbitrary functions merely because they are invoked through `SELECT`.
Use `psql -X` to avoid startup-file side effects and session-local diagnostic
limits (for example, `statement_timeout=15s` and `lock_timeout=2s` through
`PGOPTIONS`, preserving required existing options). If a diagnostic times out,
report that limit and narrow the query before increasing it. These limits do
not replace a read-only role.
Use the focused reference that matches the investigation:

- [workload and contention](references/workload-and-contention.md)
- [maintenance and storage](references/maintenance-and-storage.md)
- [platform observability](references/platform-observability.md)
- [schema candidates](references/schema-candidates.md)

## Output

```text
PostgreSQL Diagnostic Report - YYYY-MM-DD

Critical
- Finding - evidence - impact - DBA action required

Warnings
- Finding - evidence - validation needed before remediation

Healthy Signals
- Check - result

Limits
- Statistics age, permissions, workload coverage, or unavailable extension
```

Recommendations must name the required DBA action, operational risk, locking
behavior, rollback approach, and the evidence needed before execution.

From krzysztofbury/llm-powerup, MIT.

More from krzysztofbury/llm-powerup

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 7, 2026 (23 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from krzysztofbury

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get pg-performance-advisor running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying pg-performance-advisor?

CallGet help
Cite this page

pg-performance-advisor skill. Agent Mart. https://agentmart.dev/skills/krzysztofbury-pg-performance-advisor (last updated 2026-10-24)