medusajs avatar

Db Generate

Generates database migrations for a named Medusa module by running the Medusa CLI with the module name.

CCM score
61 of 100
skills.sh installs
3.7K
GitHub stars
238
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers one task: running npx medusa db:generate <module-name> for a module such as brand, product, or custom-module
  • Takes the module name as a single argument and passes it through to the Medusa CLI unchanged
  • Reports the module name, the generated migration file name or location, and any errors or warnings
  • Points the user to npx medusa db:migrate as the next step for applying the generated migrations

Install

$ npx -y skills add medusajs/medusa-agent-skills --skill db-generate -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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)

Details

Repository
github.com/medusajs/medusa-agent-skills
Categories
Databases, Backend & APIs
First seen
Apr 16, 2026

More from medusajs/medusa-agent-skills

All 15

Similar to Db Generate

More Databases