mongodb-schema-design

mongodb schema design

mongodb ↓ 3.4k
Claude Code
View source ↗

What it does

  • Designing a new MongoDB schema from scratch
  • Migrating from SQL/relational databases to MongoDB
  • Reviewing existing data models for performance issues
  • Troubleshooting slow queries or growing document sizes
  • Deciding between embedding and referencing
  • Modeling relationships (one-to-one, one-to-many, many-to-many)
  • Implementing tree/hierarchical structures

Requirements & configuration

  • Recommend the best source(s) for their situation, explaining the tradeoffs. For schema design decisions, we often need to combine multiple sources for a complete picture.
  • Atlas Slow Query Logs - Review slow queries (actual queries, not shapes) to identify performance bottlenecks. Captures all reads and writes. Requires Atlas M10+ tier.
  • This is a rough guideline, and whether to embed or reference depends on your specific access patterns, data size, and read/write frequencies. Always verify with your actual workload.
  • ⚠️ Security: Use --readOnly for safety. Remove only if you need write operations.
  • | Write (Requires Approval) | update-many, insert-many, create-collection | I will show the command and wait for your "yes" |

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

mongodb schema design

Source

Repository: https://github.com/mongodb/agent-skills

mongodb-schema-design FAQ

What does the mongodb-schema-design skill do?

MongoDB schema design patterns and anti-patterns. Use when designing data models, reviewing schemas, migrating from SQL, or troubleshooting performance issues caused by schema problems. Triggers on "design schema", "embed vs reference", "MongoDB data model", "schema review", "unbounded arrays", "one-to-many", "tree structure", "16MB limit", "schema validation", "JSON Schema", "time series", "schema migration", "polymorphic", "TTL", "data lifecycle", "archive", "index explosion", "unnecessary indexes", "approximation pattern", "document versioning". Designing a new MongoDB schema from scratch Migrating from SQL/relational databases to MongoDB

What does mongodb-schema-design require?

Recommend the best source(s) for their situation, explaining the tradeoffs. For schema design decisions, we often need to combine multiple sources for a complete picture. Atlas Slow Query Logs - Review slow queries (actual queries, not shapes) to identify performance bottlenecks. Captures all reads and writes. Requires Atlas M10+ tier. This is a rough guideline, and whether to embed or reference depends on your specific access patterns, data size, and read/write frequencies. Always verify with your actual workload. ⚠️ Security: Use --readOnly for safety. Remove only if you need write operations. | Write (Requires Approval) | update-many, insert-many, create-collection | I will show the command and wait for your "yes" |

How do I install mongodb-schema-design?

Run: npx -y skills add https://github.com/mongodb/agent-skills --skill mongodb-schema-design --agent claude-code — the source lives at github.com/mongodb/agent-skills.

Maintain mongodb-schema-design?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[mongodb-schema-design on getagentictools](https://getagentictools.com/skills/mongodb-agent-skills-mongodb-schema-design?ref=badge)
npx agentictools info skills/mongodb-agent-skills-mongodb-schema-design

The second line is the CLI lookup for this page — handy in READMEs and docs.