postgresql-expert

Provide PostgreSQL development guidance for Bun.sql projects.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/lammesen/skills --skill postgresql-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-expert
Source: https://github.com/lammesen/skills/tree/main/.claude/skills/postgresql-expert
Command: npx skills add https://github.com/lammesen/skills --skill postgresql-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides expert PostgreSQL guidance using Bun's native SQL client, covering patterns for queries, schema design, JSON/JSONB operations, full-text search, indexing, PL/pgSQL, pgvector, and performance optimization. It helps developers build scalable, maintainable database access in Bun-powered apps.

Core Features & Use Cases

  • Bun.sql integration: Write and manage PostgreSQL queries directly with Bun.sql for fast, type-safe access.
  • Comprehensive patterns: Access a complete set of database techniques—queries, schemas, JSON/JSONB, FTS, indexing, PL/pgSQL, pgvector, and performance tuning.
  • Use Case: When architecting a Bun-based Node service that talks to PostgreSQL, apply these patterns to implement robust data access, efficient reads, and reliable writes.

Quick Start

Start by connecting Bun.sql to your PostgreSQL database and applying the patterns to build a solid data layer, then iterate with small, safe migrations.

Frequently Asked Questions about postgresql-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize PostgreSQL query performance with Bun.sql?

Query performance optimization with Bun.sql involves indexing strategies, query analysis, and schema design patterns. Apply selective indexing on frequently filtered columns, use EXPLAIN to identify bottlenecks, and leverage Bun.sql's tagged template queries for efficient execution. Pattern selection depends on your workload: read-heavy queries benefit from covering indexes, while write-heavy operations require careful index maintenance.

What's the best way to handle JSON and JSONB operations in PostgreSQL with Bun.sql?

JSONB operations in PostgreSQL with Bun.sql combine native operators with Bun.sql's type-safe query interface. Store structured data as JSONB for indexing and query support, use containment and path operators for filtering, and leverage GIN indexes for performance. This approach handles semi-structured data without schema migration while maintaining query efficiency.

Can I use pgvector with Bun.sql for vector search and embeddings?

Yes, pgvector integrates with Bun.sql to enable vector search and similarity queries on embedding data. Configure pgvector extension, store vectors as native PostgreSQL columns, and query using distance operators through Bun.sql's tagged templates. This pattern supports semantic search, recommendation systems, and similarity-based filtering at scale.

How do I set up connection pooling and transaction handling with Bun.sql in PostgreSQL?

Connection setup and transaction handling with Bun.sql requires configuring Bun's native SQL client with your PostgreSQL database endpoint. Manage transactions using explicit BEGIN/COMMIT patterns in Bun.sql queries, implement error handling for rollback scenarios, and configure connection parameters for your application's concurrency needs.

What PostgreSQL schema design patterns work best with Bun.sql applications?

Schema design for Bun.sql emphasizes normalized structures with strategic denormalization, proper indexing, and JSONB for flexible attributes. Combine relational tables for transactional integrity with JSONB columns for semi-structured data, use appropriate constraints and foreign keys, and plan indexes aligned with your query patterns to balance write performance and query efficiency.

Does full-text search in PostgreSQL work efficiently with Bun.sql?

Full-text search in PostgreSQL with Bun.sql uses tsvector columns and GIN indexes for efficient text queries. Configure search configuration, index text columns as tsvectors, and execute search queries through Bun.sql templates. This pattern enables fast substring and phrase matching without external search services.