/data-core:postgres-operationsfrom data-core
Perform advanced Postgres database operations including schema design, migrations, query optimization, and data management on Neon serverless databases. Use when the user asks to design database schemas, write or optimize SQL queries, create migration scripts, manage indexes, or troubleshoot database performance via the Postgres MCP server.
Ships in data-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Schema design, migrations, query optimization, and data management for Neon serverless Postgres databases.
NEON_DATABASE_URL or DATABASE_URL environment variable must be setuvx postgres-mcp, needs uv) with NEON_DATABASE_URL mapped to DATABASE_URI; tools include list_schemas, list_objects, get_object_details, execute_sql, explain_queryWhen designing or modifying schemas:
CREATE TABLE statements ready to executeUUID or BIGSERIAL for primary keyscreated_at TIMESTAMPTZ DEFAULT NOW() and updated_at columnsTEXT instead of VARCHAR unless a hard length limit is requiredNOT NULL constraints wherever possibleENUM types for fixed-set columns<referenced_table>_idWhen creating migrations:
YYYYMMDD_HHMMSS_description.sqlIF NOT EXISTS / IF EXISTS where possible-- Migration: 20260315_120000_add_users_table.sql
-- Description: Create users table with authentication fields
BEGIN;
CREATE TABLE IF NOT EXISTS users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email TEXT UNIQUE NOT NULL,
name TEXT NOT NULL,
created_at TIMESTAMPTZ DEFAULT NOW(),
updated_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_users_email ON users (email);
COMMIT;
When optimizing queries:
EXPLAIN ANALYZE to understand the execution planWHERE, JOIN, and ORDER BY clausesSELECT * with specific columnsEXISTS instead of IN for subqueriesINSERT operationsLIMIT with OFFSET pagination carefully (prefer keyset pagination)LIKE '%term%' — use full-text search or trigram indexes insteadFor data management tasks:
COPY or batch INSERT for large datasetsSafety rules:
BEGIN/COMMIT for multi-statement operationsWHERE clauses on UPDATE and DELETE (no unfiltered mutations)SELECT preview before any DELETE or UPDATEFor schema changes:
-- Table: users
-- Purpose: Store user accounts and authentication data
CREATE TABLE users ( ... );
For query results, present in markdown tables with row counts.
DATABASE_URL is set and network is accessibleSET statement_timeout for long-running queriesWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub savethepolarbears/agenthaus-marketplace --plugin data-core