
Db Generate
Generate Medusa module database migrations after you define or change custom commerce modules so schema stays in sync with code.
Install
npx skills add https://github.com/medusajs/medusa-agent-skills --skill db-generateWhat is this skill?
- Runs npx medusa db:generate <module-name> via allowed Bash tooling
- Accepts module name argument such as brand, product, or custom-module
- Reports migration file name or location after generation
- Surfaces errors and warnings from the Medusa CLI
- Documents next step: npx medusa db:migrate to apply migrations
Adoption & trust: 1.5k installs on skills.sh; 185 GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Entra App Registrationmicrosoft/azure-skills
Azure Aigatewaymicrosoft/azure-skills
Lark Openapi Explorerlarksuite/cli
Supabasesupabase/agent-skills
Firebase Auth Basicsfirebase/agent-skills
Firebase Data Connectfirebase/agent-skills
Journey fit
Common Questions / FAQ
Is Db Generate safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - 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:migrate` to apply the migrations)