building-storefronts — Claude Code skill for Medusa storefronts
A skill for building Medusa storefronts: it tells the agent how to call APIs through the SDK and React Query without breaking requests.
npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a claude-codeWhat building-storefronts does
This skill covers frontend work on a Medusa store. It holds rules for the Medusa JS SDK, React Query patterns for fetching and mutating data, and calls to custom API routes. The agent loads it on its own when you plan or write storefront code.
The core rule: every request goes through the SDK, plain fetch() is out. The SDK adds the headers itself — publishable API key for store routes, auth for admin. Bodies are passed as plain objects, and JSON.stringify() breaks the request by double-serializing it. Built-in endpoints use existing methods like sdk.store.product.list(), custom routes use sdk.client.fetch().
Prices get their own warning: values arrive as-is, 49.99 means 49.99, so dividing by 100 is wrong. That mistake shows up often and turns a price into pocket change. Before writing integration code the skill requires loading references/frontend-integration.md for the full examples. A companion skill, building-with-medusa, handles the backend routes the storefront calls.
What it helps with
- call a custom Medusa API route from the storefront
- wire the Medusa JS SDK into a frontend app
- set up data fetching with React Query
- build a mutation with optimistic update and rollback
- fix a price that was divided by 100
Example prompts for the agent
- Help me call the custom /store/reviews route from my Medusa storefront using the SDK
- Set up useQuery for the product list and useMutation for adding a review
- Review my Medusa storefront code for SDK mistakes
How to install building-storefronts
1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a claude-code2Manually: put the files in place
~/.claude/skills/building-storefronts/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/building-storefronts/
1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a codex2Manually: put the files in place
.agents/skills/building-storefronts/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a cursor2Manually: put the files in place
.cursor/skills/building-storefronts/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install medusajs/medusa-agent-skills building-storefronts2Manually: put the files in place
.github/skills/building-storefronts/SKILL.md1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a gemini-cli2Platform CLI
gemini skills install https://github.com/medusajs/medusa-agent-skills --path plugins/medusa-dev/skills/building-storefrontsManually: put the files in place
.devin/skills/building-storefronts/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about building-storefronts
How do I install building-storefronts in Claude?
Run npx skills add medusajs/medusa-agent-skills --skill building-storefronts -a claude-code. The skill lands at ~/.claude/skills/building-storefronts/SKILL.md.
What does building-storefronts do?
It gives the agent rules for Medusa storefront work: SDK usage, React Query patterns, custom API route calls, and common mistakes such as JSON.stringify() on the request body.
How is it different from the MedusaDocs MCP server?
The skill shows correct and incorrect patterns and loads during planning, while the MCP server is a reference for built-in SDK methods and configuration.