mongodb-expert

Diagnose and optimize MongoDB deployments across standalone, replica set, and sharded clusters.

Updated Oct 17, 2025
One-click install
npx skills add https://github.com/duynhne/monitoring --skill mongodb-expert-duynhne
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mongodb-expert
Source: https://github.com/duynhne/monitoring/tree/main/.agent/skills/mongodb-expert
Command: npx skills add https://github.com/duynhne/monitoring --skill mongodb-expert-duynhne

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams diagnose and optimize MongoDB deployments to improve performance, reliability, and scalability.

Core Features & Use Cases

  • Document modeling guidance (embed vs reference), indexing strategies (ESR rule, compound indexes), and sharding patterns for balanced workloads.
  • Pipeline and query optimization through early filtering, projection, and covering indexes.
  • Operational guidance for replica sets, read preferences, connection pools, and transaction practices across standalone, replica set, and sharded clusters.

Quick Start

Run a baseline health check on your MongoDB deployment, apply an initial set of pattern-based optimizations, and validate improvements with explain plans and profiling.

Frequently Asked Questions about mongodb-expert

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

FAQPage Schema
How do I optimize slow MongoDB queries using indexing and explain plans?

To optimize slow MongoDB queries, apply the ESR rule for compound indexes and validate improvements using explain plans. This Skill provides structured diagnostics and best-practice recommendations for query optimization through early filtering, projection, and covering indexes.

What is the best way to design MongoDB document models and sharding patterns for balanced workloads?

Designing MongoDB document models involves choosing between embed versus reference strategies, while sharding patterns ensure balanced workloads. This Skill delivers best-practice guidance for both document modeling and sharding to improve deployment scalability.

How do I configure MongoDB replica sets and connection pools for better reliability?

Configure MongoDB replica sets and connection pools by applying operational guidance for read preferences and transaction practices. This Skill helps diagnose deployments to improve reliability across standalone, replica set, and sharded clusters.

Can I use this Skill to diagnose standalone MongoDB deployments or does it only support sharded clusters?

You can use this Skill to diagnose standalone MongoDB deployments as well as replica set and sharded clusters. It satisfies the need for structured diagnostics and best-practice recommendations across all these deployment configurations.

Why does my MongoDB aggregation pipeline perform poorly and how can I optimize it?

Your MongoDB aggregation pipeline may perform poorly due to late filtering or missing covering indexes. This Skill provides pipeline optimization techniques using early filtering, projection, and covering indexes to improve performance.

What are the limitations or destructive operations to avoid during MongoDB performance tuning?

During MongoDB performance tuning, you must avoid destructive operations while applying pattern-based optimizations. This Skill provides ready-to-run code examples and diagnostics specifically designed to improve performance safely.