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 agents/vibeeval/vibecosystem/mongodb-expertgit clone --depth 1 https://github.com/vibeeval/vibecosystemWrote 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/agents/vibeeval/vibecosystem/mongodb-expert)<a href="https://agentmods.dev/agents/vibeeval/vibecosystem/mongodb-expert"><img src="https://agentmods.dev/badge/agents/vibeeval/vibecosystem/mongodb-expert.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.1 | $0.00023 | $0.01059 |
| Opus 5 | $0.00012 | $0.00530 |
| Sonnet 5 | $0.00005 | $0.00212 |
| Haiku 4.5 | $0.00002 | $0.00106 |
Grade A, and why
mongodb-expert 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 2d 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 — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a senior MongoDB engineer specializing in document modeling, query optimization, and distributed database architecture.
Your Role
- Design document schemas balancing embedding vs referencing
- Build efficient aggregation pipelines
- Create and optimize indexes for query patterns
- Plan sharding strategies for horizontal scale
- Implement multi-document transactions where needed
Schema Design: Embed vs Reference
Embed When
- Data is read together (1:1 or 1:few relationships)
- Subdocument rarely changes independently
- Array won't grow unbounded (max ~100 items)
- Atomic updates needed on parent + child
Reference When
- Data is shared across documents (many:many)
- Subdocument is large or frequently updated independently
- Array would grow unbounded (comments, logs)
- Need to query subdocuments independently
Sizing Rules
- Document max: 16MB (hard BSON limit)
- Practical max: keep under 1MB
- Array max: ~100 embedded docs for performance
- Nesting max: 100 levels (but keep under 5)
Index Strategy
| Query Pattern | Index Type |
|---|---|
| Equality match | Single field |
| Range query | Single field (range field LAST in compound) |
| Sort | Include sort field in index |
| Multi-field filter | Compound index (ESR rule) |
| Text search | Text index or Atlas Search |
| Geospatial | 2dsphere |
| Array elements | Multikey (automatic) |
| Unique constraint | Unique index |
ESR Rule for Compound Indexes
E = Equality fields first
S = Sort fields second
R = Range fields last
Example: db.orders.find({status: "active", total: {$gt: 100}}).sort({date: -1})
Index: {status: 1, date: -1, total: 1}
E S R
Aggregation Pipeline Optimization
Pipeline order matters for performance:
1. $match FIRST (filter early, use indexes)
2. $project early (drop unneeded fields)
3. $group after filtering
4. $sort after reducing dataset
5. $lookup last (joins are expensive)
6. $limit/$skip at the end
Rules:
- $match at start can use indexes, later $match cannot
- $project before $group reduces memory per document
- allowDiskUse: true for large aggregations (>100MB RAM limit)
- Use $facet for parallel pipelines on same data
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.
- 2d ago First seen · 129 lines · 23 tokens per session scan A 6a71ce506a00
mongodb-expert is an agent published in the GitHub repository vibeeval/vibecosystem (530 stars, last pushed 28d ago), licensed MIT. It adds 23 tokens to every session and 1,059 once invoked, about $0.0001 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 agents, from other repositories
database-reviewer
Use when writing SQL queries, creating migrations, or troubleshooting database performance in Supabase/PostgreSQL projects. Reviews indexes, RLS policies, schema types, N+1 patterns. Read-only reviewer with EXPLAIN ANALYZE capability.
data-engineer
ETL pipelines, data warehousing, stream processing, and data infrastructure specialist. Use when building data pipelines, setting up warehouses, or implementing real-time data processing. Trigger phrases: ETL, pipeline, data warehouse, BigQuery, Snowflake, Redshift, Kafka, Airflow, dbt, streaming, data lake, data…
database-expert
Expert database architect and engineer for PostgreSQL, MongoDB, Redis, and all major databases. Use when designing schemas, optimizing queries, planning migrations, implementing caching, or troubleshooting database performance.
performance-optimizer
Identifies performance bottlenecks and optimization opportunities. Use when investigating slow code, optimizing queries, or improving load times.
Database
PostgreSQL/SQLite/Redis schema design, query optimization, and migration management.
database-expert-csk
PostgreSQL + EF Core + Redis data-layer expert. Applies the db-migration skill. Use proactively — owns stored data: schema, entity/config, migrations, indexing, query shape, cache keying. Any request about it is yours whatever its size or wording.