mongodb/mongodb-schema-design
Design efficient document schemas with validation and indexing patterns
Description
mongodb-schema-design is an agent skill built on MongoDB's own schema design patterns and anti-patterns. It gives a coding assistant the decision guidance for document schemas: whether to embed related data or reference it from another collection, the 16MB document size limit, schema validation rules, and eleven data modeling patterns such as bucket, polymorphic and time series. It includes a decision framework for relationships and trade-off tables for each pattern, so the reasoning behind a schema is written down. The skill can also use the MongoDB MCP server to inspect live collections, which lets it base advice on the data you actually store. Schema problems are often the cause of MongoDB performance issues, so the skill focuses on those choices rather than query tuning alone. Typical tasks include deciding whether to embed order line items in the order or keep them in a separate collection, and moving a normalized PostgreSQL users, profiles and addresses design into MongoDB documents. Install it with the command shown on this page.…
Highlights
- Embed-versus-reference decision framework
- 11 data modeling patterns
- 16MB document limit guidance
- Schema validation rules
- Optional live collection inspection
Ratings & Reviews
No ratings yet
Be the first to rate mongodb/mongodb-schema-design.
People also visit
mongodb/mongodb-schema-design FAQ
What does this skill do?
It guides a coding assistant through MongoDB schema decisions, including embedding versus referencing and the common data modeling patterns.
How do I install it?
Run npx skills add https://github.com/mongodb/agent-skills --skill mongodb-schema-design, or paste the skill link into your coding assistant and ask it to install the skill.
Which patterns are covered?
The page names bucket, polymorphic and time series patterns among eleven in total.
Can it look at my live data?
Optionally, through the MongoDB MCP server, so it can inspect the collections you have.
What are the best mongodb/mongodb-schema-design alternatives?
Popular alternatives to mongodb/mongodb-schema-design include mongodb-schema-design, mongodb-skills and mongodb. See all mongodb/mongodb-schema-design alternatives













