
Db Generate
If you're working with Medusa and need to generate database migrations for your modules, this handles the npx command for you and formats the output. You give it a module name like `brand` or `product`, it runs `npx medusa db:generate` with that argument, then reports back what migration file was created and reminds you to actually run the migration. It's narrow in scope but saves you from context switching to your terminal for a command you'll run dozens of times while developing custom Medusa modules. The real value is keeping you in your Claude workflow instead of breaking out to bash every time your schema changes.
- skills.sh installs
- 3.6K
- GitHub stars
- 236
- last updated
- Aug 21, 2026
Install
$ npx -y skills add medusajs/medusa-agent-skills --skill db-generate --agent claude-codeInstalls into .claude/skills of the current project.
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:migrateto apply the migrations)
Sponsors
Details
- Repository
- github.com/medusajs/medusa-agent-skills
- Categories
- Backend & APIs, AI & Agent Building, Databases
- First seen
- Apr 16, 2026
More from medusajs/medusa-agent-skills
All 15- Learning Medusa3.6K
- New User3.2K
- Using Medusa Cloud1.6K
- Mcloud Deployments1.5K
- Mcloud Variables1.5K
- Mcloud Environments1.5K
- Mcloud Projects1.5K
- Mcloud Logs1.5K
- Mcloud Organizations1.5K
- Storefront Best Practices5K
- Building With Medusa4.8K
- Building Admin Dashboard Customizations4.7K
- Building Storefronts4.4K
- Db Migrate3.7K