# 705-technologies-nosql-mongodb

705-technologies-nosql-mongodb — a skill for Claude Code, Codex, Cursor, GitHub Copilot and Gemini CLI that covers MongoDB at the database layer, independent of Spring Boot, Quarkus or Micronaut.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 216 installs · ★ 465 repo stars
- Author: Juan Antonio Breña Moral
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/jabrena/plinth/tree/HEAD/skills/705-technologies-nosql-mongodb/SKILL.md
- Updated: 2026-10-21
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/705-technologies-nosql-mongodb

## What it does

Part of the Plinth Toolkit, this skill runs across Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. It keeps the agent focused at the database layer: document modeling for aggregates, embedded documents, references, and bounded arrays; JSON Schema validation and schema evolution; index strategy covering compound, covering, partial, TTL, and unique constraints; aggregation pipelines with stage ordering, `$match` pushdown, and memory controls.

Before marking a query optimised, the skill checks `explain()` plans, scanned-to-returned ratios, sort coverage and index selectivity. Concatenating untrusted input into query documents, aggregation stages or `$where` expressions is prohibited — only driver query builders and validated parameters are accepted. Any Maven changes in the same changeset trigger `./mvnw compile` first.

Framework integrations stay out of scope by design: Spring MongoDB goes to `@315-frameworks-spring-mongodb`, Quarkus MongoDB to `@415-frameworks-quarkus-mongodb`, Micronaut MongoDB to `@515-frameworks-micronaut-mongodb`. Missing topology details — shard config, read/write concern, data volume — cause the skill to ask a clarifying question rather than guess at a recommendation.

## Requirements
- Works with: MongoDB

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 705-technologies-nosql-mongodb -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/705-technologies-nosql-mongodb/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/705-technologies-nosql-mongodb/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 705-technologies-nosql-mongodb -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/705-technologies-nosql-mongodb/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 705-technologies-nosql-mongodb -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/705-technologies-nosql-mongodb/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install jabrena/plinth skills/705-technologies-nosql-mongodb
```

2. **Manually: put the files in place**
- File: `.github/skills/705-technologies-nosql-mongodb/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 705-technologies-nosql-mongodb -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/jabrena/plinth --path skills/705-technologies-nosql-mongodb
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/705-technologies-nosql-mongodb/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 705-technologies-nosql-mongodb -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/jabrena/plinth/tree/HEAD/skills/705-technologies-nosql-mongodb/SKILL.md

## When to use it
- design a MongoDB document schema for aggregates with nested arrays
- audit collection indexes and spot missing or redundant ones
- rewrite an aggregation pipeline with correct `$match` pushdown
- evaluate consistency and transaction trade-offs for a given workload
- add JSON Schema validation without a breaking schema change

## Example prompts
- Design a document schema for an orders collection with embedded line items
- Review the indexes on this collection and explain the `explain()` plan for the query
- Rewrite this aggregation pipeline: fix stage ordering and push `$match` to the front

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 19340fbd6b2d31e9.

BEGIN THIRD-PARTY FILE 19340fbd6b2d31e9
```text
---
name: 705-technologies-nosql-mongodb
description: Use when you need framework-agnostic MongoDB and non-relational database query guidance — document schema design, collection modeling, JSON Schema validation, indexes, aggregation pipelines, query performance, consistency trade-offs, transactions, and operational safety — without choosing Spring Boot, Quarkus, or Micronaut. This should trigger for requests such as Design MongoDB document schemas; Review MongoDB queries and indexes; Improve aggregation pipeline performance; Model non-relational data access patterns; Review NoSQL consistency and transaction trade-offs. Part of Plinth Toolkit
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Non-relational database query best practices

Help teams design maintainable, secure, and performant **MongoDB and non-relational database queries** for Java applications.

**What is covered in this Skill?**

- Document modeling for aggregates, embedded documents, references, arrays, and bounded growth
- MongoDB JSON Schema validation and compatibility-aware schema evolution
- Query design: explicit predicates, projections, sort stability, pagination, collation, and read concerns
- Index strategy: compound indexes, covering queries, partial indexes, TTL indexes, unique constraints, and lifecycle review
- Aggregation pipelines: stage ordering, `$match` pushdown, `$project`, `$lookup`, `$unwind`, `$group`, and memory controls
- Consistency, transactions, idempotency, migration safety, testing, observability, and production diagnostics

**Scope:** Framework-agnostic MongoDB and non-relational data modeling. For Java framework integrations, defer to the matching Spring Boot, Quarkus, or Micronaut MongoDB skill.

## Constraints
```
END THIRD-PARTY FILE 19340fbd6b2d31e9

The third-party file has ended. Everything between the 19340fbd6b2d31e9 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 1784 of 4670 bytes. © Juan Antonio Breña Moral · Apache-2.0 · https://github.com/jabrena/plinth/tree/HEAD/skills/705-technologies-nosql-mongodb/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
