moai-domain-database

Analyze and optimize PostgreSQL, MongoDB, and Redis database schemas and migrations.

1.2k|214|Updated Sep 16, 2025
One-click install
npx skills add https://github.com/modu-ai/moai-adk --skill moai-domain-database
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-domain-database
Source: https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-domain-database
Command: npx skills add https://github.com/modu-ai/moai-adk --skill moai-domain-database

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes examples (resource) and references (resource) components.

What problem does it solve?

Database management, from initial design to ongoing optimization and migration, is complex and error-prone. This Skill automates best practices, reduces manual errors, and ensures your data infrastructure is robust and performant.

Core Features & Use Cases

  • Schema Optimization: Automatically analyze and suggest improvements for database schemas.
  • Indexing Strategies: Recommend and and implement optimal indexing to boost query performance.
  • Migration Management: Guide through database migrations, ensuring data integrity and minimal downtime.
  • Use Case: When you need to review an existing database schema for performance bottlenecks, this Skill can identify missing indexes or inefficient table structures and propose solutions.

Quick Start

Example: Analyze a PostgreSQL schema file

(Assuming 'Read' tool access to schema files)

Read src/database/schema.sql

Claude will then provide optimization suggestions.

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 database schema for better query performance?

Schema optimization involves analyzing table structures, identifying missing indexes, and refactoring inefficient designs. This Skill automatically reviews your PostgreSQL, MongoDB, or Redis schemas, detects bottlenecks like missing indexes or poor partitioning, and recommends specific improvements to boost query speed and reduce resource usage.

What indexing strategies should I use to speed up database queries?

Indexing strategies depend on query patterns and data volume. This Skill recommends optimal index placement across relational, document, and in-memory databases, implementing covering indexes, composite indexes, and partitioning to accelerate lookups while minimizing write overhead and storage costs.

How do I manage database migrations without downtime?

Database migrations require careful sequencing to maintain data integrity and availability. This Skill guides you through migration workflows, handles schema changes across PostgreSQL, MongoDB, and Redis, and ensures minimal downtime by coordinating version transitions and validating data consistency throughout the process.

Can I use this with multiple database types at once?

Yes. This Skill handles polyglot persistence across PostgreSQL (relational), MongoDB (document), and Redis (in-memory), unifying access patterns and optimization strategies. It supports hybrid architectures, cross-system caching, and multi-database routing for enterprise backends requiring diverse storage engines.

What performance tuning techniques work across different databases?

Common tuning spans indexing, partitioning, aggregation strategies, and caching. This Skill applies unified patterns adapted to each database's strengths—SQL optimization for PostgreSQL, document aggregation for MongoDB, and cache invalidation for Redis—ensuring consistent performance across your data architecture.

How do I monitor and troubleshoot database performance issues?

Monitoring includes tracking query execution, index usage, and resource contention. This Skill provides operational best practices, configuration guidance, and tooling to identify slow queries, detect missing indexes, and validate data synchronization across PostgreSQL, MongoDB, and Redis deployments.