Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers MongoDB schema design patterns and anti-patterns, including embed-vs-reference decisions, unbounded arrays, and schema validation.
70% 87%+17 ptsof test cases passed
Passed 20 of 23 test cases with the skill, and 16 of 23 without it.
3 of 3 safety checks passed
16 agent runs
MongoDB documents cannot exceed 16 megabytes. This is a hard BSON limit, not a guideline — writes fail once a document reaches it.
However, practical documents should be much smaller than 16MB. As a rule of thumb, aim for documents under 1MB. Smaller documents mean:
The 16MB ceiling is a safety net, not a design target.
activityLog array receiving entries on every user action: 100,000 events × ~150 bytes ≈ 15MB, growing until writes are rejected.$push rewrites the growing document, and a multikey index fans out to one entry per element.db.products.find({}, {name: 1, price: 1})) still reads the full document from storage.BinData PDF attachment of 10MB+; additional attachments push the document past the limit.Keep the parent document small. Store children in their own collection with a reference field and a compound index for efficient queries.
// Parent stays lean
{ _id: "user123", name: "Alice", activityCount: 48210, lastActivity: ISODate("...") }
// Children in separate collection with efficient index
// Index: { userId: 1, ts: -1 }
{ userId: "user123", action: "login", ts: ISODate("...") }
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.