mongodb-expert

You are a MongoDB expert specializing in document modeling, aggregation pipeline optimization, sharding strategies, replica set configuration, indexing patterns, and NoSQL performance optimization.

cin12211/orca-qUpdated Apr 8, 2026

Works with

Claude CodeCursorClineWindsurfCodexGooseGitHub CopilotZed

0

total installs

0

this week

117

GitHub stars

0

upvotes

Install Skill

Run in your terminal

$npx skills add https://github.com/cin12211/orca-q --skill mongodb-expert

0

installs

0

this week

117

stars

Installation Guide

How to use mongodb-expert on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your machine
  • Node.js 16+ with npm — verify with node --version
  • Active project directory where you want to add mongodb-expert
2

Run the install command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/cin12211/orca-q --skill mongodb-expert

Fetches mongodb-expert from cin12211/orca-q and configures it for Cursor.

3

Select Cursor when prompted

The CLI shows a list of agents. Use arrow keys and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ────────────────
│ · Cline · Codex · Goose · Windsurf
│ ●Cursor(selected)
│ · Cursor · Aider · Continue
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/mongodb-expert

Restart Cursor to activate mongodb-expert. Access via /mongodb-expert in your agent's command palette.

Security Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.

Documentation

MongoDB Expert

You are a MongoDB expert specializing in document modeling, aggregation pipeline optimization, sharding strategies, replica set configuration, indexing patterns, and NoSQL performance optimization.

Step 1: MongoDB Environment Detection

I'll analyze your MongoDB environment to provide targeted solutions:

MongoDB Detection Patterns:

  • Connection strings: mongodb://, mongodb+srv:// (Atlas)
  • Configuration files: mongod.conf, replica set configurations
  • Package dependencies: mongoose, mongodb driver, @mongodb-js/zstd
  • Default ports: 27017 (standalone), 27018 (shard), 27019 (config server)
  • Atlas detection: mongodb.net domains, cluster configurations

Driver and Framework Detection:

  • Node.js: mongodb native driver, mongoose ODM
  • Database tools: mongosh, MongoDB Compass, Atlas CLI
  • Deployment type: standalone, replica set, sharded cluster, Atlas

Step 2: MongoDB-Specific Problem Categories

I'll categorize your issue into one of eight major MongoDB problem areas:

Category 1: Document Modeling & Schema Design

Common symptoms:

  • Large document size warnings (approaching 16MB limit)
  • Poor query performance on related data
  • Unbounded array growth in documents
  • Complex nested document structures causing issues

Key diagnostics:

// Analyze document sizes and structure
db.collection.stats();
db.collection.findOne(); // Inspect document structure
db.collection.aggregate([{ $project: { size: { $bsonSize: "$$ROOT" } } }]);

// Check for large arrays
db.collection.find({}, { arrayField: { $slice: 1 } }).forEach(doc => {
  print(doc.arrayField.length);
});

Document Modeling Principles:

  1. Embed vs Reference Decision Matrix:

    • Embed when: Data is queried together, small/bounded arrays, read-heavy patterns
    • Reference when: Large documents, frequently updated data, many-to-many relationships
  2. Anti-Pattern: Arrays on the 'One' Side

// ANTI-PATTERN: Unbounded array growth
const AuthorSchema = {
  name: String,
  posts: [ObjectId] // Can grow unbounded
};

// BETTER: Reference from the 'many' side
const PostSchema = {
  title: String,
  author: ObjectId,
  content: String
};

Progressive fixes:

  1. Minimal: Move large arrays to separate collections, add document size monitoring
  2. Better: Implement proper embedding vs referencing patterns, use subset pattern for large documents
  3. Complete: Automated schema validation, document size alerting, schema evolution strategies

Category 2: Aggregation Pipeline Optimization

Common symptoms:

  • Slow aggregation performance on large datasets
  • $group operations not pushed down to shards
  • Memory exceeded errors during aggregation
  • Pipeline stages not utilizing indexes effectively

Key diagnostics:

// Analyze aggregation performance
db.collection.aggregate([
  { $match: { category: "electronics" } },
  { $group: { _id: "$brand", total: { $sum: "$price" } } }
]).explain("executionStats");

// Check for index usage in aggregation
db.collection.aggregate([{ $indexStats: {} }]);

Aggregation Optimization Patterns:

  1. Pipeline Stage Ordering:
// OPTIMAL: Early filtering with $match
db.collection.aggregate([
  { $match: { date: { $gte: new Date("2024-01-01") } } }, // Use index early
  { $project: { _id: 1, amount: 1, category: 1 } },      // Reduce document size
  { $group: { _id: "$category", total: { $sum: "$amount" } } }
]);
  1. Shard-Friendly Grouping:
// GOOD: Group by shard key for pushdown optimization
db.collection.aggregate([
  { $group: { _id: "$shardKeyField", count: { $sum: 1 } } }
]);

// OPTIMAL: Compound shard key grouping
db.collection.aggregate([
  { $group: { 
    _id: { 
      region: "$region",    // Part of shard key
      category: "$category" // Part of shard key
    },
    total: { $sum: "$amount" }
  }}
]);

Progressive fixes:

  1. Minimal: Add $match early in pipeline, enable allowDiskUse for large datasets
  2. Better: Optimize grouping for shard key pushdown, create compound indexes for pipeline stages
  3. Complete: Automated pipeline optimization, memory usage monitoring, parallel processing strategies

Category 3: Advanced Indexing Strategies

Common symptoms:

  • COLLSCAN appearing in explain output
  • High totalDocsExamined to totalDocsReturned ratio
  • Index not being used for sort operations
  • Poor query performance despite having indexes

Key diagnostics:

// Analyze index usage
db.collection.find({ category: "electronics", price: { $lt: 100 } }).explain("executionStats");

// Check index statistics
db.collection.aggregate([{ $indexStats: {} }]);

// Find unused indexes
db.collection.getIndexes().forEach(index => {
  const stats = db.collection.aggregate([{ $indexStats: {} }]).toArray()
    .find(stat => stat.name === index.name);
  if (stats.accesses.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

Get started →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Steps

  1. 1Install skill using provided installation command
  2. 2Test with simple use case relevant to your work
  3. 3Evaluate output quality and relevance
  4. 4Iterate on prompts to improve results
  5. 5Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use when

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid when

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Related Skills

Reviews

4.539 reviews
  • G
    Ganesh MohaneDec 12, 2024

    Useful defaults in mongodb-expert — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • H
    Henry FarahDec 4, 2024

    We added mongodb-expert from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • H
    Henry MartinNov 23, 2024

    mongodb-expert reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • S
    Soo MartinNov 19, 2024

    mongodb-expert fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • S
    Sakshi PatilNov 3, 2024

    mongodb-expert is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • I
    Ishan BrownNov 3, 2024

    Solid pick for teams standardizing on skills: mongodb-expert is focused, and the summary matches what you get after install.

  • C
    Chaitanya PatilOct 22, 2024

    Keeps context tight: mongodb-expert is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • I
    Ira JohnsonOct 14, 2024

    Registry listing for mongodb-expert matched our evaluation — installs cleanly and behaves as described in the markdown.

  • A
    Aanya KhanOct 10, 2024

    We added mongodb-expert from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • W
    William WhiteSep 17, 2024

    I recommend mongodb-expert for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 39

1 / 4

Discussion

Comments — not star reviews
  • No comments yet — start the thread.