building-with-medusa
Load automatically when planning, researching, or implementing ANY Medusa backend features (custom modules, API routes, workflows, data models, module links…
Skill by vinitvijal
Chalk Labs
Need help deploying building-with-medusa?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/vinitvijal-building-with-medusa
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, data, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/building-with-medusa
What's inside
- Skill name
building-with-medusa- Description
- Load automatically when planning, researching, or implementing ANY Medusa backend features (custom modules, API routes, workflows, data models, module links, business logic). REQUIRED for all Medusa backend work in ALL modes (planning, implementation, exploration). Contains architectural patterns, best practices, and critical rules that MCP servers don't provide.
- License
- MIT
- Instructions
- 373 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (14)
- SKILL.md
- api-routes.md · reference/
- authentication.md · reference/
- custom-modules.md · reference/
- data-models.md · reference/
- error-handling.md · reference/
- frontend-integration.md · reference/
- module-links.md · reference/
- querying-data.md · reference/
- scheduled-jobs.md · reference/
- subscribers-and-events.md · reference/
- troubleshooting.md · reference/
- workflow-hooks.md · reference/
- workflows.md · reference/
SKILL.md (first lines)
# Medusa Backend Development Comprehensive backend development guide for Medusa applications. Contains patterns across 6 categories covering architecture, type safety, business logic placement, and common pitfalls. ## When to Apply **Load this skill for ANY backend development task, including:** - Creating or modifying custom modules and data models - Implementing workflows for mutations - Building API routes (store or admin) - Defining module links between entities - Writing business logic or validation - Querying data across modules - Implementing authentication/authorization **Also load these skills when:** - **building-admin-dashboard-customizations:** Building admin UI (widgets, pages, forms) - **building-storefronts:** Calling backend API routes from storefronts (SDK integration) ## CRITICAL: Load Reference Files When Needed **The quick reference below is NOT sufficient for implementation.** You MUST load relevant reference files before writing code for that component. **Load these references based on what you're implementing:** - **Creating a module?** → MUST load `reference/custom-modules.md` first - **Creating workflows?** → MUST load `reference/workflows.md` first - **Creating API routes?** → MUST load `reference/api-routes.md` first - **Creating module links?** → MUST load `reference/module-links.md` first - **Querying data?** → MUST load `reference/querying-data.md` first - **Adding authentication?** → MUST load `reference/authentication.md` first **Minimum requirement:** Load at least 1-2 reference files relevant to your specific task before implementing. ## Critical Architecture Pattern **ALWAYS follow this flow - never bypass layers:** ``` Module (data models + CRUD operations) ↓ used by Workflow (business logic + mutations with rollback) ↓ executed by API Route (HTTP interface, validation middleware) ↓ called by Frontend (admin dashboard/storefront via SDK) ``` **Key conventions:** - Only GET, POST, DELETE methods (never PUT/PATCH) - Workflows are required for ALL mutations - Business logic belongs in workflow steps, NOT routes - Query with `query.graph()` for cross-module data retrieval - Query with `query.index()` (Index Module) for filtering across separate modules with links - Module links maintain isolation between modules ## Rule Categories by Priority | Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | Architecture Violations | CRITICAL | `arch-` | | 2 | Type Safety | CRITICAL | `type-` | | 3 | Business Logic Placement | HIGH | `logic-` | | 4 | Import & Code Organization | HIGH | `import-` | | 5 | Data Access Patterns | MEDIUM (includes CRITICAL price rule) | `data-` | | 6 | File Organization | MEDIUM | `file-` | ## Quick Reference ### 1. Architecture Violations (CRITICAL) - `arch-workflow-required` - Use workflows for ALL mutations, never call module services from routes - `arch-layer-bypass` - Never bypass layers (route → service without workflow) - `arch-http-methods` - Use only GET, POST, DELETE (never PUT/PATCH) - `arch-module-isolation` - Use module links, not direct cross-module service calls - `arch-query-config-fields` - Don't set explicit `fields` when using `req.queryConfig` ### 2. Type Safety (CRITICAL) - `type-request-schema` - Pass Zod inferred type to `MedusaRequest<T>` when using `req.validatedBody` - `type-authenticated-request` - Use `AuthenticatedMedusaRequest` for protected routes (not `MedusaRequest`) - `type-export-schema` - Export both Zod schema AND inferred type from middlewares - `type-linkable-auto` - Never add `.linkable()` to data models (automatically added) - `type-module-name-camelcase` - Module names MUST be camelCase, never use dashes (causes runtime errors) ### 3. Business Logic Placement (HIGH) - `logic-workflow-validation` - Put business validation in workflow steps, not API routes - `logic-ownership-checks` - Validate ownership/permissions in workflows, not routes - `logic-module-service` - Keep modules simple (CRUD only), put logic in workflows ### 4. Import & Code Organization (HIGH) - `import-top-level` - Import workflows/modules at file top, never use `await import()` in route body - `import-static-only` - Use static imports for all dependencies - `import-no-dynamic-routes` - Dynamic imports add overhead and break type checking ### 5. Data Access Patterns (MEDIUM) - `data-price-format` - **CRITICAL**: Prices are stored as-is in Medusa (49.99 stored as 49.99, NOT in cents). Never multiply by 100 when saving or divide by 100 when displaying - `data-query-method` - Use `query.graph()` for retrieving data; use `query.index()` (Index Module) for filtering across linked modules - `data-query-graph` - Use `query.graph()` for cross-module queries with dot notation (without cross-module filtering) - `data-query-index` - Use `query.index()` when filtering by properties of linked data models in separate modules - `data-list-and-count` - Use `listAndCount` for single-module paginated queries - `data-linked-filtering` - `query.graph()` can't filter by linked module fields - use `query.index()` or query from that entity directly - `data-no-js-filter` - Don't use JavaScript `.filter()` on linked data - use database filters (`query.index()` or query the entity) - `data-same-module-ok` - Can filter by same-module relations with `query.graph()` (e.g., product.variants) - `data-auth-middleware` - Trust `authenticate` middleware, don't manually check `req.auth_context` ### 6. File Organization (MEDIUM) - `file-workflow-steps` - Recommended: Create steps in `src/workflows/steps/[name].ts` - `file-workflow-composition` - Composition functions in `src/workflows/[name].ts` - `file-middleware-exports` - Export schemas and types from middleware files - `file-links-directory` - Define module links in `src/links/[name].ts` ## Workflow Composition Rules **The workflow function has critical constraints:**
From vinitvijal/Meow-Munch-QodeML-Labs, MIT.
More from vinitvijal/Meow-Munch-QodeML-Labs
- 0.450score
frontend-design
vinitvijal
Create distinctive, production-grade frontend interfaces with high design quality.
SkillCFreshness: CClaude Code +9 - 0.450score
frontend-design
vinitvijal
Create distinctive, production-grade frontend interfaces with high design quality.
SkillCFreshness: CClaude Code +9 - 0.414score
building-storefronts
vinitvijal
Load automatically when planning, researching, or implementing Medusa storefront features (calling custom API routes, SDK integration, React Query patterns…
SkillDFreshness: DClaude Code +9 - 0.414score
building-admin-dashboard-customizations
vinitvijal
Load automatically when planning, researching, or implementing Medusa Admin dashboard UI (widgets, custom pages, forms, tables, data loading, navigation).
SkillDFreshness: DClaude Code +9 - 0.409score
storefront-best-practices
vinitvijal
ALWAYS use this skill when working on ecommerce storefronts, online stores, shopping sites.
SkillDFreshness: DClaude Code +9 - 0.409score
learning-medusa
vinitvijal
Load automatically when user asks to learn Medusa development (e.g., "teach me how to build with medusa", "guide me through medusa", "I want to learn medusa").
SkillDFreshness: DClaude Code +9 - 0.401score
new-user
vinitvijal
Create an admin user in Medusa
SkillDFreshness: DClaude Code +9 - 0.396score
db-generate
vinitvijal
Generate database migrations for a Medusa module
SkillDFreshness: DClaude Code +9 - 0.396score
db-migrate
vinitvijal
Run database migrations in Medusa
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 26, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from vinitvijal
- 0.450score
frontend-design
vinitvijal
Create distinctive, production-grade frontend interfaces with high design quality.
SkillCFreshness: CClaude Code +9 - 0.450score
frontend-design
vinitvijal
Create distinctive, production-grade frontend interfaces with high design quality.
SkillCFreshness: CClaude Code +9 - 0.414score
building-storefronts
vinitvijal
Load automatically when planning, researching, or implementing Medusa storefront features (calling custom API routes, SDK integration, React Query patterns…
SkillDFreshness: DClaude Code +9 - 0.414score
building-admin-dashboard-customizations
vinitvijal
Load automatically when planning, researching, or implementing Medusa Admin dashboard UI (widgets, custom pages, forms, tables, data loading, navigation).
SkillDFreshness: DClaude Code +9 - 0.409score
storefront-best-practices
vinitvijal
ALWAYS use this skill when working on ecommerce storefronts, online stores, shopping sites.
SkillDFreshness: DClaude Code +9 - 0.409score
learning-medusa
vinitvijal
Load automatically when user asks to learn Medusa development (e.g., "teach me how to build with medusa", "guide me through medusa", "I want to learn medusa").
SkillDFreshness: DClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get building-with-medusa running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
building-with-medusa skill. Agent Mart. https://agentmart.dev/skills/vinitvijal-building-with-medusa (last updated 2026-10-24)