Skip to content
personamanagmentlayer avatar

Postgresql Expert

Expert PostgreSQL administration, query, and tuning guidance for production databases requiring version 15 or later.

CCM score
34 of 100
skills.sh installs
430
GitHub stars
46
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers schema design, indexing, transactions, EXPLAIN ANALYZE tuning, maintenance, replication, and backup planning
  • Includes practices for data types, constraints, foreign-key and query-driven indexes, and transactional updates
  • Enforces typed columns, CHECK constraints, and indexes on foreign keys while warning against over-indexing writes
  • Designed for production database work, with allowed access limited to psql, pg_dump, pg_restore, and createdb

Install

$ npx -y skills add personamanagmentlayer/pcl --skill postgresql-expert -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

PostgreSQL Expert

You are an expert in PostgreSQL with deep knowledge of advanced queries, indexing, performance tuning, replication, and database administration. You design and manage production PostgreSQL databases that are performant, reliable, and scalable.

Best Practices

1. Use Proper Data Types

-- Use specific types
-- Bad: VARCHAR(255) for everything
-- Good: Use appropriate types
email VARCHAR(255)
age INTEGER
price NUMERIC(10,2)
is_active BOOLEAN
created_at TIMESTAMP WITH TIME ZONE

2. Add Constraints

CREATE TABLE users (
    id SERIAL PRIMARY KEY,
    email VARCHAR(255) UNIQUE NOT NULL,
    age INTEGER CHECK (age >= 0 AND age <= 150),
    status VARCHAR(20) DEFAULT 'active' CHECK (status IN ('active', 'inactive', 'banned'))
);

3. Use Transactions

BEGIN;
UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;
COMMIT;

4. Index Appropriately

-- Index foreign keys
CREATE INDEX idx_orders_user_id ON orders(user_id);

-- Index columns used in WHERE, JOIN, ORDER BY
CREATE INDEX idx_users_created_at ON users(created_at);

Details

Repository
github.com/personamanagmentlayer/pcl
Category
Databases
First seen
Jun 3, 2026

Questions

What is the PostgreSQL Expert skill used for?

The postgresql-expert skill covers expert-level PostgreSQL database administration, advanced queries, performance tuning, and production operations. It guides schema design with proper data types and constraints, indexing choices, transactions, maintenance such as VACUUM and ANALYZE, backups, connection pooling, and replication.

Who should install the postgresql-expert skill?

It suits developers and database administrators who work with PostgreSQL 15 or newer and want an agent to help design, query, tune, and run production databases. The skill's requirements list PostgreSQL 15.0 or higher.

How do I install the postgresql-expert skill?

Run npx -y skills add personamanagmentlayer/pcl --skill postgresql-expert -y in your project. Once installed, the agent can use psql, pg_dump, pg_restore, createdb and dropdb, along with file reading, editing and search tools.

Where does postgresql-expert rank among Databases skills?

It sits in the Databases category on Claude Marketplaces, alongside supabase-postgres-best-practices and several Prisma skills such as prisma-client-api and prisma-postgres. Where those focus on a specific ORM or hosted platform, this skill focuses on general PostgreSQL administration and performance work.

More from personamanagmentlayer/pcl

All 32

Similar to Postgresql Expert

More Databases