mongodb-expert

mongodb-expert is an agent for Claude Code from vibeeval/vibecosystem. It costs 23 tokens per session (1,059 once invoked), scanned A, original, MIT.

A MongoDB database specialist for document schemas, aggregation pipelines, indexes, sharding, and transactions. MongoDB stores data as flexible document records rather than rows in tables.

In plain words
What is it for?
Use it to choose between embedding and referencing data, design indexes, build aggregation queries, plan sharding, and handle transactions across documents.
Why use it?
It helps avoid slow queries, unsuitable document structures, oversized records, and scaling problems.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to choose between embedding and referencing data, design indexes, build aggregation queries, plan sharding, and handle transactions across documents.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/vibeeval/vibecosystem/mongodb-expert
Install

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.

Clone the repo
git clone --depth 1 https://github.com/vibeeval/vibecosystem

Made for: Claude Code.

Wrote 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.

agentmods badge for mongodb-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/vibeeval/vibecosystem/mongodb-expert/github.svg)](https://agentmods.dev/agents/vibeeval/vibecosystem/mongodb-expert)
Your own site
<a href="https://agentmods.dev/agents/vibeeval/vibecosystem/mongodb-expert"><img src="https://agentmods.dev/badge/agents/vibeeval/vibecosystem/mongodb-expert/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.

agentmods 80×15 button for mongodb-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/vibeeval/vibecosystem/mongodb-expert"><img src="https://agentmods.dev/badge/agents/vibeeval/vibecosystem/mongodb-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,059 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.01059
Opus 5.5 $0.00009 $0.00424
Sonnet 5.5 $0.00005 $0.00212
Haiku 4.5 $0.00002 $0.00106

Measured 2mo ago against content hash 6a71ce506a00, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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.

agents/mongodb-expert.md · 129 lines

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

Read the full file on GitHub · 129 lines

Changes

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.

  1. 2mo ago First seen · 129 lines · 23 tokens per session scan A 6a71ce506a00

Subscribe to this mod's changes

mongodb-expert is an agent published in the GitHub repository vibeeval/vibecosystem (554 stars, last pushed 18d ago), licensed MIT. It adds 23 tokens to every session and 1,059 once invoked, about $0.0001 per session on Opus 5.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.

Related

mongodb-expert compared with agents from other repositories

mongodb-expert next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mongodb-expertvibeeval/vibecosystemAgent55418d agoMITA23Claude Code
backend-meanendorphin-ai/claude-code-teamsAgent39mo agononeA119Claude Code
db-architect-meanendorphin-ai/claude-code-teamsAgent39mo agononeA124Claude Code
qa-backend-meanendorphin-ai/claude-code-teamsAgent39mo agononeA120Claude Code
data-engineertestdouble/hanAgent36218d agoMITA216Claude Code
mongoose-expert0xfurai/claude-code-subagentsAgent1.0k23d agoMITA24Claude Code
db-mongodb-expertandisab/swe-marketplaceAgent232d agoMITA46Claude Code