create-migration

Create and manage MongoDB migrations for schema or data changes.

11|6|Updated Nov 15, 2025
One-click install
npx skills add https://github.com/mako-ai/mako --skill create-migration-mako-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-migration
Source: https://github.com/mako-ai/mako/tree/main/.cursor/skills/create-migration
Command: npx skills add https://github.com/mako-ai/mako --skill create-migration-mako-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create and manage MongoDB migrations for schema or data changes.

Core Features & Use Cases

  • Generate structured migration files to modify MongoDB schemas or data safely.
  • Enforce idempotent operations by checking existing indexes, fields, or data states before applying changes.
  • Track and apply migrations using a centralized runner, with easy status checks and rollback guidance.

Quick Start

Create a new migration by running pnpm migrate create "description_of_change" and implement an idempotent up function in the generated file.

Frequently Asked Questions about create-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate MongoDB migrations for schema changes?

Automate MongoDB migrations by generating structured migration files and implementing an idempotent up function to safely modify schemas. This approach streamlines database evolution across development, staging, and production environments with centralized status tracking.

How do I ensure idempotent MongoDB indexing operations?

Ensure idempotent MongoDB indexing by checking existing indexes, fields, or data states before applying changes within your migration function. This prevents duplicate indexing or schema errors during repeated deployments across different environments.

What is the best way to track MongoDB migration status across environments?

Track MongoDB migration status using a centralized runner that provides easy status checks before applying schema changes. This structured workflow enforces naming conventions and ensures safe, repeatable deployments across development, staging, and production.

How do I create a new MongoDB migration stub?

Create a new MongoDB migration stub by running the migration command with a descriptive label, then implement the generated idempotent up function. This structured file generation enforces naming conventions for safe database evolution.

Can I use this migration workflow for both data and schema changes in MongoDB?

Yes, you can use this workflow for both data and schema changes in MongoDB. The generated migration files enforce idempotent operations by checking existing data states before applying modifications, ensuring safe repeatable deployments.

Why do my MongoDB schema migrations fail on repeated deployments?

MongoDB schema migrations fail on repeated deployments when operations lack idempotency, meaning they do not check existing indexes or fields before applying changes. Implementing an idempotent up function ensures safe, repeatable migrations without duplicate execution errors.