Agent skill

DB Generate

by medusajs in medusajs/medusa-agent-skills

Generate database migrations for a Medusa module. An agent skill from medusajs/medusa-agent-skills.

No licenceAuto-check passedDatabases

Install DB Generate

skills CLI
$ npx skills add medusajs/medusa-agent-skills --skill db-generate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install medusajs/medusa-agent-skills db-generate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/medusajs/medusa-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/medusa-dev/skills/db-generate .claude/skills/db-generate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
db-generate
GitHub stars
228
Token cost
~192 tokens
SKILL.md length
81 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
None found

At a glance

Generate database migrations for a Medusa module. An agent skill from medusajs/medusa-agent-skills.

  • Tasks that involve Database migrations
  • Calls npx

What it does

DB Generate is an agent skill from medusajs/medusa-agent-skills. Generate database migrations for a Medusa module

Its SKILL.md is about 190 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Database migrations. The repository describes itself as: Agent skills and commands for Medusa best practices and conventions.

When your agent uses it

  • Tasks that involve Database migrations

Example prompts

  • “/db-generate”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): Bash(npx medusa db:generate:*)

What it can do on your machine

Read from SKILL.md and the folder at commit 066132d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(npx medusa db:generate:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

DB Generate loads about 192 tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 81 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~15
When it runs · the whole SKILL.md, loaded when a task matches
~192

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 81 words (~192 tokens).

“Generate database migrations for the specified Medusa module.”

— opening of SKILL.md by medusajs
name
db-generate
allowed-tools
Bash(npx medusa db:generate:*)
argument-hint
<module-name>

Read the full SKILL.md on GitHub

Files

Just SKILL.md in plugins/medusa-dev/skills/db-generate of medusajs/medusa-agent-skills.

Open the folder on GitHubat commit 066132d

Compare with similar skills

DB Generate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

DB Generate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
DB Generate this skillmedusajs/medusa-agent-skills228—~192Automated safety check: PassNone
Evolving The Data ModelTriliumNext/Trilium38k—~2.1kAutomated safety check: PassAGPL-3.0
Creating Database MigrationsNangoHQ/nango13k—~449Automated safety check: PassCustom licence
Openwrt Package UpdateNethServer/nethsecurity191—~841Automated safety check: PassCustom licence
Free Willsyahiidkamil/Software-Engineer-AI-Agent-Atlas401—~3.4kAutomated safety check: PassNone
Ecto Migrationsoperately/operately577—~1.2kAutomated safety check: PassCustom licence

Similar skills

  • Evolving The Data Model

    TriliumNext/Trilium

    A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…

    38k GitHub stars~2.1k tokensUpdated today
    DatabasesAuto-check passed
  • A skill your agent uses when adding or editing Nango database migrations - covers migration directory selection, timestamped .cjs naming, matching recent migration style, down migration decisions…

    13k GitHub stars~449 tokensUpdated today
    DatabasesAuto-check passed
  • Openwrt Package Update

    NethServer/nethsecurity

    A skill your agent uses when updating any forked OpenWrt package in a NethSecurity workspace from the upstream openwrt/packages feed.

    191 GitHub stars~841 tokensUpdated yesterday
    DatabasesAuto-check passed
  • Free Will

    syahiidkamil/Software-Engineer-AI-Agent-Atlas

    Deliberate-choice procedure for a medium-to-high-stakes engineering fork — when the first plausible solution (the instinct, the default next-token pull) would be costly to get wrong.

    401 GitHub stars~3.4k tokensUpdated 3 mo ago
    DatabasesAuto-check passed
  • Ecto Migrations

    operately/operately

    Rules for Operately schema migrations (app/priv/repo/migrations/) and data migrations (app/lib/operately/data/change.ex).

    577 GitHub stars~1.2k tokensUpdated yesterday
    DatabasesAuto-check passed
  • DB Migrate

    simstudioai/sim

    Author or review a Drizzle DB migration for zero-downtime safety — expand/contract phasing, backward-compatibility with the deployed app version, and writing the -- migration-safe acknowledgment the…

    30k GitHub stars~2k tokensUpdated today
    DatabasesAuto-check passed

More from medusajs/medusa-agent-skills

All 16 skills in this repo
  • Medusa Internal Admin Agents

    medusajs/medusa-agent-skills

    Walks through adding an AI agent for store operators to a Medusa project: data models, module service, agent runtime, streaming API route and admin chat UI.

    228 GitHub stars~1.9k tokensUpdated 4 days ago
    Auto-check passed
  • Learning Medusa

    medusajs/medusa-agent-skills

    Interactive tutorial where the agent teaches Medusa development by guiding you through building a brands feature, with lessons and verification checkpoints.

    228 GitHub stars~4.1k tokensUpdated 4 days ago
    Auto-check passed
  • Medusa Cloud CLI Authentication

    medusajs/medusa-agent-skills

    Runs the mcloud commands for logging in, checking who is authenticated, and choosing the active organization, project and environment.

    228 GitHub stars~1.1k tokensUpdated 4 days ago
    Auto-check passed
  • Medusa Cloud Deployments CLI

    medusajs/medusa-agent-skills

    Lists Medusa Cloud deployments, fetches one deployment's details and reads backend or storefront build logs through the mcloud CLI to debug failed builds.

    228 GitHub stars~883 tokensUpdated 4 days ago
    Auto-check passed
  • mcloud Environments

    medusajs/medusa-agent-skills

    Runs mcloud environments commands to list, inspect, create, delete, redeploy or rebuild environments in Medusa Cloud projects.

    228 GitHub stars~1.2k tokensUpdated 4 days ago
    Auto-check passed
  • Medusa Cloud Local Build

    medusajs/medusa-agent-skills

    Reproduces a Medusa Cloud build on your machine with mcloud local build, to debug build-failed deployments without pushing or waiting on Cloud.

    228 GitHub stars~1k tokensUpdated 4 days ago
    Auto-check: notes

Categories

Questions about DB Generate

What does DB Generate do?

Generate database migrations for a Medusa module. An agent skill from medusajs/medusa-agent-skills. DB Generate is an agent skill from medusajs/medusa-agent-skills.

When should I use DB Generate?

DB Generate fits situations like: tasks that involve Database migrations.

How do I install DB Generate in Claude Code?

Run `npx skills add medusajs/medusa-agent-skills --skill db-generate -a claude-code`. Or copy the skill folder (plugins/medusa-dev/skills/db-generate in medusajs/medusa-agent-skills) into .claude/skills/db-generate in your project. Claude Code loads it when a task matches its description.

How do I install DB Generate in Codex?

Run `npx skills add medusajs/medusa-agent-skills --skill db-generate -a codex`. Or copy the skill folder (plugins/medusa-dev/skills/db-generate in medusajs/medusa-agent-skills) into .agents/skills/db-generate in your project. Codex loads it when a task matches its description.

Can I use DB Generate in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add medusajs/medusa-agent-skills --skill db-generate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/db-generate, .gemini/skills/db-generate, .github/skills/db-generate and .opencode/skills/db-generate in your project.

What does DB Generate need to run?

Going by SKILL.md and its folder, DB Generate needs the command-line tools its instructions call (npx). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Bash(npx medusa db:generate:*).

Does DB Generate access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is DB Generate safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does DB Generate use?

No licence was found for DB Generate or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does DB Generate use?

About 192 tokens (SKILL.md is roughly 768 characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to DB Generate?

Skills that share tags, products or a category with DB Generate: Evolving The Data Model (TriliumNext/Trilium, 38k stars), Creating Database Migrations (NangoHQ/nango, 13k stars), Openwrt Package Update (NethServer/nethsecurity, 191 stars) and Free Will (syahiidkamil/Software-Engineer-AI-Agent-Atlas, 401 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains DB Generate?

medusajs (a GitHub organization) maintains it in medusajs/medusa-agent-skills, which has 228 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 5, 2026.

Source: medusajs/medusa-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.