storefront-best-practi…
ALWAYS use this skill when working on ecommerce storefronts, online stores, shopping sites. Use for ANY storefront component including checkout pages, cart,…
Load automatically when planning, researching, or implementing Medusa storefront features (calling custom API routes, SDK integration, React Query patterns, data fetching). REQUIRED for all storefront development in ALL modes (planning, implementation, exploration). Contains SDK
$ npx -y skills add medusajs/medusa-agent-skills --skill building-storefronts --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/building-storefrontsContext preview
The summary Claude sees to decide when to auto-load this skill.
Load automatically when planning, researching, or implementing Medusa storefront features (calling custom API routes, SDK integration, React Query patterns, data fetching). REQUIRED for all storefront development in ALL modes (planning, implementation, exploration). Contains SDK
name: building-storefronts description: Load automatically when planning, researching, or implementing Medusa storefront features (calling custom API routes, SDK integration, React Query patterns, data fetching). REQUIRED for all storefront development in ALL modes (planning, implementation, exploration). Contains SDK usage patterns, frontend integration, and critical rules for calling Medusa APIs.
Frontend integration guide for building storefronts with Medusa. Covers SDK usage, React Query patterns, and calling custom API routes.
**Load this skill for ANY storefront development task, including:**
**Also load building-with-medusa when:** Building the backend API routes that the storefront calls
**The quick reference below is NOT sufficient for implementation.** You MUST load the reference file before writing storefront integration code.
**Load this reference when implementing storefront features:**
| Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | SDK Usage | CRITICAL | `sdk-` | | 2 | React Query Patterns | HIGH | `query-` | | 3 | Data Display | HIGH (includes CRITICAL price rule) | `display-` | | 4 | Error Handling | MEDIUM | `error-` |
**ALWAYS pass plain objects to the SDK - NEVER use JSON.stringify():**
// ✅ CORRECT - Plain object
await sdk.client.fetch("/store/reviews", {
method: "POST",
body: {
product_id: "prod_123",
rating: 5,
}
})
// ❌ WRONG - JSON.stringify breaks the request
await sdk.client.fetch("/store/reviews", {
method: "POST",
body: JSON.stringify({ // ❌ DON'T DO THIS!
product_id: "prod_123",
rating: 5,
})
})**Why this matters:**
Before implementing, verify you're NOT doing these:
**SDK Usage:**
**React Query:**
**Data Display:**
**Error Handling:**
**For detailed patterns and examples, load reference file:**
references/frontend-integration.md - SDK usage, React Query patterns, API integration
The reference file contains:
**Use this skill for (PRIMARY SOURCE):**
**Use MedusaDocs MCP server for (SECONDARY SOURCE):**
A collection of skills composed as Claude Code plugins for building Medusa applications with best practices and architectural patterns. These skills can be used with any agent, as explained in the Usage with Other Agents section.
Repo: medusajs/medusa-agent-skills
ALWAYS use this skill when working on ecommerce storefronts, online stores, shopping sites. Use for ANY storefront component including checkout pages, cart,…
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").…
Execute mcloud authentication and context commands: login, logout, whoami, use, version, and signup. Use when setting up the CLI, switching accounts, verifying…
Execute mcloud deployments commands to list deployments, retrieve deployment details, and fetch build logs. Use when listing deployments, checking deployment…
Execute mcloud environments commands to list, get, create, delete, redeploy, or trigger builds for Cloud environments. Use when managing environment lifecycle,…
Execute mcloud local build to reproduce a Cloud build on the local machine. Use when debugging a build-failed deployment without pushing to the tracked branch,…