mongodb-expert

mongodb-expert is a skill for Claude Code from personamanagmentlayer/pcl. It costs 56 tokens per session (660 once invoked), scanned A, original, Apache-2.0.

An expert guide to MongoDB, a database that stores data as flexible documents rather than rows in fixed tables. It covers document design, queries, aggregation, indexes, replication, sharding, and production operations.

In plain words
What is it for?
Use it to create, find, update, and aggregate documents; design indexes; model data; and plan replication, sharding, and other production database operations.
Why use it?
It helps choose suitable data structures and make MongoDB queries and database operations work efficiently. It also addresses reliability and scaling concerns as the database grows.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to create, find, update, and aggregate documents; design indexes; model data; and plan replication, sharding, and other production database operations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/personamanagmentlayer/pcl/mongodb-expert
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.

Any agent
npx skills add personamanagmentlayer/pcl --skill mongodb-expert
Clone the repo
git clone --depth 1 https://github.com/personamanagmentlayer/pcl

Made for: Claude Code.

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-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/mongodb-expert/github.svg)](https://agentmods.dev/skills/personamanagmentlayer/pcl/mongodb-expert)
Your own site
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/mongodb-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/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.

agentmods 80×15 button for mongodb-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/mongodb-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/mongodb-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 660 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00056 $0.00660
Opus 5 $0.00028 $0.00330
Sonnet 5 $0.00011 $0.00132
Haiku 4.5 $0.00006 $0.00066

Measured 4d ago against content hash b08ea2dd915c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

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 4d 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.

stdlib/data/mongodb-expert/SKILL.md · 110 lines

How it starts

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

MongoDB Expert

You are an expert in MongoDB with deep knowledge of document modeling, aggregation pipelines, indexing strategies, replication, sharding, and production operations. You design and manage performant, scalable MongoDB databases following best practices.

Best Practices

1. Schema Design

// Embed when:
// - One-to-few relationship
// - Data doesn't change often
// - Need atomic updates

// Reference when:
// - One-to-many or many-to-many
// - Data changes frequently
// - Documents would exceed 16MB

2. Indexing

// Index fields used in:
// - Queries ($match, find)
// - Sorts ($sort)
// - Joins ($lookup)

// Avoid:
// - Too many indexes (slows writes)
// - Indexes on fields with low cardinality

3. Aggregation

// Put $match early in pipeline
// Use $limit after $sort
// Use indexes with $match and $sort

4. Sharding

// Choose shard key carefully
// High cardinality
// Good distribution
// Query isolation

5. Connection Pooling

// Use connection pools
// Don't create new connections for each operation
const client = new MongoClient(uri, {
  maxPoolSize: 10,
  minPoolSize: 2,
});

Approach

When working with MongoDB:

  1. Design Schema: Consider access patterns first
  2. Index Strategically: Cover common queries
  3. Use Aggregation: For complex queries and transformations
  4. Monitor Performance: Enable profiling, use explain
  5. Use Replication: High availability and read scaling
  6. Shard When Needed: For horizontal scaling
  7. Backup Regularly: mongodump or filesystem snapshots
  8. Security: Authentication, encryption, network isolation

Always design MongoDB databases that are performant, scalable, and maintainable.

Reference Documentation

Detailed material lives alongside this skill and is read on demand:

  • Core Expertise — CRUD Operations, Query Operators, Aggregation Pipeline, Indexing, Schema Design, Transactions, Replication, Performance Optimization

Read the full file on GitHub · 110 lines

Files

What ships with it

1 file 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. 4d ago Changed · -564 lines · +35 tokens per session b08ea2dd915c
  2. 9d ago First seen · 674 lines · 21 tokens per session scan A 9d418c45b4a5

Subscribe to this mod's changes

mongodb-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (40 stars, last pushed 2d ago), licensed Apache-2.0. It adds 56 tokens to every session and 660 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.

Related

Other skills, from other repositories

mongodb

MongoDB operations expert for queries, aggregation pipelines, indexes, and schema design.

librefang/librefang-registry · 17 tokens

mongodb

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…

ericrisco/rsc-harness · 118 tokens

data-nosql-database

Use this skill when asked about MongoDB, Cassandra, DynamoDB, Couchbase, CosmosDB, NoSQL, document database, wide-column, key-value, consistency model, CAP theorem, sharding, or denormalization. This skill enforces: NoSQL type selection (document, key-value, wide-column, graph), MongoDB aggregation pipeline and…

j4flmao/agent-skills · 140 tokens

mongodb

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

bobmatnyc/claude-mpm-skills · 24 tokens

mongodb

A guide for managing MongoDB, a database that stores records in flexible document collections. It covers local, remote, and replica-set connections, database and collection administration, data operations, and indexes.

chaterm/terminal-skills · 7 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