Raw
1 import {
2 CodeTab,
3 CodeTabs,
4 Table
5 } from "docs-ui"
6
7 export const metadata = {
8 title: `${pageNumber} Agent Skills for Medusa`,
9 }
10
11 # {metadata.title}
12
13 Medusa provides [agent skills](https://github.com/medusajs/medusa-agent-skills) to assist you in learning and building with Medusa. You can use them as plugins in Claude Code, or copy them into other AI tools that support custom skills.
14
15 These skills are useful to developers and non-technical shop owners looking to build stores efficiently, get assistance in their development, and learn Medusa interactively.
16
17 ## Medusa Development Assistance Skills
18
19 If you want assistance in building features with Medusa, install the `medusa-dev` plugin and its skills:
20
21 <CodeTabs group="agent-skills">
22 <CodeTab label="Claude Code" value="claude-code">
23
24 ```bash
25 claude # start claude code
26 /plugin marketplace add medusajs/medusa-agent-skills
27 /plugin install medusa-dev@medusa
28 ```
29
30 </CodeTab>
31 <CodeTab label="Other AI Agents" value="skills-command">
32
33 ```bash
34 npx skills add medusajs/medusa-agent-skills
35 # choose the following skills:
36 # - building-with-medusa
37 # - building-admin-dashboard-customizations
38 # - building-storefronts
39 # - db-generate
40 # - db-migrate
41 # - new-user
42 ```
43
44 </CodeTab>
45 </CodeTabs>
46
47 Then, you can ask Claude Code (or other AI agents) to build Medusa features, fix bugs, and more. They will use the skills in the plugin to provide you with accurate and relevant Medusa code.
48
49 Examples of prompts you can use:
50
51 ```bash title="Example Prompts"
52 Implement a product reviews feature. Authenticated customers can add reviews. Admin users can view and approve or reject reviews from the dashboard
53 Create a wishlist feature where customers can save products. I need API routes for adding/removing items and retrieving the wishlist.
54 Add a widget to the product detail page in the admin that allows managing related products. Admin users should be able to select which products are related using a searchable table.
55 Help me integrate the custom reviews API into my Next.js storefront. Show product reviews on the product detail page with pagination.
56 ```
57
58 ### Available Commands
59
60 The plugin also provides the following commands (as skills) you can use with your AI agents:
61
62 <Table>
63 <Table.Header>
64 <Table.Row>
65 <Table.HeaderCell>
66 Command
67 </Table.HeaderCell>
68 <Table.HeaderCell>
69 Description
70 </Table.HeaderCell>
71 </Table.Row>
72 </Table.Header>
73 <Table.Body>
74 <Table.Row>
75 <Table.Cell>
76 `/medusa-dev:db-migrate`
77 </Table.Cell>
78 <Table.Cell>
79 Run database migrations for the Medusa project.
80 </Table.Cell>
81 </Table.Row>
82 <Table.Row>
83 <Table.Cell>
84 `/medusa-dev:db-generate <module-name>`
85 </Table.Cell>
86 <Table.Cell>
87 Generate migrations for a custom module.
88 </Table.Cell>
89 </Table.Row>
90 <Table.Row>
91 <Table.Cell>
92 `/medusa-dev:new-user <email> <password>`
93 </Table.Cell>
94 <Table.Cell>
95 Create an admin user with the specified email and password.
96 </Table.Cell>
97 </Table.Row>
98 </Table.Body>
99 </Table>
100
101 ## Ecommerce Storefront Best Practices
102
103 Medusa provides the `ecommerce-storefront` plugin with a `storefront-best-practices` skill to help you build ecommerce storefronts for any ecommerce platform, including Medusa, and any frontend framework, such as Next.js or Tanstack Start.
104
105 To install the plugin in Claude Code (or other AI agents), run the following commands:
106
107 <CodeTabs group="agent-skills">
108 <CodeTab label="Claude Code" value="claude-code">
109
110 ```bash
111 claude # start claude code
112 /plugin marketplace add medusajs/medusa-agent-skills
113 /plugin install ecommerce-storefront@medusa
114 ```
115
116 </CodeTab>
117 <CodeTab label="Other AI Agents" value="skills-command">
118
119 ```bash
120 npx skills add medusajs/medusa-agent-skills
121 # choose the following skill:
122 # - storefront-best-practices
123 ```
124
125 </CodeTab>
126 </CodeTabs>
127
128 You can then run prompts to make changes to your ecommerce storefront or build it from scratch. For example:
129
130 ```bash title="Example Prompts"
131 Build a Next.js ecommerce storefront that uses Medusa as the backend. The storefront should have product listing, product detail, cart, and checkout pages.
132 Add a megamenu to the storefront's header that displays product categories and subcategories. The menu should be responsive and work well on mobile devices.
133 ```
134
135 ---
136
137 ## Interactive Learning
138
139 If you're a Medusa beginner, and you want to learn the basics of Medusa, install the `learn-medusa` plugin or its skill to start an interactive learning experience:
140
141 <CodeTabs group="agent-skills">
142 <CodeTab label="Claude Code" value="claude-code">
143
144 ```bash
145 claude # start claude code
146 /plugin marketplace add medusajs/medusa-agent-skills
147 /plugin install learn-medusa@medusa
148 ```
149
150 </CodeTab>
151 <CodeTab label="Other AI Agents" value="skills-command">
152
153 ```bash
154 npx skills add medusajs/medusa-agent-skills
155 # choose the following skill:
156 # - learning-medusa
157 ```
158
159 </CodeTab>
160 </CodeTabs>
161
162 Then, start the learning experience with this prompt:
163
164 ```bash title="Prompt"
165 I want to learn Medusa.
166 ```
167
168 <Note title="Tip">
169
170 You can also run the skill using the `/learn-medusa:learning-medusa` command in Claude Code.
171
172 </Note>
173
174 This starts the interactive learning experience where you'll learn Medusa concepts step-by-step by building a brands feature, similar to the [Brands tutorial](../../../customization/custom-features/page.mdx). You will:
175
176 1. Create a Brand Module with API routes to manage brands.
177 2. Link brands to products to associate products with brands.
178 3. Customize the Medusa Admin dashboard to allow admin users to manage brands.
179
180 By the end, you'll have a solid understanding of Medusa's architecture and how to build custom features.