databases

Automate PostgreSQL and MongoDB patterns for data modeling, indexing, and migrations.

3|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/opzero1/op1 --skill databases-opzero1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databases
Source: https://github.com/opzero1/op1/tree/main/packages/install/templates/skill/databases
Command: npx skills add https://github.com/opzero1/op1 --skill databases-opzero1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides standardized PostgreSQL and MongoDB patterns for queries, indexing, migrations, and performance tuning to accelerate database work and ensure consistency across projects.

Core Features & Use Cases

  • PostgreSQL essentials: common queries, transaction patterns, and indexing strategies.
  • MongoDB essentials: CRUD operations, indexing, and aggregation guidance.
  • Migration and performance best practices: safe migrations, monitoring, and optimization examples for both systems.

Quick Start

Install and load the databases skill, then use the included SQL and MongoDB snippets to perform typical tasks such as creating tables, adding indexes, upserting data, and running simple analytics.

Frequently Asked Questions about databases

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

FAQPage Schema
How do I write safe PostgreSQL migrations for production databases?

Safe PostgreSQL migrations follow standardized patterns for schema changes, index creation, and data backfills to minimize downtime. This Skill provides migration guidelines that ensure reliable data operations by applying transaction-safe DDL patterns and rollback strategies.

What's the best way to create indexes for MongoDB aggregation pipelines?

MongoDB indexing for aggregation pipelines requires strategic index placement on match-stage fields and sort keys. This Skill delivers indexing guidance and CRUD patterns that optimize aggregation query performance across common analytics pipeline operations.

How do I handle upserts and pagination in PostgreSQL without performance issues?

PostgreSQL upserts and pagination use INSERT ON CONFLICT patterns and keyset pagination to maintain performance at scale. This Skill provides SQL DML snippets that implement reliable upsert logic and efficient pagination queries for backend services.

Can I use standardized SQL DDL patterns for consistent data modeling across projects?

Standardized SQL DDL patterns ensure consistent data modeling by applying reusable table creation and constraint definitions. This Skill supplies common query patterns and DDL snippets that accelerate database work while maintaining structural consistency across PostgreSQL projects.

When do I need JSON handling patterns for MongoDB CRUD operations?

JSON handling patterns for MongoDB are needed whenever documents contain nested structures or arrays requiring query and update operations. This Skill covers MongoDB essentials including CRUD operations, JSON data modeling, and indexing strategies for document-based data operations.

Why does PostgreSQL performance tuning require specific transaction patterns?

PostgreSQL performance tuning relies on specific transaction patterns because proper isolation levels and commit strategies directly impact query throughput. This Skill provides transaction patterns and performance monitoring examples that optimize database operations for backend services.