
db-generate
β 195by medusajs Β· part of medusajs/medusa-agent-skills
Generate database migrations for Medusa modules with a single command. Wraps the npx medusa db:generate CLI command to create migration files for specified Medusa modules Accepts module name as an argument and reports migration file location, errors, and next steps Automatically suggests running npx medusa db:migrate after generation to apply migrations
This is the playbook your agent receives when the skill activates β you don't need to read it to use the skill, but it's here to audit before installing.
name: db-generate description: Generate database migrations for a Medusa module argument-hint: <module-name> allowed-tools: Bash(npx medusa db:generate:*)
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:migrateto apply the migrations)
npx skills add https://github.com/medusajs/medusa-agent-skills --skill db-generateRun this in your project β your agent picks the skill up automatically.
No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.