Skip to content
Back to skills

Mongodb

ASecurity

MongoDB — aggregation pipeline, indexes, schema design, Atlas Search, Mongoose ODM.

  • 47 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added September 12, 2026
databasesgo

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add skeletorflet/opencode-supreme-setup --skill mongodb --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mongodb?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mongodb
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/skeletorflet-mongodb/badge)](https://www.skillsdirectory.com/skills/skeletorflet-mongodb)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mongodb
description: MongoDB — aggregation pipeline, indexes, schema design, Atlas Search, Mongoose ODM.
---

## mongodb

### Aggregation Pipeline
- Stages: `$match` (filter), `$group` (group by field), `$sort`, `$project` (shape docs).
- `$lookup` — join collections (left outer join with pipeline syntax).
- `$unwind` — deconstruct arrays; `$addFields` — computed fields.
- `$facet` — multi-faceted aggregation within a single pipeline.

### Indexes
- Compound: `db.collection.createIndex({ field1: 1, field2: -1 })`.
- Text: `createIndex({ content: "text" })` with `$text` search operator.
- Geospatial: `2dsphere` indexes for GeoJSON queries.
- TTL indexes, sparse indexes, partial indexes for targeted workloads.

### Schema Design
- Embedding for read-heavy, one-to-few relationships.
- Referencing for one-to-many/many-to-many with `$lookup`.
- Bucket pattern for time-series data; polymorphic pattern with discriminator fields.

### Atlas Search / Vector
- `$search` aggregation stage — Lucene-based full-text search.
- Atlas Vector Search — `$vectorSearch` for semantic/kNN queries.
- Index configuration via Atlas UI or `searchIndexes` collection.

### Mongoose ODM
- `new Schema({ field: { type: String, required: true, index: true } })`.
- `Model.find()`, `.create()`, `.findByIdAndUpdate()`, hooks (pre/post save).
- Virtuals, plugins, discriminators, custom validation.

### Change Streams
- `collection.watch()` — real-time notifications on inserts, updates, deletes.
- Resume via `resumeAfter` token; use with `$match` filter for specific collections.

### Transactions
- `session.startTransaction()` for multi-document ACID transactions.
- Retry logic on `TransientTransactionError`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.