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/thedecipherist/claude-code-mastery-project-starter-kit/mongodb-rulesnpx skills add TheDecipherist/claude-code-mastery-project-starter-kit --skill mongodb-rulesgit clone --depth 1 https://github.com/TheDecipherist/claude-code-mastery-project-starter-kitWrote 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/thedecipherist/claude-code-mastery-project-starter-kit/mongodb-rules)<a href="https://agentmods.dev/skills/thedecipherist/claude-code-mastery-project-starter-kit/mongodb-rules"><img src="https://agentmods.dev/badge/skills/thedecipherist/claude-code-mastery-project-starter-kit/mongodb-rules.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.00063 | $0.01536 |
| Opus 5 | $0.00032 | $0.00768 |
| Sonnet 5 | $0.00013 | $0.00307 |
| Haiku 4.5 | $0.00006 | $0.00154 |
Grade A, and why
mongodb-rules 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 5d 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 — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MongoDB Data-Access Rules
Non-negotiable for this codebase. From production, not preference.
Driver and connection
- Prefer StrictDB; fall back to the native driver. Use StrictDB when it's installed, otherwise the native MongoDB driver directly. Never Mongoose, either way.
- Data access stays in the adapter, never raw collections scattered through feature code.
- One shared
MongoClientfor the whole app, created once at startup and reused everywhere. The client is the pool. Never create one per request, that exhausts connections and looks like "MongoDB went down" under load. In serverless, declare the client at module scope, outside the handler, so warm invocations reuse it. - URI comes from an env var, never hardcoded. Close the client on
SIGTERM/SIGINT.
Identity and types
_idis anObjectId, not a string. A string_idagainst anObjectIddocument matches nothing, silently. This is the number-one "my id query returns nothing" bug. Wrap incoming ids withnew ObjectId(id); for an$inlist, convert every element.- Never put
_idin the body of any write. Identity goes in the filter; on insert MongoDB generates it. Restating it after a JSON round-trip throws code 66 (immutable field altered). - JSON strips both
ObjectIdandDateto strings. Re-hydrate at the boundary before you query or save, or lookups match nothing and date filters break. Use a parse-time reviver (parseMongo) or a bounded post-parse walk (rehydrateTypes,maxDepth=3). Never patch the globalJSON.parse. Guard withObjectId.isValidand askipKeyslist. - Consider a natural string
_id(email, SKU, slug) to sidestep the type dance entirely, then ids are strings end to end. - Only
_idis indexed by default. Sorting by_idgives roughly creation order for free, but store an explicitcreatedAtwhen creation time matters; don't rely on the ObjectId's embedded timestamp.
Querying
nullis not "missing".{ field: null }matches both explicit null AND absent documents. Use{ field: { $exists: false } }for missing, and{ field: { $ne: null } }for "has a real value" (which excludes both null and missing).- Reads are aggregation pipelines, not
find(). - Arrays-within-arrays aren't queryable past about three levels (
maxDepth=3). If you need to, the model is wrong, flatten it.
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.
- 5d ago First seen · 66 lines · 63 tokens per session scan A bd2f50271a86
mongodb-rules is a skill published in the GitHub repository TheDecipherist/claude-code-mastery-project-starter-kit (337 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 1,536 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-08-30.
Other skills, from other repositories
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.
azure-mgmt-mongodbatlas-dotnet
Manage MongoDB Atlas Organizations as Azure ARM resources using Azure.ResourceManager.MongoDBAtlas SDK. Use when creating, updating, listing, or deleting MongoDB Atlas organizations through Azure Marketplace integration. This SDK manages the Azure-side organization resource, not Atlas clusters/databases directly.
evergreen
Evergreen CI infrastructure, configuration validation. Use when modifying .evergreen/ config, preparing to submit changes or understanding the Evergreen test matrix.
nosqli
NoSQL injection — MongoDB operator injection ($ne, $gt, $where, $regex), CouchDB / Firebase / Redis attack patterns, auth bypass, blind extraction.
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"…
byted-volcengine-mongodb
使用火山引擎 MongoDB Skill,帮助用户完成 MongoDB 相关的实例管理、备份恢复、参数等运维任务,可直接调用 uv run ./scripts/callmongodb.py 脚本获取实时结果。当需要访问管理在火山引擎 MongoDB 实例详细信息时,此 Skill 可以提供方便的接口。.