mongodb

mongodb is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 118 tokens per session (4,886 once invoked), scanned A, original, MIT.

A guide to MongoDB, a database that stores data as flexible documents rather than rows in tables.

In plain words
What is it for?
Use it to design document structures, investigate slow queries, build aggregation pipelines, and run multi-document transactions.
Why use it?
It helps you model documents, choose indexes, and write queries that do not scan unnecessary data or exceed MongoDB's limits.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/ericrisco/rsc-harness/mongodb
Any agent
npx skills add ericrisco/rsc-harness --skill mongodb
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/mongodb.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/mongodb)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/mongodb"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/mongodb.svg" alt="Measured on agentmods" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,886 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00118 $0.04886
Opus 5 $0.00059 $0.02443
Sonnet 5 $0.00024 $0.00977
Haiku 4.5 $0.00012 $0.00489

Measured yesterday against content hash bf13001664bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mongodb 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/mongodb/SKILL.md · 343 lines

How it starts

The opening of the file, as written. The whole thing — 343 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MongoDB — modeling, indexing, aggregation, transactions, ops

Engine-level MongoDB 8.2 guidance: model documents for the queries you actually run, pick the index the planner will use, write aggregation pipelines that stay index-eligible, run multi-document transactions with correct retry, and operate/secure a deployment. Driver-agnostic — every example is mongosh shell syntax that maps 1:1 to the official drivers (Node, Python, Go, Java, Rust). This skill owns the server's query and the index it picks, not any ODM's API.

When to use / When NOT to use

When to use:

  • Document modeling: embed vs reference, the 16 MB cap, one-to-many/many-to-many, the subset/extended-reference/bucket/computed/outlier patterns, taming unbounded array growth.
  • Index decisions: single-field, compound (the ESR ordering rule), multikey, partial, TTL, text, wildcard, 2dsphere; and when an index is NOT worth it.
  • Any query that is slow or scans too much; reading explain("executionStats").
  • Aggregation pipelines: stage order so $match/$sort hit an index, $lookup cost, $unwind explosion, $group/$sort memory limits and allowDiskUse, $merge/$out, faceting.
  • Multi-document transactions: sessions, withTransaction retry semantics, read/write concern.
  • Operating/securing: replica set, read preference, write concern, Atlas tier choice, Atlas Search & Vector Search, Queryable Encryption, role-based access, connection-pool knobs.

When NOT to use:

  • Relational schema / SQL / EXPLAIN ANALYZEpostgresdb. Different engine, planner, and concurrency model.
  • ODM/driver API ergonomics (Mongoose pre-save hooks, the Node driver's bulkWrite return shape, updateMany's result object) → that tool's own docs. This skill owns the server query and the index the server picks, not the JS object the driver hands back.
  • App-layer caching as a product (Redis-in-front-of-reads).
  • Cloud-console click-paths — we give the shell command / connection string, not the Atlas UI tour.
  • Picking a vector store across engines (Pinecone vs Weaviate). Atlas Vector Search inside Mongo is in scope; cross-engine selection is not.

Read the full file on GitHub · 343 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 343 lines · 118 tokens per session scan A bf13001664bd

Subscribe to this mod's changes

mongodb is a skill published in the GitHub repository ericrisco/rsc-harness (64 stars, last pushed 2d ago), licensed MIT. It adds 118 tokens to every session and 4,886 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

mongodb

MongoDB - NoSQL document database with flexible schema design, aggregation pipelines, indexing strategies, and Spring Data integration.

bobmatnyc/claude-mpm-skills · 24 tokens

mongodb-expert

Expert-level MongoDB database design, aggregation pipelines, indexing, replication, and production operations. Use when the user mentions NoSQL, database, aggregation, or performance, or when the task involves CRUD Operations, Query Operators, Aggregation Pipeline, or Indexing.

personamanagmentlayer/pcl · 56 tokens

hunt-sqli

Hunting skill for sqli vulnerabilities. Built from 8 public bug bounty reports. Use when hunting sqli on any target.

adriannoes/awesome-agentic-ai · 30 tokens

database-management-patterns

Comprehensive guide for database management patterns covering PostgreSQL and MongoDB including schema design, indexing, transactions, replication, and performance tuning.

manutej/luxor-claude-marketplace · 31 tokens

moai-domain-database

Database specialist covering PostgreSQL, MongoDB, Redis, Oracle, and cloud database platforms (Neon, Supabase, Firestore). Use for schema design, query optimization, indexing strategies, data modeling, or cloud database selection. Cloud vendor guide absorbed from moai-platform-database-cloud.

modu-ai/moai-adk · 64 tokens

hunt-nosqli

Hunt NoSQL Injection — MongoDB operator injection ($where, $regex, $gt, $ne), CouchDB, Redis command injection, auth bypass via NoSQLi, data dump. Use when target uses MongoDB/Mongoose, CouchDB, Redis, or shows NoSQL error messages.

uphiago/recon-skills · 64 tokens