mongodb-guideline

Provide MongoDB schema design, query optimization, indexing, and shard key guidelines.

12|4|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TeiNam/kiro-with-harness --skill mongodb-guideline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mongodb-guideline
Source: https://github.com/TeiNam/kiro-with-harness/tree/main/skills/mongodb-guideline
Command: npx skills add https://github.com/TeiNam/kiro-with-harness --skill mongodb-guideline

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a detailed guide to optimize MongoDB schema design, query performance, and indexing strategies, solving common challenges in MongoDB database management.

Core Features & Use Cases

  • Schema Design: Best practices for schema design, including embedding vs. referencing, document structure, and avoiding global queries.
  • Query Optimization: Techniques for optimizing queries, including indexing strategies, aggregation pipeline optimization, and performance checklist.
  • Index Strategy: Guide to creating effective indexes, understanding index types, and avoiding common pitfalls.
  • Shard Key Selection: Best practices for selecting shard keys and understanding hashed vs. range sharding.
  • Use Case: For a developer working on a MongoDB database, this Skill helps in designing efficient and scalable database structures, optimizing queries, and avoiding performance bottlenecks.

Quick Start

Apply the MongoDB schema design guidelines to your project and optimize your queries by following the provided indexing strategies.

Frequently Asked Questions about mongodb-guideline

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

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

MongoDB schema design optimization involves choosing between embedding vs. referencing document structures and avoiding global queries to ensure database scalability and query performance.

What are the best indexing strategies to avoid MongoDB query bottlenecks?

MongoDB indexing strategies require creating effective indexes, understanding available index types, and avoiding common pitfalls to prevent performance bottlenecks during query execution.

How does shard key selection impact MongoDB database scalability?

Shard key selection impacts MongoDB scalability by determining data distribution, requiring evaluation of hashed vs. range sharding approaches to maintain optimal query performance across clusters.

When should I use embedding vs. referencing in MongoDB document structure?

Embedding vs. referencing in MongoDB document structure depends on data access patterns, where embedding improves read performance for related data and referencing manages large or frequently updated datasets.

What is the best way to optimize the MongoDB aggregation pipeline?

MongoDB aggregation pipeline optimization utilizes indexing strategies and performance checklists to streamline data processing stages and reduce query execution overhead.