Borrowing it
Nothing to install: this file belongs to TheDecipherist/claude-code-mastery-project-starter-kit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/TheDecipherist/claude-code-mastery-project-starter-kit/main/.claude/skills/mongodb-rules/SKILL.mdgit 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/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/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="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00063 | $0.01536 |
| Opus 5.5 | $0.00025 | $0.00614 |
| Sonnet 5.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 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.
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.
- 2mo 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 (342 stars, last pushed 4mo ago), licensed MIT. It adds 63 tokens to every session and 1,536 once invoked, about $0.0003 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-08-30.
mongodb-rules compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mongodb-rulesTheDecipherist/claude-code-mastery-project-starter-kit | Skill | 342 | 4mo ago | MIT | A | 63 | Claude Code |
| dbxt8y2/dbx | Skill | 29k | yesterday | Apache-2.0 | A | 74 | Claude Code, Codex |
| azure-mgmt-mongodbatlas-dotnetmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 64 | Claude Code |
| nosqliPurpleAILAB/Decepticon | Skill | 6.5k | 8d ago | Apache-2.0 | A | 38 | Claude Code, Codex |
| byted-volcengine-mongodbbytedance/agentkit-samples | Skill | 484 | today | Apache-2.0 | A | 82 | Claude Code, Codex |
| commerce-app-storageadobe/skills | Skill | 319 | yesterday | Apache-2.0 | A | 78 | Claude Code |
| mongodb-connectionfcakyon/claude-codex-settings | Skill | 1.2k | yesterday | Apache-2.0 | A | 122 | Claude Code |