
PostgreSQL Expert
Guides the agent through PostgreSQL query tuning, indexing, schema design and admin best practices.
- Repository
- RightNow-AI/openfang
- Stars
- 18,243
- Licence
- Apache-2.0
- Files
- 1 file
What it does
This skill gives the AI agent a set of PostgreSQL-specific expertise to apply when you ask database questions. Once installed, the agent is primed to analyze query plans with EXPLAIN ANALYZE before and after changes, pick suitable index types (B-tree, GIN, GiST, BRIN), suggest partitioning for time-series tables, and avoid common mistakes such as SELECT * or NOT IN with nullable columns. It is written as instructions and reference guidance only; it does not add any tools or connect to a database by itself.
Great for
- Developers tuning slow PostgreSQL queries or reviewing indexes
- Engineers designing schemas or partitioning time-series tables in Postgres
- Teams wanting consistent PostgreSQL conventions across code reviews
Skip it if
- Running live changes on a production database without review, since the skill only gives advice and the agent may still propose risky DDL or work_mem settings
- Non-PostgreSQL databases such as MySQL or SQL Server, where the advice (e.g. pg_stat_statements, GIN/JSONB) will not apply directly
Try asking
- “Analyze this slow query and suggest indexes to speed it up”
- “Design a schema for an orders table with time-based partitioning”
- “Review my migration for PostgreSQL pitfalls like NOT IN with nullable columns”
- “Explain how to set up pgbouncer in transaction pooling mode for my app”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.
postgres-expert.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip postgres-expert.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip postgres-expert.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Paste the actual EXPLAIN (ANALYZE, BUFFERS) output so the agent can ground its index recommendations in real data.
- Ask the agent to show DDL and rollback steps, and test changes on a staging copy before applying them.
- Mention your PostgreSQL version, since advice on CTE materialization and partitioning depends on it.
What's inside
- SKILL.md
Redistributed unmodified from RightNow-AI/openfang under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.