medusajs avatar

Building Storefronts

Guide for building Medusa storefronts that covers SDK usage, React Query patterns, and custom API route calls.

CCM score
68 of 100
skills.sh installs
4.6K
GitHub stars
238
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers SDK usage, React Query data fetching and mutations, price display, and error handling for Medusa frontends
  • Includes sdk.client.fetch() rules for custom routes, plus a reference file with correct and incorrect code examples
  • Enforces passing plain objects to the SDK body, never JSON.stringify(), and always using the SDK instead of raw fetch()
  • Designed for storefront developers integrating with backend API routes built using the building-with-medusa skill

Install

$ npx -y skills add medusajs/medusa-agent-skills --skill building-storefronts -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Medusa Storefront Development

Frontend integration guide for building storefronts with Medusa. Covers SDK usage, React Query patterns, and calling custom API routes.

When to Apply

Load this skill for ANY storefront development task, including:

  • Calling custom Medusa API routes from the storefront
  • Integrating Medusa SDK in frontend applications
  • Using React Query for data fetching
  • Implementing mutations with optimistic updates
  • Error handling and cache invalidation

Also load building-with-medusa when: Building the backend API routes that the storefront calls

CRITICAL: Load Reference Files When Needed

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:

  • Calling API routes? → MUST load references/frontend-integration.md first
  • Using SDK? → MUST load references/frontend-integration.md first
  • Implementing React Query? → MUST load references/frontend-integration.md first

Rule Categories by Priority

Details

Repository
github.com/medusajs/medusa-agent-skills
Categories
Frontend & UI Code, Backend & APIs

More from medusajs/medusa-agent-skills

All 15

Similar to Building Storefronts

More Frontend & UI Code