Skip to main content
subagent CX Codex

mongodb-expert · 0xfurai — Claude Code subagent: what it does, how to install

mongodb-expert — a Claude subagent for MongoDB work: schema design, indexes, aggregation pipelines, replication, backups and migrations.

MIT ★ 1,029 updated 2025-10-15

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/mongodb-expert.md
Open on GitHub

What mongodb-expert does

This subagent covers MongoDB tasks: designing collections, choosing indexes for the queries you actually run, building aggregation pipelines, setting up replica sets and sharding, plus transactions, backups and migrations. The file has four sections: focus areas, approach, a quality checklist and the artefacts it produces.

The approach section takes positions. Index type follows the query shape, collections get shaped around the access patterns the app really has, and a sharding key is picked after looking at how reads are distributed. Transactions belong only where atomicity is required. Backups are automated and restores are tested.

What comes back is concrete: rewritten queries with index suggestions, sample pipelines, a migration plan with a cutover step, a security audit writeup. The frontmatter leaves model blank, so the subagent does not pin a model and runs on whatever Claude uses. It lives in the 0xfurai/claude-code-subagents repo under MIT and installs as a single file in .claude/agents/.

What it helps with

  • Trace a slow query and pick the index it needs
  • Shape collections around the access patterns the app really has
  • Build an aggregation pipeline for a report
  • Plan a data migration with a cutover step
  • Test that a backup restore actually completes

Example prompts for the agent

  • Have mongodb-expert look at the aggregation over the orders collection and tell me where it stalls
  • Check the collection schema for the new service with mongodb-expert
  • Work out a migration to a new sharding key with mongodb-expert

How to install mongodb-expert

Manually: put the files in place

.claude/agents/mongodb-expert.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about mongodb-expert

How do I install mongodb-expert in Claude Code?

Copy .claude/agents/mongodb-expert.md into the .claude/agents/ folder of your project. Claude picks the subagent up from there.

What does mongodb-expert do?

It designs schemas, selects indexes, writes aggregation pipelines, and plans replication, sharding, backups and migrations. Answers come back as queries, plans and reports.

Does the subagent pin its own model?

No. The model field in the frontmatter is blank, so it runs on whichever model Claude is set to.

Source text

mongodb-expert.md · MIT
---
name: mongodb-expert
description: Master MongoDB operations, schema design, performance optimization, and data modeling. Handles indexing, aggregations, and replication. Use PROACTIVELY for MongoDB query optimization, data consistency, or database scaling.
model: claude-sonnet-4-20250514
---

## Focus Areas

- Efficient query design and optimization
- Schema design using best practices for MongoDB
- Advanced indexing strategies for performance
- Aggregation framework and pipeline design
- Replication and sharding setup for scalability
- Transactions and data consistency across operations
- Backup and restore procedures for disaster recovery
- Data migration and ETL processes
- Monitoring and performance tuning
- Security best practices including authentication and authorization

## Approach

- Use appropriate index types for different query patterns
- Optimize schema for the most common access patterns
- Leverage built-in features like replica sets for fault tolerance
- Utilize aggregation pipelines for complex data analysis
- Design sharding based on data access patterns
- Implement transactions only when necessary for data integrity
- Automate backup processes and regularly test restore capabilities
- Plan migrations to minimize downtime and ensure data integrity
- Continuously monitor database performance and query execution plans
- Regularly review and update security configurations to protect data

## Quality Checklist

- Indexes are properly set up and align with query patterns
- Schema design follows MongoDB best practices
- Aggregation pipelines are efficient and performant
- Replication setup is tested and reliable
- Sharding keys are chosen based on thorough analysis
- Transactions cover all critical operations needing atomicity
- Backup processes are automated and restore tests are successful
- Data migrations are planned and executed with minimal disruptions
- Performance tuning includes query profiling and index evaluation
- Security settings are updated with the latest best practices and patches

## Output

- Optimized queries with relevant index recommendations
- Schema designs tailored for application needs
- Aggregation pipeline samples for complex analytics
- Replication and sharding configuration guides
- Transaction examples covering critical use cases
- Comprehensive backup and restore plans
- Migration plans with cutover strategies
- Performance reports with tuning recommendations
- Security audit reports with actionable insights
- Documentation on best practices and setup configurations for MongoDB

© 0xfurai · MIT · 0xfurai/claude-code-subagents

Similar subagents

All subagents for Data and databases →

mongodb-expert by other authors comes first.

mongodb-expert carlrannaberg mongodb-expert — a Claude Code subagent for MongoDB modeling, aggregation tuning, indexes, sharding, replica sets, and connection pools. CX Codex ★ 763repo stars mongodb Claude MPM Team Equips coding agents with MongoDB schema design patterns, query operators, and document modeling strategies for NoSQL workloads. CX Codex +1 358installs mongodb-query-optimizer mongodb mongodb-query-optimizer — a skill for analyzing slow MongoDB queries and recommending indexes. Works on Claude Code, Codex, Cursor, GitHub Copilot and more. Activates when you ask why a query is slow or how to speed it up. CX Codex +1 7,700installs mongodb-natural-language-querying mongodb mongodb-natural-language-querying — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode that builds read-only MongoDB find queries and aggregation pipelines from plain-language descriptions. CX Codex +1 5,000installs mongodb-development Mindrally MongoDB development rules: schemas, indexes, aggregation pipelines, Mongoose and Payload CMS. Useful when the agent writes a TypeScript backend. CX Codex +1 935installs mongodb-performance-advisor official github mongodb-performance-advisor analyzes MongoDB queries across your codebase and audits database performance using a readonly MCP server. Identifies slow operations and optimizes aggregation pipelines. CX Codex +1 223installs 705-technologies-nosql-mongodb Juan Antonio Breña Moral 705-technologies-nosql-mongodb — a skill for Claude Code, Codex, Cursor, GitHub Copilot and Gemini CLI that covers MongoDB at the database layer, independent of Spring Boot, Quarkus or Micronaut. CX Codex +1 216installs

From the same set137

The whole set →
puppeteer-expert The puppeteer-expert subagent builds Puppeteer workflows for headless browsing, scraping, and automated checks. Use it when pages load content dynamically or require browser interactions. CX Codex ★ 1,029repo stars auth0-expert auth0-expert — a Claude subagent for Auth0 work: dashboard configuration, OAuth2.0 and OpenID Connect flows, social login, MFA, SSO, Rules and Hooks. CX Codex ★ 1,029repo stars tailwind-expert The tailwind-expert subagent for Claude Code guides responsive Tailwind CSS styling, theme setup, and PurgeCSS cleanup for web projects. CX Codex ★ 1,029repo stars nextjs-expert nextjs-expert is a Claude Code subagent for Next.js work across SSR, SSG, API routes, and React apps. It joins tasks involving routing, data loading, and app checks. CX Codex ★ 1,029repo stars rabbitmq-expert rabbitmq-expert is a Claude Code subagent focused on RabbitMQ architecture, queue tuning, and high-availability clustering. CX Codex ★ 1,029repo stars dynamodb-expert The dynamodb-expert subagent for Claude Code helps design DynamoDB schemas, choose keys and indexes, and review queries and capacity settings when designing or checking a database. CX Codex ★ 1,029repo stars grpc-expert grpc-expert — a Claude subagent for gRPC work: streaming, protobuf, channel setup, load balancing and tracing. Useful when calls fail with vague status codes. CX Codex ★ 1,029repo stars postgres-expert postgres-expert helps design PostgreSQL schemas, optimize slow SQL queries, and configure indexes for balanced read and write performance. CX Codex ★ 1,029repo stars

Project sponsors

Companies that keep this analytics open