Agent Skills: Generate Database Migrations

Generate database migrations for a Medusa module

UncategorizedID: medusajs/medusa-claude-plugins/db-generate

Install this agent skill to your local

pnpm dlx add-skill https://github.com/medusajs/medusa-agent-skills/tree/HEAD/plugins/medusa-dev/skills/db-generate

Skill Files

Browse the full folder contents for db-generate.

Download Skill

Loading file tree…

plugins/medusa-dev/skills/db-generate/SKILL.md

Skill Metadata

Name
db-generate
Description
Generate database migrations for a Medusa module

Generate Database Migrations

Generate database migrations for the specified Medusa module.

The user will provide the module name as an argument (e.g., brand, product, custom-module).

For example: /medusa-dev:db-generate brand

Use the Bash tool to execute the command npx medusa db:generate <module-name>, replacing <module-name> with the provided argument.

Report the results to the user, including:

  • The module name for which migrations were generated
  • Migration file name or location
  • Any errors or warnings
  • Next steps (running npx medusa db:migrate to apply the migrations)