# Mongodb

> Mongodb is an Agent Skill for development published in the a5c-ai/babysitter repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

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

- Skill name: `mongodb`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/a5c-ai/babysitter/blob/HEAD/library/specializations/web-development/skills/mongodb/SKILL.md
- Repository: a5c-ai/babysitter (1,548 GitHub stars when collected)

## SKILL.md

# 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

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

## Indexing

```typescript
// 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

---

Source: https://www.openparable.com/skill/development/mongodb (OpenParable). Cite the canonical URL above.
