PostgreSQL & Database Pro

postgres-pro

Master of SQL queries, Drizzle/Prisma schemas, migrations, and performance indexes.

Where it installs

# .claude/agents/postgres-pro.md
---
name: postgres-pro
description: ...
tools: Read, Write, Edit, Glob, Grep, Skill, Bash, TodoWrite
model: inherit
---

What it does

PostgreSQL & Database Pro is a Cursor agent playbook named postgres-pro. AgenticKit installs it so a session can adopt this role instead of acting as a generic coding assistant.

The postgres-pro agent analyzes slow database queries, designs normalized relational schemas, crafts safe migration scripts, and configures pgvector embeddings for AI features. It protects production databases against locking and N+1 query patterns.

Master of SQL queries, Drizzle/Prisma schemas, migrations, and performance indexes. PostgreSQL database specialist for Cursor providing query optimization, index tuning, Drizzle/Prisma migrations, and connection pooling.

Why it exists

A pile of agent files is not a team. postgres-pro exists so one job, postgresql & database pro, has a written brief, required skills, and a stop condition.

It ships in the Engineering Kit. Skills it must read: PostgreSQL & Drizzle ORM Schema Standards; SaaS Architecture Patterns & Multi-Tenancy; Vector Databases & Embeddings Storage; Resilient Error Handling & Fault Tolerance. Commands that adopt this role: /build-api: API Endpoint & Route Generator; /audit: Codebase Quality & Security Auditor; /ai-feature: AI Integration & Vector Pipeline Builder.

When to use it

  • Optimizing complex SQL queries and slow database transactions
  • Writing reliable schema migrations in Drizzle or Prisma
  • Setting up Row Level Security (RLS) in Supabase or PostgreSQL

When not to use it

  • Do not ask postgres-pro to do a different role's job. If you need a launch post, switch agents.
  • Do not keep the same chat after this agent has finished its artifact. Start a reviewer in a new thread.
  • Do not invoke every agent in the kit for a small change.

Example workflow

  1. Install the Engineering Kit so .cursor/agents/postgres-pro is on disk.
  2. Run /build-api: API Endpoint & Route Generator, or start a chat and tell Cursor to adopt the postgres-pro role.
  3. The agent should read: PostgreSQL & Drizzle ORM Schema Standards; SaaS Architecture Patterns & Multi-Tenancy; Vector Databases & Embeddings Storage; Resilient Error Handling & Fault Tolerance.
  4. It produces the artifact for this role only, then stops.
  5. A different agent or you review. Same-chat self-review is not a review.

Example usage

Example: "You are postgres-pro. Optimizing complex SQL queries and slow database transactions. Read postgres-drizzle before you edit."

Or let the pipeline invoke it: /build-api: API Endpoint & Route Generator.

Capabilities you should actually see: Drizzle ORM & Prisma schema generation and type safety

Example output

  • postgres-pro should leave files or a written verdict, not a vibe check. Drizzle ORM & Prisma schema generation and type safety EXPLAIN ANALYZE query plan diagnostics and composite indexing
  • Engineering agents should touch the slice they were given (schema, route, test, or review note) and nothing else.

Best practices

  • Drizzle ORM & Prisma schema generation and type safety
  • EXPLAIN ANALYZE query plan diagnostics and composite indexing
  • Safe zero-downtime database migrations with rollback plans
  • Vector indexing using pgvector (IVFFlat & HNSW)
  • One role per chat unless a command is explicitly orchestrating a sequence.

Common mistakes

  • Using postgres-pro as a synonym for 'the Cursor agent'. It is a brief, not the product.
  • Skipping the required skills and hoping the role name is enough.
  • Letting the writer approve its own PR.
  • Invoking this agent and three unrelated ones in the same prompt.

Frequently asked questions

  • What is the postgres-pro Cursor agent?
    PostgreSQL & Database Pro: PostgreSQL database specialist for Cursor providing query optimization, index tuning, Drizzle/Prisma migrations, and connection pooling.
  • When should I invoke postgres-pro?
    Optimizing complex SQL queries and slow database transactions Writing reliable schema migrations in Drizzle or Prisma Setting up Row Level Security (RLS) in Supabase or PostgreSQL
  • What skills does postgres-pro use?
    PostgreSQL & Drizzle ORM Schema Standards; SaaS Architecture Patterns & Multi-Tenancy; Vector Databases & Embeddings Storage; Resilient Error Handling & Fault Tolerance
  • How do I run postgres-pro in Cursor?
    Run /build-api: API Endpoint & Route Generator or /audit: Codebase Quality & Security Auditor or /ai-feature: AI Integration & Vector Pipeline Builder, or start a chat and adopt the postgres-pro role.
  • Is postgres-pro the same as Cursor's built-in Agent?
    No. Cursor Agent is the product harness. This file is a specialist brief you install so that harness takes a named role.

Install postgres-pro with the rest of the team

46 agents, 61 skills, and 47 slash commands, installed into .cursor/ and .claude/. Engineering and marketing kits, one license.