moai-domain-database

Design schemas, optimize queries, and configure PostgreSQL, MongoDB, Redis, Oracle, and cloud databases.

Updated Aug 29, 2026
One-click install
npx skills add https://github.com/Seung-zedd/secure-file-upload --skill moai-domain-database-seung-zedd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: moai-domain-database
Source: https://github.com/Seung-zedd/secure-file-upload/tree/main/.claude/skills/moai-domain-database
Command: npx skills add https://github.com/Seung-zedd/secure-file-upload --skill moai-domain-database-seung-zedd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing the right database, designing schemas, and tuning queries across relational, document, in-memory, and cloud platforms requires deep, scattered expertise. This Skill consolidates database patterns for PostgreSQL, MongoDB, Redis, Oracle, and cloud platforms (Neon, Supabase, Firestore) into one reference so you can make correct design and optimization decisions. ## Core Features & Use Cases - Schema Design & Migrations: Model relational and document schemas with reversible migration discipline and indexing strategies. - Query & Performance Optimization: Run EXPLAIN ANALYZE workflows, optimize aggregation pipelines, and tune connection pools and caching layers. - Cloud Database Selection: Compare Neon, Supabase, and Firestore with a decision guide covering branching, RLS, pgvector, and offline sync. - Use Case: When building a multi-tenant app, use the Skill to choose Supabase for Row-Level Security, write the RLS policy, and verify indexes exist for every filtered column. ## Quick Start Ask the agent to design a PostgreSQL schema with indexes and a migration file for your application's data model.

Frequently Asked Questions about moai-domain-database

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

FAQPage Schema
How do I optimize a slow PostgreSQL query?▼

Run EXPLAIN ANALYZE BUFFERS on the query to inspect the actual execution plan, then add indexes for columns used in WHERE, JOIN, or ORDER BY clauses. The Skill's QueryAnalyzer pattern generates optimization suggestions from the plan output.

Should I use Neon, Supabase, or Firestore for my app?▼

Choose Neon for serverless PostgreSQL with branching and scale-to-zero, Supabase for Row-Level Security, pgvector search, and real-time subscriptions, or Firestore for mobile-first apps needing offline sync. The Skill includes a decision table mapping needs to platforms.

Does MongoDB schema design matter if it is schemaless?▼

Yes. Schemaless does not mean designless; document structure decisions affect every query and index. The Skill covers document modeling, validation, aggregation pipelines, and sharding strategies for MongoDB 6.0+.

Why do schema changes without migrations cause problems?▼

Schema changes without migration files are unreproducible across environments and teammates. Every change needs a reversible migration script, and adding a NOT NULL column requires a default value or backfill to avoid breaking existing inserts.

Can I use Redis for more than caching?▼

Yes. The Skill covers Redis for distributed locking, pub/sub messaging, streams, real-time analytics, and advanced structures like HyperLogLog and Geo, plus clustering and high-availability configuration.