Medusa rules and best practices

Medusa rules and best practices is a skill for Claude Code, Codex from AmariahAK/atlarix-skills. It costs 6 tokens per session (512 once invoked), scanned A, original, Apache-2.0.

A set of development rules for Medusa, an e-commerce framework used with TypeScript, React, and Tailwind CSS. It covers workflows, API routes, data models, and error handling.

In plain words
What is it for?
Use it when building or changing Medusa store functionality, workflows, scheduled jobs, subscribers, API routes, and models.
Why use it?
It helps developers structure store features according to Medusa's conventions and avoid incompatible implementation patterns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building or changing Medusa store functionality, workflows, scheduled jobs, subscribers, API routes, and models.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amariahak/atlarix-skills/acr-medusa
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AmariahAK/atlarix-skills --skill acr-medusa
Clone the repo
git clone --depth 1 https://github.com/AmariahAK/atlarix-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Medusa rules and best practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/amariahak/atlarix-skills/acr-medusa/github.svg)](https://agentmods.dev/skills/amariahak/atlarix-skills/acr-medusa)
Your own site
<a href="https://agentmods.dev/skills/amariahak/atlarix-skills/acr-medusa"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/acr-medusa/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Medusa rules and best practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/amariahak/atlarix-skills/acr-medusa"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/acr-medusa.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 512 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00006 $0.00512
Opus 5 $0.00003 $0.00256
Sonnet 5 $0.00001 $0.00102
Haiku 4.5 $0.00001 $0.00051

Measured 9d ago against content hash 7ccfb4b78218, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

Medusa rules and best practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/acr-medusa/SKILL.md · 61 lines

What it actually says

Medusa rules and best practices

When to use this skill

Medusa rules and best practices. These rules should be used when building applications with Medusa.

Source

Synced from https://github.com/PatrickJS/awesome-cursorrules/tree/main/rules/medusa.mdc.

You are an expert senior software engineer specializing in modern web development, with deep expertise in TypeScript, Medusa, React.js, and TailwindCSS.

Medusa Rules

General Rules

  • Don't use type aliases when importing files.
  • When throwing errors, always throw MedusaError.
  • Always use Query to retrieve data.

Workflow Rules

  • When creating a workflow or step, always use Medusa's Workflow SDK @medusajs/framework/workflows-sdk to define it.
  • When creating a feature in an API route, scheduled job, or subscriber, always create a workflow for it.
  • When creating a workflow, always create a step for it.
  • In workflows, use transform for any data transformation.
  • In workflows, use when to define conditions.
  • Don't use await when calling steps.
  • In workflows, don't make the workflow function async.
  • Don't add typing to compensation function's input.
  • Only use steps in a workflow.

Data Model Rules

  • Use the model utility from @medusajs/framework/utils to define data models.
  • Data model variables should be camelCase. Data model names as passed to model.define should be snake case.
  • When adding an id field to a data model, always make it a primary key with .primaryKey().
  • A data model can have one id only, other IDs should be text instead.
  • Data model fields should be snake case.

Service Rules

  • When creating a service, always make methods async.
  • If a module has data models, make the service extend MedusaService.

Admin Customization Rules

  • When sending requests in admin customizations, always use Medusa's JS SDK.
  • Use TailwindCSS for styling.

Additional Resources

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 61 lines · 6 tokens per session scan A 7ccfb4b78218

Subscribe to this mod's changes

Medusa rules and best practices is a skill published in the GitHub repository AmariahAK/atlarix-skills (2 stars, last pushed 5d ago), licensed Apache-2.0. It adds 6 tokens to every session and 512 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.