
medusajs/medusa-agent-skills
8 skills14.8k installs1.5k starsGitHub
Install
npx skills add https://github.com/medusajs/medusa-agent-skillsSkills in this repo
1Building With MedusaBuilding with Medusa is an agent skill that teaches solo builders how to add production-grade custom API routes on Medusa’s commerce backend. It focuses on the conventions that bite first-time Medusa authors: separating storefront `/store` routes from dashboard `/admin` routes, validating every body with Zod through `validateAndTransformBody`, and composing authentication middleware alongside validation instead of nesting validators incorrectly. The material walks through query validation for list endpoints, request query configuration, error handling shape, protected routes, and calling Medusa workflows from handlers so agents do not hand-wave pseudo-code that fails Medusa’s module boundaries. It is aimed at indie founders shipping headless or unified commerce (subscriptions, custom checkout flows, admin bulk tools) who already chose Medusa and need repeatable patterns their coding agent can follow. Complexity is intermediate because you should understand HTTP APIs and TypeScript middleware chains. This is documentation-as-skill for Medusa’s server framework—not a generic REST tutorial.2.3kinstalls2Storefront Best PracticesStorefront Best Practices is a Medusa-packaged agent skill that gives solo builders a single playbook for ecommerce storefronts: when to structure checkout and cart flows, how to design product listings and navigation, and how to integrate a commerce backend without reinventing patterns each sprint. It is framework-agnostic so the same guidance applies whether you ship on Next.js, SvelteKit, TanStack Start, React, or Vue. The skill stresses conversion-minded UI/UX, accessibility, SEO, and mobile layouts alongside backend wiring for carts, products, and payments. Load it whenever you add or refactor any shopper-facing surface—not only greenfield stores—so agents follow consistent architecture and integration choices instead of one-off chat suggestions.2.2kinstalls3Building Admin Dashboard CustomizationsBuilding Admin Dashboard Customizations is a Medusa-focused agent skill that teaches correct data-loading discipline for the official admin extension surface. It centers on non-negotiable rules—especially routing every request through the Medusa JS SDK instead of browser fetch—then walks through TanStack Query usage for pagination, debounced search, dependent queries, and batched ID fetches. Mutation sections cover optimistic UX, create/delete flows, and cache invalidation so custom routes and widgets stay consistent with core admin behavior. Solo builders running headless commerce get a mistake-versus-correct-pattern catalog, metadata caveats, and a full widget example tying separate queries together. Invoke it when you are adding admin pages, debugging stale lists after updates, or pairing an AI agent with Medusa v2 admin customization docs so you ship dashboard features without subtle auth and cache bugs.2.2kinstalls4Building Storefrontsbuilding-storefronts teaches agents how solo builders connect a Medusa commerce frontend to backend APIs without breaking Store versus Admin authentication rules. The skill stresses locating the shared SDK export, using first-party methods for standard catalog and order APIs, and routing custom backend endpoints exclusively through `sdk.client.fetch()` so publishable and admin credentials attach correctly. It extends into React Query patterns—stable query keys, error surfaces, and optimistic updates—for snappy storefront UX. Reach for it when you are implementing product listing, cart, checkout flows, or admin-adjacent dashboards against Medusa custom modules. It assumes a Medusa backend already exists or is in progress; it does not replace backend workflow skills. Following it reduces 401/header mistakes that plague hand-rolled fetch calls in indie ecommerce builds.2kinstalls5Learning MedusaLearning Medusa is an agent skill for solo and indie builders shipping headless commerce on Medusa. It walks through how the Medusa Admin dashboard—a React app served at localhost:9000/app—extends the commerce backend through injectable widgets, dedicated UI routes, and the Medusa JS SDK. You learn where HTTP requests land on the Node API, how API routes and workflows back admin features, and how to structure a complete vertical slice instead of guessing at folder conventions. Use it when you are building custom operator tools, order flows, or catalog controls and need the mental model before you write components or routes. It pairs with Medusa’s agent skills repo for implementation tasks and reduces rework when admin and API contracts drift apart.1.7kinstalls6Db MigrateDb-migrate is a narrow Medusa operations skill for solo builders who already run a Medusa commerce backend and need the agent to apply pending schema migrations without improvising database commands. It instructs the agent to execute the canonical CLI entry point, then translate stdout into a clear status update: how many migrations ran, whether anything failed, and a plain-language success confirmation. That pattern fits local dev refreshes, staging deploys, and post-pull setups where the codebase moved ahead of your database. It does not design migrations or edit entities; it only runs the blessed migrate path Medusa documents. Pair it with your normal deploy checklist and backups before touching production data.1.5kinstalls7Db Generatedb-generate is a focused Medusa agent skill that turns a module name you provide into generated database migrations using the official Medusa CLI. Solo builders extending Medusa with custom modules—brands, catalogs, or bespoke domain packages—need repeatable migration artifacts instead of hand-editing SQL every time the data model shifts. The skill restricts execution to the documented Bash pattern so agents do not improvise destructive database commands. After generation, it expects you to communicate what was created, where files landed, and whether the CLI emitted warnings, then point you toward db:migrate as the natural follow-up. This keeps schema changes reviewable in git like any other backend change. It assumes you already have a Medusa project and a named module worth migrating; it does not replace designing entities or production rollback strategy.1.5kinstalls8New Usernew-user is a narrow Medusa agent skill for solo builders spinning up headless commerce locally or on a new environment. When you invoke it with an email and password—often as /medusa-dev:user admin@test.com secret—it instructs the agent to run the official Medusa CLI command to create an admin user and report whether creation succeeded, which email was used, any CLI errors, and sensible next steps such opening the admin UI. It is phase-specific backend tooling with beginner-friendly scope: one command, one outcome. Compatible with Claude Code and similar agents that allow Bash restricted to npx medusa user. Use right after install or database migrate when no admin exists yet; skip if you already manage users through your IdP or production provisioning pipeline.1.3kinstalls