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 skills add hamzabellouch/agent-skills --skill mongodb-schema-and-indexinggit clone --depth 1 https://github.com/hamzabellouch/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/hamzabellouch/agent-skills/mongodb-schema-and-indexing)<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/mongodb-schema-and-indexing"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/mongodb-schema-and-indexing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/mongodb-schema-and-indexing"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/mongodb-schema-and-indexing.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00054 | $0.01510 |
| Opus 5 | $0.00027 | $0.00755 |
| Sonnet 5 | $0.00011 | $0.00302 |
| Haiku 4.5 | $0.00005 | $0.00151 |
Grade A, and why
mongodb-schema-and-indexing 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 9d 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 — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MongoDB Schema Design & Indexing Optimization Guide
Comprehensive architectural reference for MongoDB schema modeling, high-performance indexing, aggregation pipeline tuning, and cluster sharding strategies.
1. Schema Modeling Framework: Embedding vs. Referencing
Decision Matrix
Do entities have a 1:1 or 1:Few relationship?
/ \
YES NO
/ \
Embed data inside parent document Do child documents grow unbounded?
/ \
YES NO
/ \
Use Two-Way Referencing Embed with Subset Pattern
| Factor | Embedded Subdocuments | Referenced Documents (Normalized) |
|---|---|---|
| Query Performance | Fast ($O(1)$ single read, no joins) | Requires $lookup or application-side joins |
| Atomicity | Atomic updates across whole document | Requires Multi-Document Transactions (session) |
| Document Size Limit | Subject to 16 MB BSON hard limit | Multi-document architecture bypasses limit |
| Data Redundancy | Possible duplication across documents | Single source of truth |
2. Advanced MongoDB Design Patterns
2.1 Subset Pattern
- Problem: Large embedded array (e.g., 5,000 product reviews) causes huge document size and slow memory loading.
- Solution: Keep only the 10 most recent reviews in the main product document; store all historical reviews in a separate
reviewscollection.
2.2 Extended Reference Pattern
- Problem: Frequent joins (
$lookup) just to fetch 1 or 2 fields (e.g.,customerNameandcustomerEmailon anOrder). - Solution: Copy immutable or rarely changed target fields directly into the order document:
{ "_id": ObjectId("6697a4..."), "totalAmount": 149.99, "customer": { "id": ObjectId("6697a2..."), "name": "Jane Doe", "email": "[email protected]" } }
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.
- 9d ago First seen · 165 lines · 54 tokens per session scan A bc3b74db6a4a
mongodb-schema-and-indexing is a skill published in the GitHub repository hamzabellouch/agent-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 1,510 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
mongodb
MongoDB document database with aggregation pipeline and Atlas. Use for document storage.
deprecation-and-migration
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset…
mongodb-natural-language-querying
Generate read-only MongoDB queries (find) or aggregation pipelines using natural language, with collection schema context and sample documents. Use this skill whenever the user asks to write, create, or generate MongoDB queries, wants to filter/query/aggregate data in MongoDB, asks "how do I query...", needs help with…
mongodb-atlas-stream-processing
Manages MongoDB Atlas Stream Processing (ASP) workflows. Handles workspace provisioning, data source/sink connections, processor lifecycle operations, debugging diagnostics, and tier sizing. Supports Kafka, Atlas clusters, S3, HTTPS, and Lambda integrations for streaming data workloads and event processing. NOT for…
mongodb-connection
Optimize MongoDB client connection configuration (pools, timeouts, patterns) for any supported driver language. Use this skill when working/updating/reviewing on functions that instantiate or configure a MongoDB client (eg, when calling connect()), configuring connection pools, troubleshooting connection errors…
mongodb-schema-design
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…