Trademarks of their respective owners. KissMySkills is not affiliated with or endorsed by them.
How it works
Ask it something hard.
📎 ai-skill-for-postgresql.txtLOADED ✓
This query on a 40M row events table filters by user_id and last 7 days, orders by created_at desc, limit 50, and EXPLAIN shows a Seq Scan. Fix it.
CLAUDE · WITH THIS SKILLYou get: a CREATE INDEX CONCURRENTLY statement on (user_id, created_at DESC) with equality column first and the range-plus-sort column second -> a one-line why explaining the planner can walk the index in sort order and stop after 50 rows with no sort node -> the EXPLAIN (ANALYZE, BUFFERS) query to rerun and what to look for (Index Scan, far fewer shared reads) -> operational notes: CONCURRENTLY cannot run inside a transaction, build off-peak, run ANALYZE afterwards -> the next action: create the index, rerun the plan and paste it if a Seq Scan remains.
Questions before you buy? A person answers, usually the same day: hello@kissmyskills.com
// the file itself
Read it before you buy it.
The first lines of the file your AI will read, exactly as delivered. Nothing rewritten for the page.
Use the name Once the file is loaded, talk to it by name: “Serge, check this page.” That is what the name is for. It also keeps several skills apart in one chat.
// the skill your AI runs on
You are a senior PostgreSQL practitioner who reads an EXPLAIN plan, picks the index, and writes migrations that avoid long locks with CREATE INDEX CONCURRENTLY. You have been activated to hand the user SQL that uses the index.
KissMySkills.com | Install: paste this whole file into Claude Projects (Project instructions), a custom GPT (Instructions), a Gemini Gem, or your AI's system prompt. Then just ask questions the way you normally would. You are a senior PostgreSQL practitioner embedded in the user's daily development and database work, with thousands of queries, pragmatic schemas and production clusters behind you. You optimise for correct SQL that uses indexes, schemas that stay consistent under load, and safe changes to live databases. Tone: direct, practical, step-by-step when needed. · Core objects: schemas, tables, constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, NOT NULL), identity columns, views, materialized views, functions, triggers, extensions, roles. · Data types: bigint, numeric, text, boolean, timestamptz, interval, uuid, jsonb, arrays, enum, range types. · SQL features: CTEs including RECURSIVE, window functions (ROW_NUMBER, RANK, LAG, LEAD), LATERAL joins, DISTINCT ON, FILTER, RETURNING, INSERT ON CONFLICT, generated columns, full text search with tsvector. · jsonb: ->, ->>, @>, ?, jsonb_set, jsonb_build_object, jsonb_path_query, GIN indexes. · Indexes: B-tree, composite indexes and column order, partial, expression, covering with INCLUDE, GIN, GiST, BRIN, unique, CREATE INDEX CONCURRENTLY, bloat. · Query planning: EXPLAIN (ANALYZE, BUFFERS), Seq Scan versus Index Scan versus Bitmap Heap Scan, join types, row estimate errors, ANALYZE, work_mem effects. · Concurrency: MVCC, isolation levels (READ COMMITTED default, REPEATABLE READ, SERIALIZABLE), FOR UPDATE, SKIP LOCKED, deadlocks, long transactions blocking VACUUM. · Maintenance: VACUUM and autovacuum, VACUUM FULL versus pg_repack, REINDEX, pg_stat_statements, pg_stat_activity, log_min_duration_statement. · Configuration: postgresql.conf, pg_hba.conf, shared_buffers, work_mem, effective_cache_size, PgBouncer. · Backup and replication: pg_dump and pg_restore, pg_basebackup, WAL archiving, streaming and logical replication, managed services (RDS, Aurora, Cloud SQL, Supabase, Neon). · Tools: psql meta-commands (\d, \dt, \x, \copy), pgAdmin, DBeaver; migration tools Flyway, Alembic, Prisma Migrate, Rails and Django. · Extensions: PostGIS, pg_trgm, pgvector, timescaledb. Security: roles, GRANT and REVOKE, row-level security, SSL.
77 lines · .txt · instant download
// what's inside
What's inside this skill
SQL with CTEs, window functions, DISTINCT ON and ON CONFLICT upserts
EXPLAIN ANALYZE diagnosis with the exact index or rewrite that fixes it
Lock-safe migrations: nullable add, batched backfill, NOT VALID then VALIDATE
pg_stat_statements and pg_stat_activity queries for slow and blocking sessions
Backend developers, data engineers and DBAs who write SQL or run PostgreSQL in production every day.
// two ways to get it
Use it inside your AI, or download it once.
Library plan
This skill and 2,500+ others, inside your chat
$9/mocancel anytime, or $59 a year
All 2,500+ skills, prompt packs and agents, loaded the moment you ask
Nothing to download or paste: connect once in Claude, ChatGPT, Claude Code or Cursor
New skills every week and 10 catalog files a month to download
Trademarks of their respective owners. KissMySkills is not affiliated with or endorsed by them.
// ask your assistant
Or let your AI set up this skill for you.
Go to kissmyskills.com/pages/connector and set up the "AI Skill for PostgreSQL" skill (handle: ai-skill-for-postgresql) for me
Paste it into Claude, ChatGPT, Claude Code, Cursor or Codex. Your AI walks you through connecting KissMySkills (about 3 minutes, 7-day free trial) and loads the skill. What your AI will read →
What you're actually buying
This Claude/ChatGPT skill works as a PostgreSQL AI pair programmer inside your daily database work: it writes SQL with CTEs, window functions and LATERAL joins, reads EXPLAIN (ANALYZE, BUFFERS) output to find the expensive node and the missing index, produces CREATE TABLE and CREATE INDEX CONCURRENTLY statements, writes lock-safe multi-step migrations, and drafts PL/pgSQL functions and triggers.
It knows data types including jsonb and timestamptz, B-tree, GIN, BRIN and partial indexes, MVCC and isolation levels, VACUUM and autovacuum, pg_stat_statements and pg_stat_activity, pg_dump and pg_restore, replication, PgBouncer, psql meta-commands and common extensions such as PostGIS, pg_trgm and pgvector. It does not connect to your database or run anything; it prepares the SQL, the migration order and the verification query so you can apply them safely.
Works the same way in Claude, ChatGPT and Gemini. One purchase, download the file, install in under 2 minutes, then paste a table definition or an EXPLAIN plan and get PostgreSQL SQL back. Pairs with Oleg, Database Engineer, the persona skill; this one is the helper inside PostgreSQL.
// how to install
Under 2 minutes
Four steps. Any AI chat.
01
Download the file
After checkout, the download link lands in your inbox. Save the .txt file anywhere on your device.
02
Open your AI chat
Any AI chat you already use: Claude, ChatGPT, Gemini, Grok, Copilot or another.
03
Paste the prompt
Open the .txt file, copy the prompt section and paste it into Claude or ChatGPT - or add it to a Project so it is always there.
04
Start working
Your AI is now configured as a specialist. Ask it anything inside its domain.
No technical knowledge required.
With Library there is nothing to download. Connect your AI once, then ask for any skill by name.
It turns Claude or ChatGPT into a PostgreSQL AI assistant that writes and optimises SQL, reads EXPLAIN ANALYZE plans, recommends indexes, designs schemas with proper constraints, writes lock-safe migrations, drafts PL/pgSQL functions and triggers, and gives you diagnostic queries for bloat, slow statements and blocking sessions.
Does it operate PostgreSQL for me?+
No. It does not connect to your database, run queries, build indexes or apply migrations. It writes the SQL, the migration steps in the right order and the verification query, and you run them in psql, pgAdmin or your migration tool against your own PostgreSQL database.
Can the PostgreSQL skill write migrations that are safe on a live table?+
Yes. It splits changes into steps that avoid long locks: add the column nullable, backfill in batches, add the constraint as NOT VALID and VALIDATE later, and build indexes with CREATE INDEX CONCURRENTLY. It formats the migration for Flyway, Alembic, Prisma, Rails or Django when you name your tool, and it warns which PostgreSQL versions change the lock behaviour.
Does it cover managed PostgreSQL like RDS, Supabase or Neon?+
It covers self-managed PostgreSQL and managed services such as Amazon RDS and Aurora, Cloud SQL, Azure Database, Supabase and Neon, and it asks which one you use when extensions, configuration access or backup options differ. It never invents parameters or version numbers.
Ready to give your AI a specialist?
This one and 2,500+ others, inside Claude, ChatGPT, Claude Code, Codex or Cursor. Cancel anytime.