data-mongodb

Identify MongoDB drivers and ODMs, then catalog schemas and indexes.

2|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/nholder88/ai-agent-workflows --skill data-mongodb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-mongodb
Source: https://github.com/nholder88/ai-agent-workflows/tree/main/skills/data-mongodb
Command: npx skills add https://github.com/nholder88/ai-agent-workflows --skill data-mongodb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MongoDB schema design, aggregation pipelines, index strategy, TTL indexes, explain plan analysis, and performance diagnosis for document databases. USE FOR: MongoDB queries, aggregation pipelines, schema design (embed vs reference), index strategy, performance tuning.

Core Features & Use Cases

  • Detect MongoDB usage in a project and identify drivers/ODMs (e.g., mongoose, native mongodb, pymongo).
  • Catalog schemas, indexes, validators, references, and common N+1 patterns to inform design decisions.
  • Analyze requests/operations with explain plans and recommend indexes and schema adjustments to improve performance.

Quick Start

Analyze a MongoDB project and produce a schema design and indexing plan.

Frequently Asked Questions about data-mongodb

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

FAQPage Schema
How do I optimize MongoDB schema design for query performance?

Optimizing MongoDB schema design involves analyzing query patterns to choose between embedding or referencing documents. This Skill catalogs your schemas, validators, and indexes to recommend a structured schema design that improves query performance.

How do I analyze MongoDB explain plans to diagnose slow queries?

Analyzing MongoDB explain plans diagnoses slow queries by revealing execution stages and index usage. This Skill examines your operations and explain plans to identify performance bottlenecks and recommend targeted query optimizations.

Does this MongoDB optimization tool work with Mongoose and Prisma?

Yes, this MongoDB optimization tool works with Mongoose and Prisma. It detects the specific MongoDB driver or ODM used in your project from configuration files to accurately catalog models and tailor the indexing strategy.

When should I use TTL indexes in MongoDB?

TTL indexes in MongoDB should be used when you need to automatically remove expired documents from a collection. This Skill incorporates TTL index strategy alongside schema design and aggregation pipeline analysis to manage data lifecycle.

What is the best way to fix N+1 query patterns in MongoDB?

The best way to fix N+1 query patterns in MongoDB is to catalog common N+1 occurrences and adjust schema references or use aggregation pipelines. This Skill identifies these patterns to inform design decisions and recommend schema adjustments.

How do I build an indexing strategy for MongoDB aggregation pipelines?

Building an indexing strategy for MongoDB aggregation pipelines requires analyzing pipeline stages to ensure early filtering. This Skill analyzes your aggregation requests and recommends specific indexes and schema adjustments to improve performance.