118downloads

Write MongoDB queries from natural language

Translate data questions into MongoDB filters and aggregation pipelines. Use this skill for query syntax and document operations rather than Atlas Search.

When it runs

Your agent reads this description from SKILL.md to decide when to load the skill:

Generate read-only MongoDB queries (find) or aggregation pipelines using natural language, with collection schema context and sample documents. Use this skill whenever the user asks to write, create, or generate MongoDB queries, wants to filter/query/aggregate data in MongoDB, asks "how do I query...", needs help with query syntax, or discusses finding/filtering/grouping MongoDB documents. Also use for translating SQL-like requests to MongoDB syntax. Does NOT handle Atlas Search ($search operator), vector/semantic search ($vectorSearch operator), fuzzy matching, autocomplete indexes, or relevance scoring - use search-and-ai for those. Does NOT analyze or optimize existing queries - use mongodb-query-optimizer for that. Does NOT handle aggregation pipelines that involve write operations. Requires MongoDB MCP server.

What SKILL.md covers

  • Query Generation Process
  • Best Practices
  • Schema Analysis
  • Sample Document Usage
  • Error Handling
  • Example Workflow
  • Managing Context Size

Files in the ZIP

Related skills