id: "mongodb-query-optimizer"
kind: "skill"
name: "mongodb-query-optimizer"
title: "Mongodb Query Optimizer"
description: "Help with MongoDB query optimization and indexing. Use only when the user asks for optimization or performance: \"How do I optimize this query?\", \"How do I index this?\", \"Why is this query slow?\", \"Can you fix my slow queries?\", \"What are the slow queries on my cluster?\", etc. Do not invoke for general MongoDB query writing unless user asks for performance or index help. Prefer indexing as optimization strategy. Use MongoDB MCP when available."
category: "ai-ml"
source:
  repository: "mongodb/agent-skills"
  path: "plugins/mongodb-atlas/skills/mongodb-query-optimizer/SKILL.md"
  commit: "ff9a88211c5a9fa74012bfa8b797132d510f9b44"
  url: "https://github.com/mongodb/agent-skills/tree/ff9a88211c5a9fa74012bfa8b797132d510f9b44/plugins/mongodb-atlas/skills/mongodb-query-optimizer"
license:
  spdx: "Apache-2.0"
  from: "SKILL.md frontmatter"
  redistributable: true
stars: 206
updated_at: "2026-11-19T15:33:48Z"
score: 0.912
rank: 17
files_count: 5
bytes: 25155
has_scripts: false
trust_level: "unreviewed"
reviewed_by: "eval-v1"
source_tier: "official"
eval:
  version: "eval-v1"
  date: "2026-11-21T10:41:34Z"
  model: "claude-sonnet-5-5"
  score: 0.912
  signals:
    tier: 1.0
    rubric: 1.0
    judge: 0.9233
    smoke: 1.0
    popularity: 0.465
  rubric:
    score: 1.0
    trigger: 1.0
    scope: 1.0
    safety: 1.0
    injection: 1.0
    references: 1.0
    license: 1.0
    risky: []
    broken_references: []
  judge:
    trigger: 5
    scope: 5
    instructions: 4
    safety: 5
    injection: 5
    references: 5
    overall: 9
    verdict: "feature"
    rationale: "The description is specific and says when not to invoke. The scope is one job: MongoDB query and index optimization. The instructions give exact MCP tool names and argument shapes, a diagnostic flow (collection-indexes, then explain, then find, plus Performance Advisor) and two worked examples. Safety is good: it requires user approval before creating indexes and only suggests dropping indexes when Performance Advisor recommends it. All four referenced files are present. There is no injection. The main weakness is that the detailed guidance is delegated to the reference files."
  smoke:
    status: "passed"
    triggered: true
    grade: 2
    task: "My query db.orders.find({status:'shipped', region:'US'}).sort({date:-1}) is slow and I only have an index on status. What index should I create and why?"
    date: "2026-11-21T11:44:20Z"
    model: "claude-sonnet-5-5"
requires:
  tools: []
  runtimes: []
  network: false
  mcp: []
compat:
  - client: "claude-code"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "codex-cli"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "cursor"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "gemini-cli"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "vscode-copilot"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "opencode"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "claude-desktop"
    status: "full"
    reasons: ["ok"]
    source: "derived"
  - client: "chat-mcp"
    status: "full"
    reasons: ["ok"]
    source: "derived"
files:
  - path: "SKILL.md"
    bytes: 10444
    sha256: "368dee58ba8ea64052c6e22eae3a259c29bc11ccd8e262917846ba60ed6be834"
    url: "https://raw.githubusercontent.com/mongodb/agent-skills/ff9a88211c5a9fa74012bfa8b797132d510f9b44/plugins/mongodb-atlas/skills/mongodb-query-optimizer/SKILL.md"
  - path: "references/aggregation-optimization.md"
    bytes: 6721
    sha256: "2fc2c388ce09117ba8b469eaac5bd36611b99317597b815334cde00aa3841909"
    url: "https://raw.githubusercontent.com/mongodb/agent-skills/ff9a88211c5a9fa74012bfa8b797132d510f9b44/plugins/mongodb-atlas/skills/mongodb-query-optimizer/references/aggregation-optimization.md"
  - path: "references/antipattern-examples.md"
    bytes: 2527
    sha256: "70ca3af514a0ff15945084929181d31c31a489677e639234499f0c92fa8482d7"
    url: "https://raw.githubusercontent.com/mongodb/agent-skills/ff9a88211c5a9fa74012bfa8b797132d510f9b44/plugins/mongodb-atlas/skills/mongodb-query-optimizer/references/antipattern-examples.md"
  - path: "references/core-indexing-principles.md"
    bytes: 4319
    sha256: "67b9f3487238d6a2419b700af2c7781ec6a4f2416da39d8a0e661728545174e9"
    url: "https://raw.githubusercontent.com/mongodb/agent-skills/ff9a88211c5a9fa74012bfa8b797132d510f9b44/plugins/mongodb-atlas/skills/mongodb-query-optimizer/references/core-indexing-principles.md"
  - path: "references/update-query-examples.md"
    bytes: 1144
    sha256: "ddc421ffa5b11c57fa6bac9e81bf57e8ceddb34813995d39e1629bc891a759ff"
    url: "https://raw.githubusercontent.com/mongodb/agent-skills/ff9a88211c5a9fa74012bfa8b797132d510f9b44/plugins/mongodb-atlas/skills/mongodb-query-optimizer/references/update-query-examples.md"
alternates:
  - name: "mongodb-query-optimizer"
    repository: "mongodb/agent-skills"
    path: "plugins/mongodb/skills/mongodb-query-optimizer/SKILL.md"
    commit: "ff9a88211c5a9fa74012bfa8b797132d510f9b44"
    url: "https://github.com/mongodb/agent-skills/tree/ff9a88211c5a9fa74012bfa8b797132d510f9b44/plugins/mongodb/skills/mongodb-query-optimizer"
    license: "Apache-2.0"
    stars: 206
    score: 0.9022
    similarity: 1.0
    reason: "identical content"
  - name: "mongodb-query-optimizer"
    repository: "mongodb/agent-skills"
    path: "skills/mongodb-query-optimizer/SKILL.md"
    commit: "ff9a88211c5a9fa74012bfa8b797132d510f9b44"
    url: "https://github.com/mongodb/agent-skills/tree/ff9a88211c5a9fa74012bfa8b797132d510f9b44/skills/mongodb-query-optimizer"
    license: "Apache-2.0"
    stars: 206
    score: 0.9022
    similarity: 1.0
    reason: "identical content"
  - name: "mongodb-query-optimizer"
    repository: "fcakyon/claude-codex-settings"
    path: "plugins/mongodb-skills/skills/mongodb-query-optimizer/SKILL.md"
    commit: "18250de0945fbf3a2c373dbfb35a94b1435becd6"
    url: "https://github.com/fcakyon/claude-codex-settings/tree/18250de0945fbf3a2c373dbfb35a94b1435becd6/plugins/mongodb-skills/skills/mongodb-query-optimizer"
    license: "Apache-2.0"
    stars: 1214
    score: 0.7408
    similarity: 1.0
    reason: "same name"
icon: "https://versatile.sh/avatars/mongodb.png"
