# postgresql-pglite-pro

The postgresql-pglite-pro subagent for Claude Code models PostgreSQL schemas, tunes SQL with EXPLAIN, and configures browser-based Pglite with IndexedDB persistence.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 1357 repo stars
- Author: qdhenry
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/qdhenry/Claude-Command-Suite/tree/HEAD/.claude/agents/data-ai/postgresql-pglite-pro.md
- Updated: 2026-03-01
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/postgresql-pglite-pro

## What it does

This subagent handles relational data architecture in PostgreSQL and client-side deployments with Pglite on WebAssembly. It prepares normalized schemas, formulates database migrations, and rewrites slow queries after inspecting `EXPLAIN ANALYZE` execution plans. Its coverage also includes PostGIS spatial queries, JSONB structures, and window functions.

For web applications, the subagent implements Pglite storage using IndexedDB and configures reactive queries for front-end rendering. Running this agent requires active `context7` and `sequential-thinking` MCP servers in your environment; without those tools, it cannot perform deep reasoning chains or query documentation directly.

## Requirements
- Works with: PostgreSQL

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/postgresql-pglite-pro.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/postgresql-pglite-pro.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/postgresql-pglite-pro.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/qdhenry/Claude-Command-Suite/tree/HEAD/.claude/agents/data-ai/postgresql-pglite-pro.md

## When to use it
- Optimize slow queries by evaluating `EXPLAIN ANALYZE` execution paths
- Design relational schemas with appropriate table constraints and indexes
- Embed Pglite into browser applications with IndexedDB persistence
- Structure database migration scripts and JSONB queries

## Example prompts
- Analyze this `EXPLAIN ANALYZE` output and propose indexing adjustments for our orders table.
- Set up Pglite inside a React web app with persistent storage via IndexedDB.
- Design a relational schema for product listings with attributes stored in JSONB.

## Similar
- [pglite](https://affpapa.org/en/nevibecode/skills/pglite.md) — skill · 156 installs
- [postgresql-database-engineering](https://affpapa.org/en/nevibecode/skills/postgresql-database-engineering.md) — skill · 1800 installs
- [postgresql-best-practices](https://affpapa.org/en/nevibecode/skills/postgresql-best-practices.md) — skill · 1600 installs
- [postgresql](https://affpapa.org/en/nevibecode/skills/devops-skills-postgresql.md) — skill · 469 installs
- [PostgreSQL Database Administration](https://affpapa.org/en/nevibecode/skills/postgresql-database-administration.md) — skill · 454 installs
- [postgresql-expert](https://affpapa.org/en/nevibecode/skills/postgresql-expert.md) — skill · 427 installs

From the same set: [qdhenry/claude-command-suite](https://affpapa.org/en/nevibecode/by/qdhenry/claude-command-suite.md) — 112 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
