storefront-best-practi…
ALWAYS use this skill when working on ecommerce storefronts, online stores, shopping sites. Use for ANY storefront component…
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
Claude Code
$ npx -y skills add medusajs/medusa-agent-skills --skill building-storefronts --agent claude-code
Codex
$ npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a codex -y
Cursor
$ npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a cursor -y
Gemini CLI
$ npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a gemini-cli -y
GitHub Copilot
$ npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a github-copilot -y
OpenCode
$ npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a opencode -y
Windsurf
$ npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a windsurf -y
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.
ALWAYS use this skill when working on ecommerce storefronts, online stores, shopping sites. Use for ANY storefront component…
Load automatically when user asks to learn Medusa development (e.g., "teach me how to build with medusa", "guide me through…
Execute mcloud authentication and context commands: login, logout, whoami, use, version, and signup. Use when setting up the CLI,…
Execute mcloud deployments commands to list deployments, retrieve deployment details, and fetch build logs. Use when listing…
Execute mcloud environments commands to list, get, create, delete, redeploy, or trigger builds for Cloud environments. Use when…
Execute mcloud local build to reproduce a Cloud build on the local machine. Use when debugging a build-failed deployment without…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.