OpenParable
Skip to content
← Back to skills

Postgresql

Development
postgresql

Postgresql is an Agent Skill for development published in the a5c-ai/babysitter repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

PostgreSQL query optimization, indexing, full-text search, JSONB, and advanced features.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/a5c-ai/babysitter/blob/HEAD/library/specializations/web-development/skills/postgresql/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/postgresql, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

PostgreSQL Skill

Expert assistance for PostgreSQL database design and optimization.

Capabilities

  • Design optimal schemas
  • Create performant indexes
  • Implement full-text search
  • Work with JSONB data
  • Optimize query performance
  • Configure replication

Indexing Patterns

-- B-tree for equality and range
CREATE INDEX idx_users_email ON users(email);

-- GIN for JSONB and arrays
CREATE INDEX idx_posts_tags ON posts USING GIN(tags);

-- Full-text search
CREATE INDEX idx_posts_search ON posts USING GIN(to_tsvector('english', title || ' ' || content));

-- Partial index
CREATE INDEX idx_active_users ON users(created_at) WHERE active = true;

JSONB Operations

-- Query JSONB
SELECT * FROM users WHERE metadata->>'role' = 'admin';

-- Update JSONB
UPDATE users SET metadata = metadata || '{"verified": true}'::jsonb WHERE id = 1;

Target Processes

  • database-design
  • performance-optimization
  • backend-development