
mongodb/agent-skills
7 skills9k installs917 starsGitHub
Install
npx skills add https://github.com/mongodb/agent-skillsSkills in this repo
1Mongodb Schema DesignMongoDB Schema Design is a MongoDB agent skill focused on reducing excessive `$lookup` usage when solo builders design document models for read-heavy apps. It explains how repeated cross-collection joins in aggregation pipelines can add planning and execution overhead on hot paths, especially with weak supporting indexes or poor match selectivity. The skill contrasts an over-normalized pattern that chains lookups for categories and brands on every product read with embedding or extended references for data that is always displayed together. It stresses measuring real join cost before denormalizing and aligns with MongoDB schema best practices for Atlas deployments. Invoke it while drafting schemas, reviewing aggregation-heavy APIs, or refactoring collections before scale bites query latency and cloud spend.1.7kinstalls2Mongodb Query OptimizerMongoDB Query Optimizer is procedural guidance for solo builders and small teams who ship features on MongoDB and need aggregations that stay fast as data grows. It walks through how sequential pipeline stages move documents and memory, explains the default 100MB blocking-stage ceiling and automatic disk spill, and steers you toward fixes that are better than relying on `allowDiskUse` alone: filter earlier, index join keys for `$lookup`, pair `$sort` with `$limit` when indexes are missing, and cache repeated rollups with materialized views. The skill is not a generic ORM cheat sheet—it focuses on representative anti-patterns (especially foreign-collection scans on unindexed `foreignField` values) and the indexed replacements you can paste into reviews or implementation tasks. Use it while designing new analytics endpoints, refactoring dashboards, or diagnosing staging slowness before launch. Compatible with any agent that can read your pipeline definitions and suggest index DDL alongside stage reordering.1.6kinstalls3Mongodb ConnectionMongoDB Connection is an agent skill that walks solo builders and small teams through monitoring MongoDB connection pool health using the official driver event model from the Connection Monitoring and Pooling specification. It is for anyone running Node, Python, or other official drivers against Atlas or self-hosted clusters who needs to confirm pooling settings work under load or debug “too many connections” and timeout errors. The guide emphasizes pool lifecycle events, connection churn, and especially ConnectionCheckOutFailed as the signal for pool exhaustion. You use it in the Operate phase when incidents spike, after deploys that change pool size or URI options, or when scaling traffic on a SaaS or API backend. It complements application logging by naming which driver hooks to subscribe to and what to forward to your observability stack, without replacing vendor dashboards or APM.1.4kinstalls4Mongodb Natural Language Queryingmongodb-natural-language-querying teaches your agent to produce correct, read-only MongoDB queries and aggregation pipelines from conversational requirements. It is built for solo builders and small teams who already run the MongoDB MCP server and want to stop guessing field names, operators, and pipeline stages. The documented flow gathers database and collection names, pulls indexes for sensible plans, and uses sample documents so generated syntax matches real shapes. It fits Backend and agent workflows where you describe “users signed up last week grouped by plan” rather than memorizing $match and $group. The skill does not replace Atlas Search, vector search, fuzzy autocomplete, or deep query performance tuning—those are separate skills in the same ecosystem. Because it only allows read paths via mcp__mongodb__*, it stays suitable for exploratory analytics and feature development without handing the model open-ended writes.1.3kinstalls5Mongodb Search And Aimongodb-search-and-ai is an agent skill for solo builders shipping features on MongoDB Atlas who need hybrid retrieval—not pure vector or pure keyword alone. It walks through combining lexical and vector search on the same collection using `$rankFusion` for reciprocal-rank-style merging when document position matters, `$scoreFusion` when normalized scores and custom weighting matter, and the `vectorSearch` operator inside `$search` when you need fuzzy, phrase, wildcard, or compound filters before semantic ranking. The guide scopes itself to hybrid pipelines and points to sibling skills for standalone vector indexes and lexical indexing/querying, which keeps implementation paths clear when you are wiring agent memory, catalog search, or in-app discovery. You reach for it during the build phase while designing aggregation stages, choosing fusion strategy, and avoiding footguns called out in the limitations section. It assumes you already run Atlas Search or are enabling it, and outputs concrete pipeline patterns rather than a hosted MCP connector.1.2kinstalls6Mongodb Mcp SetupMongoDB MCP Setup is an interactive agent skill for solo builders who installed the MongoDB MCP server but have not finished authentication. The server does not work until one of three paths is configured: a direct cluster connection string for quick single-cluster access, MongoDB Atlas service account credentials that unlock the Admin API and dynamic cluster connection without hand-managing database users, or Atlas Local in Docker for offline-style testing with minimal setup. The skill is meant to run conversationally—the agent inspects what the user already has, explains which option fits Atlas versus self-hosted versus local dev, and outputs the exact environment variables and next steps rather than dumping generic docs. It pairs naturally with agent clients such as Claude Code or Cursor where MCP env blocks live in config files. After setup, downstream work shifts to querying and app integration skills; this package does not replace secure secret storage or production IAM review.1.1kinstalls7Mongodb Atlas Stream ProcessingMongoDB Atlas Stream Processing is a reference-oriented agent skill for solo builders and small teams who need dependable real-time data paths on Atlas without guessing which connection types work as sources, sinks, or enrichment stages. It centers on a connection capability table that spells out where change streams, Kafka consumers, S3 emits, HTTPS enrichment or sinks, and AWS Lambda external functions are valid, including execution modes required for async sinks versus mid-pipeline sync calls. The skill steers you toward the official ASP_example repository for quickstarts and Terraform patterns so pipeline JSON aligns with supported operators instead of failing at deploy time. Use it while designing event-driven features, CDC from cluster collections, or fan-out to Kafka and Kinesis during Build, then again in Operate when you extend or debug live processors. It complements application ORM work by focusing on Atlas-native stream grammar rather than generic CRUD.613installs