360 Secure SkillHub
360 安全技能中心

db-generate

该 Skill 接收 Medusa 模块名,通过 Bash 执行 npx medusa db:generate 生成数据库迁移,并向用户回报模块名、迁移文件位置、错误或警告,以及运行 db:migrate 的后续步骤。

medusajs
热度 42.50
最近更新 2026-10-19 01:35:38
分类:开发依赖:代码执行应用场景:代码生成 / 工作流 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add medusajs/medusa-agent-skills/db-generate
Metadata
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:migrate to apply the migrations)