medusajs-developer
БесплатноЗапускает вложенные скриптыНе проверенSpecialized agent for MedusaJS v2.15+ development including custom modules, API routes, data models, workflows, scheduled jobs, and third-party integrations…
от greedychipmunk★ 24 звезды на GitHubОб этом скилле
MedusaJS Developer Agent Skill
An expert agent specializing in MedusaJS v2.15+ development, focusing on building scalable e-commerce solutions with custom modules, API integrations, and third-party plugins.
Core Capabilities
1. Custom Module Development
- Data Models: Create and manage data models using MedusaJS DML
- Module Services: Implement service layers with automatic CRUD operations
- Module Configuration: Set up proper module structure and exports
- Database Migrations: Generate and manage database schema changes
2. API Route Development
- Custom Endpoints: Create REST API routes in
src/api/[route-name]/route.ts - HTTP Methods: Implement GET, POST, PUT, DELETE handlers
- Request/Response Handling: Manage MedusaRequest and MedusaResponse objects
- Authentication: Integrate with MedusaJS auth systems
3. Commerce Module Integration
- 18 Built-in Modules: Work with API Key, Auth, Cart, Customer, Order, Payment, Product, Pricing, Promotion, Tax, and more
- Module Links: Create relationships between different modules
- Custom Fields: Extend existing modules with additional data fields
- Module Composition: Combine multiple modules for complex workflows
4. Workflow & Automation
- Scheduled Jobs: Create recurring tasks with cron expressions
- Event Handling: Implement subscribers for asynchronous operations
- Business Logic: Orchestrate complex commerce workflows
- Background Processing: Handle long-running operations efficiently
5. Third-Party Integrations
- Payment Providers: Integrate custom payment gateways
- External APIs: Connect with shipping, tax, and inventory services
- Webhooks: Handle incoming webhooks from external systems
- Data Synchronization: Sync data with external platforms
Medusa v2.15+ Updates
Auth & Security
- Medusa v2.15+ includes built-in MFA primitives for auth flows.
- Prefer module-managed TOTP, SMS, and recovery code challenges instead of rolling your own OTP storage.
- Wire MFA into the Auth module by treating it as part of sign-in, enrollment, challenge, verify, and recovery flows.
// Pseudocode: branch on auth result and ask the Auth module to challenge/verify MFA
const result = await authModule.authenticate(credentials)
if (result.mfa_required) {
await authModule.mfa.challenge({
user_id: result.user_id,
method: "totp", // "sms" | "recovery_code"
})
}
Promotions
- Promotion workflows can consume context hooks for conditional application.
- Pass contextual data such as
customer_group,sales_channel_id,region, or campaign metadata through workflows so promotion rules can evaluate it. - Example: apply a wholesale promotion only when
context.customer_group === "wholesale".
Catalog Search
- Products now support native SKU search.
- Use SKU filters in product search requests when looking up variants by merchant-facing or fulfillment-facing identifiers.
- Example: search by SKU and keyword together to narrow a catalog query.
GET /store/products?query=hoodie&sku=HD-001-BLK-M
Cloud & Platform
- Use
mcloud proxyfor secure local-to-cloud tunneling when debugging Cloud environments or testing webhooks against a local app. - Use it when a third-party service needs a public callback URL but you want to keep the backend local.
Data Model Notes
- Float attributes are now aligned in the data model; prefer the updated attribute types when modeling custom number fields.
Critical Migration Notes
- Medusa v2.15.2 includes the MikroORM v6.6.12 security update and fixes the v6.13.6 snapshot regression.
- If you're on v2.13.6+, upgrade before running production migrations and clean stale snapshots first:
npx medusa db:migrate --clean-snapshots
- Pin all
@medusajs/*packages to the same release line during the upgrade and avoid partial version drift.
Development Patterns
Module Structure
// src/modules/my-module/models/post.ts
import { model } from "@medusajs/framework/utils"
const Post = model.define("post", {
id: model.id().primaryKey(),
title: model.text(),
content: model.text().nullable(),
published: model.boolean().default(false)
})
export default Post
API Route Example
// src/api/posts/route.ts
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
export const GET = async (req: MedusaRequest, res: MedusaResponse) => {
const postService = req.scope.resolve("postService")
const posts = await postService.listPosts()
res.json({ posts })
}
export const POST = async (req: MedusaRequest, res: MedusaResponse) => {
const postService = req.scope.resolve("postService")
const post = await postService.createPost(req.body)
res.json({ post })
}
Scheduled Job Example
// src/jobs/sync-inventory.ts
import { MedusaContainer } from "@medusajs/framework/types"
export default async function
Установить medusajs-developer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditMultiEditBashGrepGlobWebFetchВложенные файлы
FAQ
Что делает скилл medusajs-developer?
Specialized agent for MedusaJS v2.15+ development including custom modules, API routes, data models, workflows, scheduled jobs, and third-party integrations. Provides expert guidance on commerce platform architecture and plugin development.
Как установить скилл medusajs-developer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл medusajs-developer запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic