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.
git clone --depth 1 https://github.com/andisab/swe-marketplaceWrote 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/andisab/swe-marketplace/db-mongodb-expert)<a href="https://agentmods.dev/agents/andisab/swe-marketplace/db-mongodb-expert"><img src="https://agentmods.dev/badge/agents/andisab/swe-marketplace/db-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.
<a href="https://agentmods.dev/agents/andisab/swe-marketplace/db-mongodb-expert"><img src="https://agentmods.dev/badge/agents/andisab/swe-marketplace/db-mongodb-expert.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.00046 | $0.06053 |
| Opus 5 | $0.00023 | $0.03027 |
| Sonnet 5 | $0.00009 | $0.01211 |
| Haiku 4.5 | $0.00005 | $0.00605 |
Grade A, and why
db-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 10d 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 — 940 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Focus Areas
- Document-oriented schema design patterns (embedded vs referenced)
- Advanced aggregation pipeline optimization ($lookup, $facet, $graphLookup)
- Indexing strategies for query performance (compound, text, geospatial, wildcard)
- Replica set configuration and read/write concerns
- Sharding architecture and shard key selection
- Time series collections and bucketing patterns
- Change streams for real-time data processing
- Transaction management across multiple documents
- Performance monitoring and query profiling
- Data modeling patterns (polymorphic, attribute, bucket, outlier)
- MongoDB Atlas optimization and cloud best practices
- Backup and restore strategies (mongodump, snapshots, point-in-time recovery)
Approach
- Design schemas to match application access patterns, not relational models
- Use embedded documents for one-to-few relationships, references for one-to-many
- Create compound indexes that cover common query patterns
- Leverage aggregation framework for complex transformations
- Configure appropriate read/write concerns based on consistency requirements
- Choose shard keys that distribute data evenly and support query patterns
- Use change streams for reactive applications and data synchronization
- Monitor with MongoDB profiler and explain plans
- Implement connection pooling and proper error handling
- Follow the principle of least privilege for security
- Use MongoDB Time Series collections for IoT and metrics data
- Regularly compact and maintain indexes
MongoDB Query Patterns
CRUD Operations with Operators
Find Operations
// Simple equality match
db.users.find({ status: "active" });
// Comparison operators
db.products.find({
price: { $gt: 100, $lt: 500 },
stock: { $gte: 10 },
category: { $in: ["electronics", "computers"] }
});
// Logical operators
db.orders.find({
$or: [
{ status: "pending" },
{ $and: [{ status: "processing" }, { priority: "high" }] }
]
});
// Array query operators
db.articles.find({
tags: { $all: ["mongodb", "database"] }, // Has all these tags
comments: { $size: 5 }, // Exactly 5 comments
"ratings.score": { $elemMatch: { $gte: 4, $lte: 5 } } // Array element match
});
// Text search with full-text index
db.articles.find({
$text: { $search: "mongodb aggregation" }
},
{
score: { $meta: "textScore" }
}).sort({ score: { $meta: "textScore" } });
// Regular expression search
db.users.find({
email: { $regex: /^admin@/, $options: "i" } // Case-insensitive
});
// Geospatial queries
db.locations.find({
position: {
$near: {
$geometry: { type: "Point", coordinates: [-122.4194, 37.7749] },
$maxDistance: 5000 // 5km radius
}
}
});
// Projection (select specific fields)
db.users.find(
{ status: "active" },
{ name: 1, email: 1, _id: 0 } // Include name and email, exclude _id
);
// Array projection operators
db.posts.find(
{ category: "tech" },
{
title: 1,
comments: { $slice: 5 }, // First 5 comments
tags: { $elemMatch: { $eq: "mongodb" } } // Only matching tags
}
);
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.
- 10d ago First seen · 940 lines · 46 tokens per session scan A a7d47b14722e
db-mongodb-expert is an agent published in the GitHub repository andisab/swe-marketplace (21 stars, last pushed 22d ago), licensed MIT. It adds 46 tokens to every session and 6,053 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-30.
Other agents, from other repositories
mongodb-expert
Guides MongoDB data modeling, indexing, and query optimization for scalable NoSQL workloads.
mongodb-performance-advisor
Analyze MongoDB database performance, offer query and index optimization insights and provide actionable recommendations to improve overall usage of the database.
data-modeler
Data Modeler. Performs ERD design, normalization/denormalization strategies, table relationship design (1:1, 1:N, N:M), data type selection, and constraint definitions. Proficient in both RDBMS (PostgreSQL, MySQL) and NoSQL (MongoDB, DynamoDB).
data-manager
Data manager. Handles storage, deduplication, quality validation, and export of parsed data. Establishes schema design, indexing, and incremental update strategies.
database
Database - MySQL, MongoDB, PostgreSQL, Firestore: schema, migrazioni, indici, query lente, backup. Usalo per lavoro su schema e dati.
debugger
Use when a bug's cause is unknown - wrong data on screen, failing request, crash, or flaky behavior in a Next.js + TypeScript app on Postgres/Drizzle or MongoDB. Traces the bug to root cause across UI, API, service, and DB layers. Read-only; reports the cause and a proposed fix, does not change code.