Agent skill

Mongodb

by ericrisco in ericrisco/rsc-harness

A skill your agent uses when modeling MongoDB documents (embed versus reference, the 16MB cap, bucket and subset patterns), choosing or fixing indexes (compound order by the ESR rule, partial, TTL…

MITAuto-check passedDatabases

Install Mongodb

skills CLI
$ npx skills add ericrisco/rsc-harness --skill mongodb -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ericrisco/rsc-harness mongodb --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mongodb .claude/skills/mongodb && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mongodb
GitHub stars
156
Token cost
~4.8k tokens
SKILL.md length
1,898 words
Files
7 (incl. scripts, references)
Skills in repo
229
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when modeling MongoDB documents (embed versus reference, the 16MB cap, bucket and subset patterns), choosing or fixing indexes (compound order by the ESR rule, partial, TTL…

  • Works in 10 steps: Design for the queries you run, not the… → Never let an array grow unbounded inside… → The hard ceiling is 16 MB per document.… → …
  • Modeling MongoDB documents (embed versus reference
  • SKILL.md covers When to use / When NOT to use, Non-negotiables, Decision rules and Copy-paste patterns, plus 5 more sections
  • Runs Shell scripts from its folder; calls node

What it does

Mongodb is an agent skill from ericrisco/rsc-harness. Use when modeling MongoDB documents (embed versus reference, the 16MB cap, bucket and subset patterns), choosing or fixing indexes (compound order by the ESR rule, partial, TTL, multikey, reading explain), writing aggregation pipelines that stay index-eligible, running multi-document transactions with retry, or operating and securing a deployment (replica set, read/write concern, Atlas tiers, Vector Search, Queryable Encryption). MongoDB 8.2, driver-agnostic. NOT relational schema, SQL or EXPLAIN ANALYZE (that is…

Its SKILL.md is about 4.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts and reference files (for example `evals/README.md`, `evals/cases.yaml` and `references/aggregation.md`).

It sits in Databases, covering NoSQL databases, Vector databases and Query optimization. It works with MongoDB and SQL. The repository describes itself as: Your agent invents things because it has no memory, and can't touch your database because it has no arms. rsc is the meta-harness that gives it both, plus the trade to know the… The licence is MIT.

When your agent uses it

  • Modeling MongoDB documents (embed versus reference
  • Bucket and subset patterns)
  • Fixing indexes (compound order by the ESR rule
  • Reading explain)

Example prompts

  • “/mongodb”

Requirements

  • A Bash shell

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. Design for the queries you run, not the shape of your data. The schema is the set of
  2. Never let an array grow unbounded inside a document. It walks toward the 16 MB cap, bloats
  3. The hard ceiling is 16 MB per document. If a one-to-many can exceed it, you reference; there
  4. A single-document write is already atomic. Reach for a multi-document transaction only when
  5. Every transaction retries on the TransientTransactionError label (and commit retries on
  6. Index by ESR: Equality fields, then the Sort field, then Range fields. This order lets one
  7. Read explain("executionStats") before and after adding an index — confirm IXSCAN, not
  8. w:"majority" for money and state transitions, read concern "majority"/"snapshot" when a
  9. Money is Decimal128 (NumberDecimal("...")), never a JS double. Binary floats drift;
  10. Never store a secret in plaintext. Use Queryable Encryption / client-side field-level

What it can do on your machine

Read from SKILL.md and the folder at commit 92fde8f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mongodb loads about 4.8k tokens when it runs, and up to ~8.9k if it reads all its reference files. Until then it costs about 135 tokens; SKILL.md has 1,898 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~135
When it runs · the whole SKILL.md, loaded when a task matches
~4.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ericrisco/rsc-harness at commit 92fde8f, republished under its MIT licence (© ericrisco). 1,898 words, ~4,815 tokens.

Download SKILL.mdSave it as .claude/skills/mongodb/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
mongodb
description
Use when modeling MongoDB documents (embed versus reference, the 16MB cap, bucket and subset patterns), choosing or fixing indexes (compound order by the ESR rule, partial, TTL, multikey, reading explain), writing aggregation pipelines that stay index-eligible, running multi-document transactions with retry, or operating and securing a deployment (replica set, read/write concern, Atlas tiers, Vector Search, Queryable Encryption). MongoDB 8.2, driver-agnostic. NOT relational schema, SQL or EXPLAIN ANALYZE (that is `postgresdb`).
tags
mongodb, nosql, database, aggregation, indexing
recommends
secure-coding, harness
origin
risco

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 ANALYZE → postgresdb. 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.

Deep dives: data-modeling (embed/reference tree, all six patterns, 16 MB math, polymorphic & schema versioning) · aggregation (per-stage index eligibility, $lookup variants, $facet, window fns, $merge/$out, reading pipeline explain) · transactions-and-ops (retry wrappers, concern semantics, Atlas tiers, Vector Search, Queryable Encryption, RBAC, pooling, change streams).

Non-negotiables

  1. Design for the queries you run, not the shape of your data. The schema is the set of documents that make your common reads single-document and index-eligible.
  2. Never let an array grow unbounded inside a document. It walks toward the 16 MB cap, bloats every read of the parent, and kills update performance — reference or bucket it.
  3. The hard ceiling is 16 MB per document. If a one-to-many can exceed it, you reference; there is no TOAST-style overflow here.
  4. A single-document write is already atomic. Reach for a multi-document transaction only when two or more documents must change together — otherwise you are paying for nothing.
  5. Every transaction retries on the TransientTransactionError label (and commit retries on UnknownTransactionCommitResult). withTransaction does both for you; a hand-rolled loop must.
  6. Index by ESR: Equality fields, then the Sort field, then Range fields. This order lets one compound index serve the filter, the sort, and the range without an in-memory sort.
  7. Read explain("executionStats") before and after adding an index — confirm IXSCAN, not COLLSCAN, and totalKeysExamined ≈ nReturned. Or it didn't happen.
  8. w:"majority" for money and state transitions, read concern "majority"/"snapshot" when a read must reflect a durable write. w:1 can be rolled back on a primary failover.
  9. Money is Decimal128 (NumberDecimal("...")), never a JS double. Binary floats drift; 0.1 + 0.2 !== 0.3 in your ledger.
  10. Never store a secret in plaintext. Use Queryable Encryption / client-side field-level encryption; never commit a mongodb://user:pass@ literal.

Decision rules

Embed or reference
RelationshipChooseWhy
Read together, small, bounded (address on a user)embedone read, no $lookup, atomic update
One-to-few, bounded (≤ a few dozen, won't grow)embedstays well under 16 MB
One-to-many, growth not bounded (comments on a post)referencearray would chase the 16 MB cap
Many-to-many (students↔courses)reference (array of ids on the lighter side)shared, independently mutated
Child shared across parentsreferenceone source of truth, no duplication drift
Child independently and frequently mutatedreferenceavoid rewriting a big parent per child edit
High-cardinality / huge child setreference (+ optional subset embed)keep the hot read small
Which schema pattern
SymptomPatternWhat it does
List view reads 3 fields of a heavy docsubsetembed only the hot fields, reference the rest
$lookup on every read just to show a name/priceextended referencecopy the few joined fields you display
Unbounded time-ordered events (readings, logs)bucketgroup N events per doc by time window
Same count/sum recomputed on every readcomputedstore the rollup, update it on write
1% of docs break the shape (a few mega-children)outlierflag them, overflow into linked docs
One collection holds several entity shapespolymorphica type discriminator + shared _id space

Full Bad→Good documents for each in data-modeling.

Which index type
Access patternIndexNote
= on one fieldsingle-fieldalso covers the field's sort
filter + sort + range togethercompound, ordered ESRone index serves all three
query into an array fieldmultikey (automatic on an array key)one multikey field per compound index
query only a subset of docs (status:"active")partial (partialFilterExpression)smaller, cheaper to maintain
auto-expire docs after a timeTTL (expireAfterSeconds on a Date)single-field only; deletes in background
language-aware text searchtext or Atlas SearchAtlas Search is far richer; text is legacy
unpredictable / many query shapes on subdocswildcard ("$**")last resort; never beats a targeted index
geospatial proximity / within2dsphereGeoJSON Point/Polygon
vector similarity (8.2, Community+)Atlas/Vector Search indexsee transactions-and-ops ref
When NOT to add an index
  • Low-cardinality field (a boolean, a 3-value status) — the planner skips it; COLLSCAN wins.
  • Tiny collection — a collection scan reads one or two pages; the index is pure write tax.
  • A field already the left prefix of an existing compound index — redundant.
  • Write-heavy field rarely filtered — every index is paid on every insert/update.
  • "Just in case" indexes — an unused index costs writes and RAM, returns nothing.

Copy-paste patterns

Every fence is mongosh syntax.

Model the document for the read (Bad → Good)
javascript
// BAD: comments embedded in the post — array grows without bound toward 16 MB,
// every post read drags the entire comment history, money is a float.
db.posts.insertOne({
  _id: ObjectId(),
  title: "Indexing 101",
  authorId: ObjectId(),
  price: 9.99,                       // double — drifts in arithmetic
  comments: [ /* ...unbounded... */ ] // chases the 16 MB cap
})

// GOOD: post stays small; comments referenced; money is Decimal128;
// the few fields the feed needs are duplicated (extended reference).
db.posts.insertOne({
  _id: ObjectId(),
  title: "Indexing 101",
  author: { _id: ObjectId(), name: "Ada" }, // extended ref: name shown without a $lookup
  price: NumberDecimal("9.99"),
  commentCount: 0,                            // computed rollup, bumped on write
  createdAt: new Date()
})
db.comments.insertOne({ _id: ObjectId(), postId: ObjectId(), body: "…", createdAt: new Date() })
Compound index in ESR order + the query that uses it
javascript
// Feed query: filter by author (equality), sort by date (sort), bound by a date (range).
// ESR => author first, then the sort/range key.
db.posts.createIndex({ "author._id": 1, createdAt: -1 })

db.posts.find({ "author._id": authorId, createdAt: { $gte: since } })
        .sort({ createdAt: -1 })
        .limit(20)
// Confirm the plan: IXSCAN on the index above, no in-memory SORT stage.
Partial + TTL indexes
javascript
// Partial: index only the rows you actually query (active orders), not the archive.
db.orders.createIndex(
  { customerId: 1, createdAt: -1 },
  { partialFilterExpression: { status: "active" } }
)

// TTL: expire sessions 30 minutes after lastSeen. Field MUST be a Date.
db.sessions.createIndex({ lastSeen: 1 }, { expireAfterSeconds: 1800 })
Aggregation: $match first, $lookup, $group with allowDiskUse
javascript
db.orders.aggregate([
  // $match FIRST so it uses the compound index and shrinks the working set early.
  { $match: { status: "paid", createdAt: { $gte: since } } },
  { $sort:  { createdAt: -1 } },                  // index-eligible here, before any $group/$project
  { $lookup: {
      from: "customers",
      localField: "customerId",
      foreignField: "_id",
      as: "customer",
      pipeline: [ { $project: { name: 1 } } ]     // project inside $lookup: pull only what you need
  }},
  { $group: { _id: "$customerId", total: { $sum: "$amount" } } }
], { allowDiskUse: true })  // $group/$sort spill past 100 MB/stage; this lets large groups complete,
                            // it is NOT a substitute for a missing $match index — see anti-patterns.
Read explain("executionStats") — the four numbers
javascript
db.posts.find({ "author._id": authorId }).sort({ createdAt: -1 })
        .explain("executionStats")

Read these before declaring a fix:

  1. winningPlan.stage — must be IXSCAN (or FETCH→IXSCAN), not COLLSCAN.
  2. totalKeysExamined vs nReturned — close means the index is selective; a huge ratio means the index scans far more than it returns (wrong key order, low selectivity).
  3. A SORT stage — an in-memory sort the index should have satisfied; reorder by ESR to remove it.
  4. rejectedPlans — what the planner considered and dropped; a near-miss hints at a better index.
Multi-document transaction with full retry
javascript
// Use withTransaction — it retries the body on TransientTransactionError and retries the
// commit on UnknownTransactionCommitResult for you. Requires a replica set / sharded cluster.
const session = db.getMongo().startSession();
try {
  session.withTransaction(() => {
    const orders  = session.getDatabase("shop").orders;
    const ledger  = session.getDatabase("shop").ledger;
    orders.updateOne({ _id: orderId, status: "pending" }, { $set: { status: "paid" } }, { session });
    ledger.insertOne({ orderId, amount: NumberDecimal("9.99"), at: new Date() }, { session });
  }, { readConcern: { level: "snapshot" }, writeConcern: { w: "majority" } });
} finally {
  session.endSession();
}
// If both writes target ONE document, drop the transaction — that write is already atomic.
bulkWrite upsert
javascript
db.inventory.bulkWrite([
  { updateOne: {
      filter: { sku: "ABC-1" },
      update: { $inc: { qty: 5 }, $setOnInsert: { createdAt: new Date() } },
      upsert: true
  }}
], { ordered: false })  // ordered:false keeps going past one failed op and parallelizes
Change stream (resumable tail)
javascript
// Watch only the events you care about; persist resumeToken to restart without gaps.
const cs = db.orders.watch([{ $match: { operationType: { $in: ["insert", "update"] } } }]);
while (cs.hasNext()) { const change = cs.next(); /* process; save change._id as resume token */ }

More variants ($facet, window functions, $merge/$out, vector search) live in the references.

Show full SKILL.md (792 more words)Show less

Anti-patterns / rationalizations → STOP

RationalizationReality → STOP
"Embed all the comments, it's one read"Array grows unbounded toward 16 MB and bloats every post read. Reference or bucket.
"$lookup is just a JOIN, use it everywhere"Mongo is not relational; per-document $lookup is expensive. Prefer modeling (extended reference) so the read needs no join.
"Wrap this single-document update in a transaction to be safe"A single-doc write is already atomic. The transaction adds latency and a replica-set requirement for zero gain.
"COLLSCAN is fine, it's fast on my 100 docs"It is O(n); at 4M docs it is a full table read. Add the index now and prove IXSCAN.
"Set allowDiskUse:true and the slow pipeline is fixed"That masks a missing $match index by spilling to disk. Fix stage order / add the index first.
"Store the price as a number, round on display"JS doubles drift across $sum/$inc. Use NumberDecimal (Decimal128).
"Group the whole collection, no $match"A blocking $group over everything blows the 100 MB/stage limit. $match first to shrink it.
"One collection for users, orders, logs — fewer to manage"Mixed shapes kill index selectivity and balloon working set. Split by access pattern.
"$where lets me run a quick JS predicate"Runs JS per document, no index, a server-side injection surface. Use query operators / $expr.
"Index every field just in case"Each index is a write tax and RAM cost; unused indexes return nothing. Index for real query shapes only.

Quick reference

Read/write concern matrix
NeedWrite concernRead concernNote
Money / state transitionw:"majority""majority"survives a primary failover
Read your own durable writew:"majority""majority" (+ causal session)no rollback window
Transaction defaultw:"majority""snapshot"consistent point-in-time
Logs / fire-and-forgetw:1"local"fast, may be rolled back
Atlas tier chooser
TierUse it forLimits
M0learning, tiny prototypesfree forever, up to 5 GB, shared, no SLA
Flex (GA Feb 2025)small prod / variable load$8 base capped at $30/mo, 100 ops/sec (burst 500), 5 GB; supports Atlas Search, Vector Search, Change Streams, Triggers
M10+ (dedicated)production, isolation, scale-upfrom $0.08/hr ($57/mo); dedicated resources, full features

M0 does not run Vector Search well for real workloads — move to Flex or dedicated. Legacy Serverless / M2 / M5 were auto-migrated to Flex.

Aggregation memory

Each blocking stage ($group, $sort without an index, $bucket) is capped at 100 MB. Past it the stage errors unless allowDiskUse:true lets it spill. Spilling is a correctness fallback for genuinely large groups, not a performance fix for a missing index.

Verify

Run scripts/verify.sh from your project root. It is read-only, never connects to a database, and never writes. It scans discovered .js/.mongodb.js files and flags foot-guns: a committed plaintext mongodb://user:pass@ credential (the only hard failure), createIndex calls with no options, redundant compound-index prefixes, $where predicates, unbounded $lookup, allowDiskUse:true that may be masking a missing index, and money stored as a JS number in seed scripts. If node is present it runs node --check for a syntax pass; otherwise that step is [skip]. Everything except a committed credential is advisory [warn]/[skip]. It runs on stock macOS bash 3.2 and exits 0 on a clean or empty target.

Project grounding (02-DOCS + CLAUDE.md)

When this skill runs in a project with a 02-DOCS/ layer (the harness Karpathy wiki), record this project's MongoDB decisions there and index them from the root CLAUDE.md, so the next agent inherits the conventions instead of re-deriving them.

  1. Find the article 02-DOCS/wiki/stack/mongodb.md, indexed in 02-DOCS/wiki/index.md (the Knowledge map index; root CLAUDE.md points to it).
  2. If missing or stale, create/update it with the project's real choices — collection layout and embed/reference decisions, the index set and its ESR rationale, read/write concern policy, the Atlas tier, and any encryption/RBAC setup — then index it in 02-DOCS/wiki/index.md (the Knowledge map; root CLAUDE.md keeps only a short pointer to it).
  3. Read it first on every use and stay consistent; when a convention changes, update the article (bump its Updated date) in the same change.

No 02-DOCS/ layer? Skip silently (optionally suggest harness). Technical conventions are recorded, not gated — never block the task on this.

See Also

  • references/data-modeling.md — embed/reference tree, the six patterns with worked documents, 16 MB math, polymorphic & schema versioning.
  • references/aggregation.md — per-stage index eligibility, $lookup variants, $facet, window functions, $merge/$out, hybrid $scoreFusion, reading pipeline explain.
  • references/transactions-and-ops.md — retry wrappers, concern semantics, replica-set requirement, Atlas tiers, Search/Vector Search, Queryable Encryption, RBAC, pooling, change streams.
  • Sibling skills: harness (scaffolds the 01-TOOLS/MONGODB operational tool) and secure-coding (auth, encryption, least-privilege).
  • For relational work — SQL, foreign keys, EXPLAIN ANALYZE, MVCC — use postgresdb, not this skill. Different engine and planner.
  • Out of scope here — external tools with their own docs: ODM/driver API surface (Mongoose hooks, the Node driver's bulkWrite/updateMany return shapes) and cross-engine vector-store selection. This skill owns the server query and the index the server picks.

© ericrisco, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in skills/mongodb of ericrisco/rsc-harness.

  • SKILL.md
  • evals/README.md
  • evals/cases.yaml
  • references/aggregation.md
  • references/data-modeling.md
  • references/transactions-and-ops.md
  • scripts/verify.sh

Open the folder on GitHubat commit 92fde8f

Compare with similar skills

Mongodb next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mongodb compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mongodb this skillericrisco/rsc-harness156—~4.8kAutomated safety check: PassMIT
DB SculptorEliasOulkadi/shokunin114—~3.1kAutomated safety check: NotesMIT
Amazon Documentdbaws/agent-toolkit-for-aws2.8k—~5.9kAutomated safety check: PassApache-2.0
Discover Databaserand/cc-polymath181—~2kAutomated safety check: PassMIT
Query Expertjamesrochabrun/skills215—~4.3kAutomated safety check: PassMIT
DatabasesMicrock/ordinary-claude-skills401—~1.9kAutomated safety check: NotesMIT

Similar skills

  • DB Sculptor

    EliasOulkadi/shokunin

    Design database schemas with Prisma/Drizzle, PostgreSQL index strategy (B-tree, GIN, GiST, BRIN, Hash), query optimization (EXPLAIN ANALYZE), migration safety (expand/contract, zero-downtime), and…

    114 GitHub stars~3.1k tokensUpdated 2 days ago
    DatabasesAuto-check: notes
  • Amazon Documentdb

    aws/agent-toolkit-for-aws

    Official

    Manages Amazon DocumentDB end-to-end — serverless-on-8.0 cluster setup, TLS/VPC/driver config, flexible-schema and vector-search data modeling, MongoDB compatibility assessment, DMS-based migration…

    2.8k GitHub stars~5.9k tokensUpdated today
    DatabasesAuto-check passed
  • Discover Database

    rand/cc-polymath

    Automatically discover database skills when working with SQL, PostgreSQL, MongoDB, Redis, database schema design, query optimization, migrations, connection pooling, ORMs, or database selection.

    181 GitHub stars~2k tokensUpdated 7 mo ago
    DatabasesAuto-check passed
  • Query Expert

    jamesrochabrun/skills

    Master SQL and database queries across multiple systems. An agent skill from jamesrochabrun/skills.

    215 GitHub stars~4.3k tokensUpdated 8 mo ago
    DatabasesAuto-check passed
  • Databases

    Microck/ordinary-claude-skills

    Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin).

    401 GitHub stars~1.9k tokensUpdated 1 mo ago
    DatabasesAuto-check: notes
  • Mongodb Query Optimizer

    mongodb/agent-skills

    Official

    Help with MongoDB query optimization and indexing. An agent skill from mongodb/agent-skills.

    190 GitHub starsUsed in 2 repos~2.6k tokens
    DatabasesAuto-check passed

More from ericrisco/rsc-harness

All 229 skills in this repo
  • Ab Testing

    ericrisco/rsc-harness

    A skill your agent uses when designing or analyzing a controlled experiment — falsifiable hypothesis, sample size from an MDE, reading significance/CI/power, CUPED, or rescuing tests that won't go…

    156 GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Accessibility

    ericrisco/rsc-harness

    A skill your agent uses when making a web UI conform to WCAG 2.2 Level AA — axe-core or Lighthouse a11y violations, keyboard operability, focus management, ARIA roles/names/live regions, contrast…

    156 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Ads

    ericrisco/rsc-harness

    A skill your agent uses when running or fixing paid acquisition on Google or Meta — campaign structure (Performance Max, Demand Gen, Search, Advantage+), platform-fit creative, budget/scaling rules…

    156 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Agent Eval

    ericrisco/rsc-harness

    A skill your agent uses when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual…

    156 GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed
  • AI Media

    ericrisco/rsc-harness

    A skill your agent uses when a creative goal must become a finished media file: pick and order generative-media models per modality — AI voiceover, image-to-video clips, score — then glue them with…

    156 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed
  • Analytics

    ericrisco/rsc-harness

    A skill your agent uses when instrumenting product or web analytics — GA4/PostHog SDK wiring, event taxonomy, funnels, double-counted events, consent gating, PII scrubbing.

    156 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Mongodb

What does Mongodb do?

A skill your agent uses when modeling MongoDB documents (embed versus reference, the 16MB cap, bucket and subset patterns), choosing or fixing indexes (compound order by the ESR rule, partial, TTL…. Mongodb is an agent skill from ericrisco/rsc-harness. Use when modeling MongoDB documents (embed versus reference, the 16MB cap, bucket and subset patterns), choosing or fixing indexes (compound order by the ESR rule, partial, TTL, multikey, reading explain), writing aggregation pipelines that stay index-eligible, running multi-document transactions with retry, or operating and securing a deployment (replica set, read/write concern, Atlas tiers, Vector Search, Queryable Encryption).

When should I use Mongodb?

Mongodb fits situations like: modeling MongoDB documents (embed versus reference; bucket and subset patterns); fixing indexes (compound order by the ESR rule; reading explain).

How do I install Mongodb in Claude Code?

Run `npx skills add ericrisco/rsc-harness --skill mongodb -a claude-code`. Or copy the skill folder (skills/mongodb in ericrisco/rsc-harness) into .claude/skills/mongodb in your project. Claude Code loads it when a task matches its description.

How do I install Mongodb in Codex?

Run `npx skills add ericrisco/rsc-harness --skill mongodb -a codex`. Or copy the skill folder (skills/mongodb in ericrisco/rsc-harness) into .agents/skills/mongodb in your project. Codex loads it when a task matches its description.

Can I use Mongodb in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ericrisco/rsc-harness --skill mongodb -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mongodb, .gemini/skills/mongodb, .github/skills/mongodb and .opencode/skills/mongodb in your project.

What does Mongodb need to run?

Going by SKILL.md and its folder, Mongodb needs a shell for the scripts in its folder and the command-line tools its instructions call (node). Our summary lists: A Bash shell.

Does Mongodb access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mongodb safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Mongodb use?

Mongodb is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mongodb use?

About 4.8k tokens (SKILL.md is roughly 19k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.1k tokens, read only when the agent opens those files.

What are the alternatives to Mongodb?

Skills that share tags, products or a category with Mongodb: DB Sculptor (EliasOulkadi/shokunin, 114 stars), Amazon Documentdb (aws/agent-toolkit-for-aws, 2.8k stars), Discover Database (rand/cc-polymath, 181 stars) and Query Expert (jamesrochabrun/skills, 215 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mongodb?

ericrisco (a GitHub user) maintains it in ericrisco/rsc-harness, which has 156 GitHub stars. The repository holds 229 skills in this directory. The repository was last updated on October 6, 2026.

Source: ericrisco/rsc-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.