MongoDB & Mongoose Database Patterns
Implements optimized MongoDB database layers using Mongoose ODM with full TypeScript support, schema validation, and high-performance aggregation pipelines.
This skill provides Claude with specialized patterns for building robust MongoDB integrations via the Mongoose ODM. It streamlines the creation of schemas with automatic TypeScript type inference, ensures memory-efficient read operations through lean queries, and guides the implementation of complex aggregation pipelines. By enforcing critical practices like correct middleware registration, transaction session management, and Equality-Sort-Range indexing, this skill helps developers avoid common pitfalls such as silent data corruption and connection timeouts in modern Node.js environments.