Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/vaquarkhan/fullstack-development-agent-skills/mongodb-document-modelingnpx skills add vaquarkhan/Fullstack-development-agent-skills --skill mongodb-document-modelinggit clone --depth 1 https://github.com/vaquarkhan/Fullstack-development-agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/vaquarkhan/fullstack-development-agent-skills/mongodb-document-modeling)<a href="https://agentmods.dev/skills/vaquarkhan/fullstack-development-agent-skills/mongodb-document-modeling"><img src="https://agentmods.dev/badge/skills/vaquarkhan/fullstack-development-agent-skills/mongodb-document-modeling.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00036 | $0.00479 |
| Opus 5 | $0.00018 | $0.00239 |
| Sonnet 5 | $0.00007 | $0.00096 |
| Haiku 4.5 | $0.00004 | $0.00048 |
Grade A, and why
mongodb-document-modeling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MongoDB Document Modeling
Use When
- Modeling domains in MongoDB (Atlas or self-hosted)
- Designing embed vs reference, indexes, and aggregation for app queries
- Pairing with Node, Java, Python, or Go services using MongoDB drivers
Workflow
- Map access patterns first — one document shape per dominant query pattern.
- Choose embed vs reference; cap array growth; use bucketing for high-volume subdocs.
- Define JSON Schema validation and compound indexes for hot queries.
- Implement transactions only when cross-document invariants require them.
- Plan sharding keys early if tenant scale warrants it.
- Monitor slow queries and index hit rates in Atlas or profiler.
Required Checks
- Every production query uses supporting index (explain plan reviewed)
- Tenant isolation enforced in query filter — not only application logic
- Unbounded arrays avoided or capped with archival strategy
- Write concern and read concern documented per use case
Examples And Templates
See examples/ for side-by-side good vs bad patterns agents commonly get wrong.
See templates/ for copy-paste starters aligned with this skill.
Decision Framework
- Embed when data is read together and bounded; reference when shared or unbounded.
- Prefer aggregation pipeline for analytics; avoid $lookup storms without indexes.
- Change streams for CDC to search/cache — not polling entire collections.
- Use transactions sparingly; design atomic single-document updates when possible.
Common Rationalizations And Rebuttals
- "Mongo is schema-less." -> Undocumented schema causes production drift; use validation.
- "Indexes slow writes." -> Missing indexes slow reads more; right-size indexes per query.
- "ObjectId everywhere." -> Use UUID strings for client-facing IDs when integrating APIs.
Evidence Pack
- explain() output for top 5 queries
- Index list with rationale
- Schema validation rules
- Tenant isolation test cases
Exit Criteria
- Hot queries are indexed and tenant-scoped
- Document shapes match access patterns without unbounded growth
- Operational monitoring for slow ops is configured
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 61 lines · 36 tokens per session scan A 826993fe9e28
mongodb-document-modeling is a skill published in the GitHub repository vaquarkhan/Fullstack-development-agent-skills (2 stars, last pushed 20d ago), licensed MIT. It adds 36 tokens to every session and 479 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
database-mongodb
Apply MongoDB data-modeling, indexing, and query rules from access patterns. Use when designing schemas, choosing embed vs reference, or tuning MongoDB query behavior.
dbx
DBX CLI for database schema exploration and read-only queries. When the user needs to list connections, explore tables, describe schemas, run queries, or generate AI-friendly schema context from DBX-managed databases. Do NOT use for write operations unless the user explicitly confirms with --allow-writes.
nosqli
NoSQL injection — MongoDB operator injection ($ne, $gt, $where, $regex), CouchDB / Firebase / Redis attack patterns, auth bypass, blind extraction.
evergreen
Evergreen CI infrastructure, configuration validation. Use when modifying .evergreen/ config, preparing to submit changes or understanding the Evergreen test matrix.
prisma-mongodb-upgrade
Decision and migration guide for Prisma ORM MongoDB projects on v6, which have no upgrade path to v7. Use when a MongoDB project asks about upgrading Prisma, when "upgrade to prisma 7" comes up in a project with provider = "mongodb", or when evaluating a move to Prisma Next. Triggers on "upgrade prisma mongodb"…
mongodb
MongoDB operations expert for queries, aggregation pipelines, indexes, and schema design.