Skip to main content
skill CX Codex

building-with-medusa — Claude Code skill: how it works and installs

Defines architecture standards and guardrails for Medusa backend development. Useful when designing custom modules, API routes, or multi-step workflows.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add medusajs/medusa-agent-skills --skill building-with-medusa -a claude-code
Open on GitHub

What building-with-medusa does

This skill enforces strict Medusa backend layering: module data operations connect to workflows, workflows run inside API routes, and routes serve client requests. Any database mutation must run inside a workflow step rather than directly calling a module service from an endpoint. It also restricts HTTP methods to GET, POST, and DELETE.

The guidelines cover six priority groups, including module isolation, type checking, and file layout. Medusa uses Zod v4 since release v2.14.0, so the skill mandates importing schemas from @medusajs/framework/zod with specific methods like z.email() and z.strictObject(). Composition functions for workflows must stay synchronous without async arrows or direct await calls.

Price handling has a strict rule: Medusa stores amounts as direct numbers like 49.99, not in cents. Multiplying by 100 on writes will silently corrupt pricing data. Before writing any code, the agent must inspect matching files in the reference/ directory.

What it helps with

  • implement mutation workflows with step rollbacks
  • validate admin or store requests with Zod v4
  • configure cross-module entity links
  • query linked module entities using query.index()

Example prompts for the agent

  • Create a custom loyalty module and link it to the customer entity.
  • Implement a mutation workflow for order cancellations with rollbacks.
  • Add an admin POST route that validates input using AuthenticatedMedusaRequest.

How to install building-with-medusa

1Skills CLI (Vercel)

npx skills add medusajs/medusa-agent-skills --skill building-with-medusa -a claude-code

2Manually: put the files in place

~/.claude/skills/building-with-medusa/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/building-with-medusa/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about building-with-medusa

How to install building-with-medusa in Claude Code?

Run npx skills add medusajs/medusa-agent-skills --skill building-with-medusa -a claude-code. Alternatively, copy the skill configuration into ~/.claude/skills/building-with-medusa/SKILL.md.

What does building-with-medusa do?

It provides architecture patterns and linting rules for Medusa backend development, preventing layer bypasses and incorrect query methods.

How does the skill handle currency amounts?

Medusa stores prices directly as numbers such as 49.99 rather than cents. The skill instructs agents never to multiply prices by 100 during saves or divide them when rendering.

Similar skills

Everything for Backend and APIs →

From the same set11

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor