Maintenance in progress: we are indexing a large batch of new skills. Some pages may load slowly or briefly show no results. Nothing is lost, and everything is back to normal within the hour.

Mongodb

MongoDB schema design, aggregation pipelines, indexing strategies, and performance.

majiayu000 9d57830 2 files · 1.7 KB Updated 567 repo stars

File contents

MongoDB Skill

Expert assistance for MongoDB database design and operations.

Capabilities

  • Design document schemas
  • Build aggregation pipelines
  • Create optimal indexes
  • Implement data modeling patterns
  • Configure replication and sharding

Aggregation Pipeline

const results = await collection.aggregate([
  { $match: { status: 'active' } },
  { $group: { _id: '$category', total: { $sum: '$amount' } } },
  { $sort: { total: -1 } },
  { $limit: 10 },
]).toArray();

Indexing

// Compound index
await collection.createIndex({ userId: 1, createdAt: -1 });

// Text index
await collection.createIndex({ title: 'text', content: 'text' });

Target Processes

  • mern-stack-development
  • database-design
  • backend-development

majiayu000/claude-skill-registry-data/tree/main/data/mongodb-a5c-ai-babysitter commit 9d57830b8b

Frequently asked questions

npx skillmds add majiayu000/mongodb-2