1. Habit
  2. Skills
  3. MongoDB Natural Language Querying skill
mongodb · 5K installs

MongoDB Natural Language Querying skill
Runs by itself, weekly data questions.

Recurring data questions answered read-only.

Install the MongoDB Natural Language Querying skill and make it a habit: follow https://gethabit.dev/skills/mongodb/mongodb-natural-language-querying.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

5K installs190 starsApache-2.0 licenceSource on GitHub ↗

MongoDB Natural Language Querying

by mongodb · 5K installs

The skill

Mongodb natural language querying turns plain-language questions into read-only MongoDB find queries or aggregation pipelines, using schema, indexes and sample documents from the MongoDB MCP server.

Only when you ask.

The habit

Recurring data questions answered read-only.

↻ Runs by itselfweekly data questions

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after at most 10 saved questions per run, with 1 retry each.

  1. 01

    Load questions

    Read the saved questions and their database and collection names.

  2. 02

    Fetch context

    Call collection-indexes, collection-schema with a sample size and find with a small limit.

  3. 03

    Validate fields

    Check every field name and type against the schema before writing the query.

  4. 04

    Write the query

    Prefer a find query and use an aggregation only for grouping, joins or multi-stage work.

  5. 05

    Check indexes

    Note when no index supports the filter so you can decide whether to add one.

  6. 06

    Run and log

    Run the query through the MCP server and log the query and result summary.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the MongoDB Natural Language Querying skill helps.

Use it when

  • ✓ You need a MongoDB query
  • ✓ You translate SQL to MongoDB
  • ✓ You group or filter documents

Skip it when

  • – You optimize an existing query
  • – You need Atlas Search or vector search

Questions

MongoDB Natural Language Querying skill, answered.

Can it change my data?

No. The skill only generates read-only find queries and aggregations without write stages.

Does it handle Atlas Search or vector search?

No. Those belong to a separate search-and-ai skill.

Why check the schema first?

MongoDB does not error on a wrong field name; it just returns nothing.

How do I install the MongoDB Natural Language Querying skill?

Copy the prompt at the top into your agent. It installs the skill from mongodb/agent-skills and sets up the habit. Or run npx skills add mongodb/agent-skills --skill mongodb-natural-language-querying.

Is the MongoDB Natural Language Querying skill free?

Yes. It is published under Apache-2.0. Habit is free too.

MongoDB Natural Language Querying. Now as a habit.

Install the MongoDB Natural Language Querying skill and make it a habit: follow https://gethabit.dev/skills/mongodb/mongodb-natural-language-querying.md

  • Free
  • No account
  • Undo in one line

All mongodb skills →More ops skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by mongodb, published under Apache-2.0. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.