dba-mongodb

Identify and remediate MongoDB indexing, modeling, query, migration, TTL, capacity, and security issues.

4|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/leocosta/octopus --skill dba-mongodb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dba-mongodb
Source: https://github.com/leocosta/octopus/tree/main/skills/dba-mongodb
Command: npx skills add https://github.com/leocosta/octopus --skill dba-mongodb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MongoDB provides powerful capabilities but teams often struggle to identify performance bottlenecks, indexing gaps, and modeling decisions that impact scalability and reliability. This skill catalogs heuristics across indexing, data modeling, queries, migrations, TTL retention, shard keys, security, and concurrency, surfacing actionable recommendations with Mongo shell commands where applicable.

Core Features & Use Cases

  • Indexing heuristics: detect missing indexes, ESL/ESR ordering issues, and index strategy against hot predicates.
  • Modeling recommendations: advise embed vs reference decisions to balance read patterns and document growth.
  • Query & migration guidance: highlight anti-patterns in queries, suggest safer migration strategies, and outline validation checks.
  • Retention & capacity insights: identify TTL usage needs and shard-key health to improve scale and resilience.
  • Security & governance: flag potential exposure risks and provide remediation steps with concrete commands. All findings include a Mongo shell command that can be run to reproduce or fix the issue.

Quick Start

Run the dba-mongodb skill against your MongoDB projects to surface a prioritized findings report and remediation plan.

Frequently Asked Questions about dba-mongodb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find missing indexes and fix MongoDB query performance bottlenecks?

To fix MongoDB query performance bottlenecks, analyze your codebase to detect missing indexes, ESL/ESR ordering issues, and query anti-patterns. This surfaces a prioritized findings report with actionable recommendations and Mongo shell commands to remediate hot predicate issues.

What is the best way to validate MongoDB shard keys and TTL retention strategies?

Validating MongoDB shard keys and TTL retention strategies involves analyzing retention usage needs and shard-key health to improve scale and resilience. This process identifies TTL requirements and flags capacity risks, providing concrete shell commands to reproduce or fix the identified issues.

How do I plan safer MongoDB migrations and avoid data integrity risks?

Planning safer MongoDB migrations requires highlighting query anti-patterns and suggesting validation checks for migration pipelines. Static analysis surfaces potential data integrity risks across staging and production, outlining safer migration strategies with actionable remediation steps.

Can I use static analysis for MongoDB security and governance without a live database connection?

Yes, you can use static analysis for MongoDB security without a live connection. It flags potential exposure risks and provides remediation steps by default, with optional live enrichment available only if you provide a MONGODB_URI in your environment.

When should I choose embed vs reference decisions for MongoDB data modeling?

Choosing embed vs reference decisions for MongoDB data modeling depends on balancing read patterns and document growth. Static analysis advises on these modeling decisions by surfacing actionable recommendations tailored to your specific codebase and database structure.