What problem does it solve?
MongoDB schema design patterns and anti-patterns to prevent performance, cost, and data-integrity issues caused by poor document modeling. It helps engineers choose between embedding and referencing, avoid unbounded arrays and unnecessary indexes, and apply validation and migration strategies that keep production stable.
Core Features & Use Cases
- Schema fundamentals: guidance on the document model, embed vs reference decisions, and document size constraints including the 16MB BSON limit.
- Design patterns & anti-patterns: actionable patterns (approximation, bucket, time-series, archive, attribute, outlier, polymorphic, extended-reference, computed, document-versioning, schema-versioning) and anti-patterns (excessive $lookup, unnecessary collections, unnecessary indexes).
- Verification & migration: step-by-step checks, JSON Schema validation guidance, safe online migration strategies, index audit and safe removal process, and optional MCP-based read-only verification with explicit write approval controls.
- Use Case: review a legacy SQL-derived product catalog and produce a denormalized MongoDB design that minimizes joins, limits index bloat, and preserves query performance while supporting safe rollouts.
Quick Start
Ask the skill to review a specific collection's schema and recommend embed-versus-reference changes, index removals, and validation rules to improve performance and reduce storage cost.