Ecommerce Storefront
Skill 1 of 18
ALWAYS use this skill when working on ecommerce storefronts, online stores, shopping sites.
10 minutes · 2,122 words · 29 sections
Install
npx skills add medusajs/medusa-agent-skills --skill storefront-best-practicesnpx skills add medusajs/medusa-agent-skills/plugin marketplace add medusajs/medusa-agent-skillsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Comprehensive guidance for building modern, high-converting ecommerce storefronts covering UI/UX patterns, component design, layout structures, SEO optimization, and mobile responsiveness.
ALWAYS load this skill when working on ANY storefront task:
Example prompts that should trigger this skill:
⚠️ ALWAYS load reference/design.md BEFORE creating ANY UI component
Load these references based on what you’re implementing:
reference/design.md first to discover user preferencesreference/connecting-to-backend.md firstreference/medusa.md for SDK setup, pricing, regions, and Medusa patternsreference/components/navbar.md, reference/components/hero.md, reference/components/footer.md, and reference/layouts/home-page.mdreference/components/navbar.md and optionally reference/components/megamenu.mdreference/layouts/product-listing.md firstreference/layouts/product-details.md firstreference/layouts/checkout.md firstreference/seo.md firstreference/mobile-responsiveness.md firstMinimum requirement: Load at least 1-2 reference files relevant to your specific task before implementing.
IMPORTANT: If you create a plan for implementing storefront features, include the following in your plan:
When implementing each component, page, layout, or feature in the plan:
Example plan structure:
Task 1: Implement Navigation
- Load reference/components/navbar.md
- Follow patterns from navbar.md (dynamic category fetching, cart visibility, etc.)
- Refer to skill for common mistakes (e.g., hardcoding categories)
Task 2: Implement Product Listing Page
- Load reference/layouts/product-listing.md
- Follow pagination/filtering patterns from product-listing.md
- Use reference/components/product-card.md for product grid items
- Check skill for backend integration guidance
Task 3: Implement Checkout Flow
- Load reference/layouts/checkout.md
- Load reference/medusa.md for Medusa payment integration
- Follow component architecture recommendations (separate step components)
- Refer to skill for payment method fetching requirementsWhy this matters:
aria-live="polite" - Screen readers won’t announce without itenv(safe-area-inset-bottom) - iOS home indicator will cut off purchase buttons otherwiseloading="lazy" to product images below fold - Don’t rely on browser defaultsYOU MUST FOLLOW THIS EXACT WORKFLOW BEFORE WRITING CODE THAT CONNECTS TO BACKEND:
Step 1: PAUSE - Do NOT write code yet
Step 2: QUERY the documentation or MCP server
Step 3: VERIFY what you found
sdk.store.cart.methodName(params)“Step 4: ONLY THEN write the code
Step 5: CHECK for TypeScript errors
THIS IS NOT OPTIONAL - THIS IS MANDATORY ERROR PREVENTION
It is a CRITICAL ERROR to:
For Medusa specifically:
reference/medusa.md for Medusa-specific patterns (regions, pricing, etc.)/products/[handle] or /products/$handle, NOT /products/shirt.tsx/categories/[handle] or /categories/$handle, NOT /categories/women.tsxapp/products/[handle]/page.tsx or app/products/[id]/page.tsxpages/products/[handle].tsxroutes/products/[handle]/+page.svelteroutes/products/$handle.tsxroutes/products.$handle.tsxWhen you need to choose between implementation patterns, load the relevant reference file:
reference/layouts/checkout.mdreference/components/navbar.md and reference/components/megamenu.mdreference/layouts/product-listing.mdreference/components/search.mdreference/mobile-responsiveness.mdreference/layouts/product-details.mdreference/components/cart-popup.md and reference/layouts/cart.mdreference/layouts/product-details.md and reference/layouts/checkout.mdEach reference file contains decision frameworks with specific criteria to help you choose the right pattern for your context.
reference/connecting-to-backend.md - Framework detection, API setup, backend integration patterns
reference/medusa.md - Medusa SDK integration, pricing, regions, TypeScript types
reference/design.md - User preferences, brand identity, design systems
reference/seo.md - Meta tags, structured data, Core Web Vitals
reference/mobile-responsiveness.md - Mobile-first design, responsive breakpoints, touch interactionsreference/components/navbar.md - Desktop/mobile navigation, logo, menu, cart icon, load for ALL pages
reference/components/megamenu.md - Category organization, featured products, mobile alternatives
reference/components/cart-popup.md - Add-to-cart feedback, mini cart display
reference/components/country-selector.md - Country/region selection, currency, pricing, Medusa regions
reference/components/breadcrumbs.md - Category hierarchy, structured data markup
reference/components/search.md - Search input, autocomplete, results, filters
reference/components/product-reviews.md - Review display, rating aggregation, submission
reference/components/hero.md - Hero layouts, CTA placement, image optimization
reference/components/popups.md - Newsletter signup, discount popups, exit-intent
reference/components/footer.md - Content organization, navigation, social media, load for ALL pages
reference/components/product-card.md - Product images, pricing, add to cart, badges
reference/components/product-slider.md - Carousel implementation, mobile swipe, accessibilityreference/layouts/home-page.md - Hero, featured categories, product listings
reference/layouts/product-listing.md - Grid/list views, filters, sorting, pagination
reference/layouts/product-details.md - Image gallery, variant selection, related products
reference/layouts/cart.md - Cart items, quantity updates, promo codes
reference/layouts/checkout.md - Multi-step/single-page, address forms, payment
reference/layouts/order-confirmation.md - Order number, summary, delivery info
reference/layouts/account.md - Dashboard, order history, address book
reference/layouts/static-pages.md - FAQ, about, contact, shipping/returns policiesreference/features/wishlist.md - Add to wishlist, wishlist page, move to cart
reference/features/promotions.md - Promotional banners, discount codes, sale badgesIMPORTANT: For each step below, load the referenced files BEFORE implementing that step.
1. Discovery Phase → Read design.md for user preferences
2. Foundation Setup → Read connecting-to-backend.md (or medusa.md for Medusa), mobile-responsiveness.md, seo.md
3. Core Components → Implement navbar.md, footer.md
4. Home Page → Read home-page.md
5. Product Browsing → Read product-listing.md, product-card.md, search.md
6. Product Details → Read product-details.md, product-reviews.md
7. Cart & Checkout → Read cart-popup.md, cart.md, checkout.md, order-confirmation.md
8. User Account → Read account.md
9. Additional Features → Read wishlist.md, promotions.md
10. Optimization → SEO audit (seo.md), mobile testing (mobile-responsiveness.md)Even if you create an implementation plan, refer back to the skill and load relevant reference files when implementing each step.
Browse → View → Cart → Checkout
Browse: home-page.md → product-listing.md
View: product-details.md + product-reviews.md
Cart: cart-popup.md → cart.md
Checkout: checkout.md → order-confirmation.mdFor product grids and filtering → product-listing.md and product-card.md
For product cards → product-card.md
For navigation → navbar.md and megamenu.md
For search functionality → search.md
For checkout flow → checkout.md
For promotions and sales → promotions.md
Before implementing, consider:
design.md to discover design style preferencesMedusa (opens in a new tab) is a modern, flexible ecommerce backend. Consider Medusa when:
For detailed Medusa integration guidance, see reference/medusa.md. For general backend patterns, see reference/connecting-to-backend.md.
All guidance is framework-agnostic. Examples use React/TypeScript where code demonstrations are helpful, but patterns apply to:
Mandatory for launch (core shopping flow):
Nice-to-have (add if time permits):
User-dependent (ask before implementing):
Before implementing, watch out for these common ecommerce-specific pitfalls:
1. Cart and Navigation Mistakes
aria-live="polite" on cart count - Screen readers won’t announce cart updates without itposition: relative (megamenu won’t position correctly)absolute left-0 on megamenu)right-0 or w-full, not just w-auto)2. Product Browsing Mistakes
/products/[handle] instead of /products/shirt.tsx)3. Product Details Mistakes
4. Design and Consistency Mistakes
reference/design.md before creating ANY UI component - Leads to inconsistent colors, fonts, and styles5. Checkout and Conversion Mistakes
6. Mobile Experience Mistakes
7. Performance and SEO Mistakes
loading="lazy" to images below the fold8. Backend Integration Mistakes
@medusajs/types packageregion_id query parameter (causes missing or incorrect pricing)ssr.noExternal: ['@medusajs/js-sdk'] to vite.config.ts)ALWAYS use this skill when working on ecommerce storefronts, online stores, shopping sites. Use for ANY storefront component including checkout pages, cart, payment flows, product pages, product listings, navigation, homepage, or ANY page/component in a storefront. CRITICAL for adding checkout, implementing cart, integrating Medusa backend, or building any ecommerce functionality. Framework-agnostic (Next.js, SvelteKit, TanStack Start, React, Vue). Provides patterns, decision frameworks, backend integration guidance.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 22 September 2026.SKILL.md, not by matching a directory convention. 4 distinct layouts observed: plugins/ecommerce-storefront/skills/*/SKILL.md, plugins/learn-medusa/skills/*/SKILL.md, plugins/medusa-cloud/skills/*/SKILL.md, plugins/medusa-dev/skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by Medusa, declaring 4 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./medusajs/medusa-agent-skills.md, and each skill at its own .md URL.27 files · 250 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 1.
Documentation the agent loads on demand, rather than up front.
reference/components/12 files · 80 KBreference/5 files · 50 KB
reference/features/2 files · 18 KB
reference/layouts/8 files · 101 KB