MongoDB Query & Index Optimizer

•
8
•

Optimizes MongoDB performance by implementing expert indexing strategies, efficient query patterns, and high-performance aggregation pipelines.

This specialized Claude Code skill provides a comprehensive framework of 46 rules for mastering MongoDB performance. It guides developers through the critical ESR (Equality-Sort-Range) rule for compound indexes, helps diagnose slow operations using explain plan analysis, and offers best practices for specialized indexing like TTL, geospatial, and wildcard indexes. Updated for MongoDB 8.0, it includes advanced patterns for bulk operations and query statistics, ensuring your database remains performant as your data scales.

Key Features

01Full support for MongoDB 8.0 features like bulkWrite and queryStats
02Aggregation pipeline optimization including early matching and projection
03Specialized index support for TTL, Geospatial, Text, and Partial indexes
048 GitHub stars
05Diagnostic patterns for identifying and fixing COLLSCAN and slow queries
06ESR Rule implementation for optimal compound index field ordering

Use Cases

01Fixing slow database performance by identifying missing or inefficient indexes
02Designing complex aggregation pipelines that stay within memory limits
03Automating the review of database queries during the AI-assisted coding process