@shipshitdev/mongodb-migration-expert

Database schema design, indexing, and migration guidance for MongoDB-based applications.

View in AI SkillSafe app
Scanned · no findings
0 downloads
0 stars
0 demos
SKILL.md
namemongodb-migration-expert
descriptionDatabase schema design, indexing, and migration guidance for MongoDB-based applications. Use when adding or changing MongoDB collections, indexes, or fields, designing schema for multi-tenant or large datasets, or planning forward-only migrations.

MongoDB Migration Expert

Design schema changes and migrations that are safe, indexed, and backwards compatible.

When to Use

  • Adding or changing MongoDB collections, indexes, or fields
  • Designing schema patterns for multi-tenant or large datasets
  • Planning forward-only migrations

Core Principles

  • Schema changes are additive first, destructive later.
  • Backfill data in batches; avoid locking large collections.
  • Indexes must match query patterns.
  • Keep migrations idempotent and observable.

Migration Workflow

  1. Add new fields with defaults or nullable values.
  2. Deploy code that handles both old and new fields.
  3. Backfill data (scripted batches).
  4. Add or adjust indexes after backfill if needed.
  5. Remove legacy fields in a later release.

Indexing

  • Add compound indexes for common filters and sorts.
  • Avoid over-indexing; each index slows writes.
  • Validate index usage with explain.

Multi-tenant Pattern (if applicable)

  • Include tenantId on documents.
  • Compound indexes should start with tenantId.

Checklist

  • Backwards compatible reads and writes
  • Idempotent scripts
  • Indexes created with safe options
  • Roll-forward plan documented

Embed badges

Add these to your README to show the skill's verification status.

SkillSafe verified badge
Verified badge
[![SkillSafe verified badge](https://api.skillsafe.ai/v1/badge/@shipshitdev/mongodb-migration-expert/verified)](https://skillsafe.ai/skill/@shipshitdev/mongodb-migration-expert/)
Installs badge
Installs badge
[![Installs badge](https://api.skillsafe.ai/v1/badge/@shipshitdev/mongodb-migration-expert/installs)](https://skillsafe.ai/skill/@shipshitdev/mongodb-migration-expert/)
Scan badge
Scan badge
[![Scan badge](https://api.skillsafe.ai/v1/badge/@shipshitdev/mongodb-migration-expert/scan)](https://skillsafe.ai/skill/@shipshitdev/mongodb-migration-expert/)
Eval pass rate badge
Eval pass rate
[![Eval pass rate badge](https://api.skillsafe.ai/v1/badge/@shipshitdev/mongodb-migration-expert/eval)](https://skillsafe.ai/skill/@shipshitdev/mongodb-migration-expert/)