Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

mongodb-patterns

Skill by vibeeval

Teaches an AI assistant MongoDB document modeling, indexing, aggregation pipelines, change streams and multi-document transactions. Aimed at developers designing MongoDB schemas and queries.

  • Score 72
  • 554 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install mongodb-patterns

Built from the published package, never by AI.

git clone --depth 1 https://github.com/vibeeval/vibecosystem /tmp/vibecosystem && mkdir -p ~/.claude/skills && cp -r /tmp/vibecosystem/skills/mongodb-patterns ~/.claude/skills/mongodb-patterns

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install mongodb-patterns in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

MongoDB Patterns is a skill that gives an AI assistant guidance on MongoDB document database design and query optimization. It covers when to embed or reference documents, the bucket pattern for time-series data, and compound, partial, text, TTL and wildcard indexes. It also includes aggregation pipeline examples, change streams with resume tokens, and multi-document transactions with session handling.

The skill is written as TypeScript code examples with a checklist and a list of anti-patterns, such as unbounded arrays and missing indexes. It is aimed at developers who design MongoDB schemas and want their assistant to follow these patterns when writing queries. The source presents it as a guide to patterns rather than a runnable tool.

Written from the project's SKILL.md and checked against it.

What it can do

  • Document modelingExplains when to embed or reference data, plus the bucket pattern for time-series data.
  • Indexing strategyCovers compound indexes using the ESR rule, partial, text, TTL and wildcard indexes.
  • Aggregation pipelineShows a sales analytics pipeline using match, unwind, group, sort, limit and lookup stages.
  • Change streamsWatches order changes and resumes from saved tokens for crash-safe processing.
  • Multi-document transactionsShows a funds transfer example using a session and withTransaction.
  • Query verificationRecommends explain() to confirm that queries use indexes.
  • Anti-pattern reviewLists pitfalls such as unbounded arrays, missing indexes and $lookup in hot paths.

What you need

  • A MongoDB database

Try asking

  • Should I embed or reference reviews in my product schema?
  • Design a compound index for orders filtered by status and sorted by date.
  • Write a change stream that processes newly paid orders with resume tokens.

Good to know

  • Examples are written in TypeScript and use MongoDB driver and shell syntax.
  • The source is a set of patterns and examples, not a runnable tool.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/mongodb-patterns/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to mongodb-patterns

All alternatives →
hugging-face-datasetssickn33
94

Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.

AAA Skill 50k
db-repairgarrytan
94

Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.

AAA Skill 116k
fix-slow-queriespaperclipai
94

Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.

AAA Skill 119k
prisma-8prisma
94

Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

mongodb-patterns: common questions

Does it explain when to embed or reference data?

Yes. It says to embed for 1:1 and 1:few data that is read together, and to reference unbounded 1:many data or data queried independently.

Does it cover transactions and change streams?

Yes. It includes TypeScript examples of a funds transfer using withTransaction and an order watcher that uses resume tokens.

What mistakes does it warn about?

It warns against unbounded arrays, missing indexes, $lookup in hot paths, and not using majority write concern for critical writes.

How do I install mongodb-patterns?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is mongodb-patterns free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is mongodb-patterns safe to use?

It scores 72 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to mongodb-patterns?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

mongodb-patterns Install

Add to stack

Loading.