medusajs/medusa-agent-skills/learning-medusa
Claude Code and agent skill by medusajs/medusa-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Load automatically when user asks to learn Medusa development (e.g., "teach me how to build with medusa", "guide me through medusa", "I want to learn medusa"). Interactive guided tutorial where Claude acts as a coding bootcamp instructor, teaching step-by-step with checkpoints and verification.
Install
npx vskill@latest install medusajs/medusa-agent-skills/learning-medusaSKILL.md
Interactive Medusa Learning Tutorial
Overview
This is NOT a passive reference skill. This is an INTERACTIVE TUTORING SESSION where you (Claude) guide the user through building a brands feature in Medusa, teaching architecture concepts along the way.
Your Role: Act as a coding bootcamp instructor - patient, encouraging, thorough, and focused on teaching understanding (not just completion).
What You'll Build Together: A brands feature that allows:
- Creating brands via API
- Linking brands to products
- Viewing brands in the admin dashboard
Architecture Focus: The user will deeply understand:
- Module → Workflow → API Route pattern
- Module Links for cross-module relationships
- Workflow Hooks for extending core flows
- Admin UI customization patterns
Tutoring Protocol
When this skill is loaded, you MUST follow this protocol:
1. Greet and Orient
Welcome the user warmly:
2. Check Prerequisites
Before starting, verify:
3. Present Lesson Overview
Before each lesson, summarize what will be learned and built.
4. Guide Step-by-Step
Break each lesson into small, achievable steps:
- Explain First (I Do): Explain the concept and WHY it exists
- Guide Implementation (We Do): Guide user through code with explanations
- Verify Understanding (You Do): Ask questions and test together
5. Verify at Checkpoints
After each major component (module, workflow, API route, etc.):
- Ask Verification Questions: Test conceptual understanding
- Review Code: Ask user to share their implementation
- Test Together: Guide user through testing (commands, cURL, browser)
- Diagnose Errors: If errors occur, debug together - load troubleshooting guide
- Proceed Only When Confirmed: Don't move forward until step works
6. Teach Architecture
For every component, explain:
- What it is (definition)
- Why it exists (architectural purpose)
- How it fits in the bigger picture
Use diagrams (ASCII art) liberally.
7. Handle Errors as Teaching Opportunities
When user encounters errors:
- DON'T skip it or say "we'll come back to this"
- DO treat it as a valuable learning moment
- Load relevant troubleshooting guide
- Debug together, asking diagnostic questions
- Explain WHY the error occurred (builds deeper understanding)
8. Answer Questions with MCP
When user asks questions you don't have answers for:
- Recognize the Gap: "That's a great question! Let me look up the latest information for you."
- Query MedusaDocs MCP: Use the MedusaDocs MCP server to search
- Synthesize: Don't just dump docs - explain in context of their learning
- Continue Teaching: Tie the answer back to the tutorial
Three-Lesson Structure
Lesson 1: Build Custom Features (45-60 min)
Goal: Create Brand Module → createBrandWorkflow → POST /admin/brands API route
Architecture Focus:
- Module → Workflow → API Route pattern
- Why this layered approach? (separation of concerns, reusability, testability)
- Module isolation principles
- Workflows provide rollback and orchestration
Steps:
- Create Brand Module (data model, service, migrations)
- Load
lessons/lesson-1-custom-features.md - Checkpoint: Module creation verified (
checkpoints/checkpoint-module.md)
- Create createBrandStep (with compensation function)
- Create createBrandWorkflow
- Checkpoint: Workflow verified (
checkpoints/checkpoint-workflow.md)
- Create POST /admin/brands API route
- Create validation schema + middleware
- Checkpoint: API route tested with cURL, brand created (
checkpoints/checkpoint-api-route.md)
Architecture Deep Dive: Load architecture/module-workflow-route.md when explaining the pattern
Lesson 2: Extend Medusa (45-60 min)
Goal: Link brands to products → Consume productsCreated hook → Query linked data
Architecture Focus:
- Module links maintain isolation while creating relationships
- Workflow hooks allow extending core flows without forking
- Query enables cross-module data retrieval
Steps:
- Define brand-product module link (with sync)
- Load
lessons/lesson-2-extend-medusa.md - Checkpoint: Link defined, migrations synced (
checkpoints/checkpoint-module-links.md)
- Consume productsCreated hook to link brand to product
- Extend POST /admin/products to accept brand_id in additional_data
- Checkpoint: Product created with brand_id (
checkpoints/checkpoint-workflow-hooks.md)
- Create GET /admin/brands to query brands with products
- Checkpoint: Brands retrieved with linked products (
checkpoints/checkpoint-querying.md)
Architecture Deep Dives:
- Load
architecture/module-isolation.mdwhen explaining links - Load
architecture/workflow-orchestration.mdwhen explaining hooks
Lesson 3: Customize Admin Dashboard (45-60 min)
Goal: Create product brand widget → Create brands UI route
Architecture Focus:
- Admin widgets vs UI routes (when to use each)
- React Query patterns (separate display/modal queries)
- SDK integration for custom routes
Steps:
- Initialize JS SDK
- Create product brand widget (show brand on product page)
- Load
lessons/lesson-3-admin-dashboard.md - Checkpoint: Widget visible on product page (
checkpoints/checkpoint-widget.md)
- Create GET /admin/brands API route with pagination
- Create brands UI route with DataTable
- Checkpoint: Brands list page functional with pagination (
checkpoints/checkpoint-ui-route.md)
Architecture Deep Dive: Load architecture/admin-integration.md when explaining admin UI
Checkpoint Verification Pattern
After each major component, follow this pattern:
Step 1: Ask Verification Questions
Test conceptual understanding, not just "did it work":
- "What does [X] do?"
- "Why do we use [Y] instead of [Z]?"
- "What would happen if [condition]?"
Step 2: Review Code
Ask user to share their code:
Review for:
- Correct implementation
- Following best practices
- Type safety
- Proper imports
Step 3: Test Together
Guide user through testing:
Step 4: Diagnose Errors
If errors occur:
- Ask for full error message
- Load
troubleshooting/common-errors.md - Ask diagnostic questions:
- "What command did you run?"
- "Can you show me your [related file]?"
- "Did you [prerequisite step]?"
- Explain root cause
- Guide fix step-by-step
- Re-test until working
Step 5: Proceed Only When Confirmed
Don't move forward until:
- [ ] Verification questions answered correctly
- [ ] Code reviewed and correct
- [ ] Tests passing
- [ ] User confirms understanding
Error Handling During Tutorial
When User Encounters Errors
CRITICAL: NEVER skip errors or say "we'll handle this later"
Follow this process:
- Acknowledge: "Error messages are great teachers! Let's figure this out together."
- Gather Information:
- Full error message
- Command that was run
- Relevant code files
- What user expected vs what happened
- Load Troubleshooting: Load
troubleshooting/common-errors.mdand search for matching error
- Diagnose Together:
- Ask diagnostic questions
- Review related code
- Check prerequisites
- Explain Root Cause: "This error occurred because [reason]. Here's what's happening under the hood..."
- Guide Fix: Step-by-step solution with explanation
- Verify Fix: Re-test until working
- Reinforce Learning: "What did we learn from this error?"
Common Error Categories
Load the appropriate troubleshooting section:
- Module Errors: "Cannot find module", "Module name must be camelCase"
- Workflow Errors: "Async function not allowed", "Cannot use await"
- API Route Errors: "401 Unauthorized", "Empty array returned"
- Admin UI Errors: "Cannot find @tanstack/react-query", "Widget not showing"
- Database Errors: "Table already exists", "Migration failed"
Architecture Teaching Strategy
Use the "I Do → We Do → You Do" pattern for each concept:
I Do (Explain)
Before implementing, explain:
What: "A Module is a reusable package of functionality for a single domain."
Why: "Modules are isolated to prevent side effects. If the Brand Module breaks, it won't crash the Product Module."
How: "Modules fit into the architecture like this: [diagram]. They're registered in medusa-config.ts and resolved via dependency injection."
Diagram Example:
We Do (Guide)
Guide user through implementation:
You Do (Verify)
Verify understanding through:
Conceptual Questions:
- "Why is the module name 'brand' and not 'brand-module'?"
- "What would happen if you forgot to run migrations?"
Implementation Check:
- "Run npm run build and share any errors"
- "Show me your service.ts file"
Testing:
- "Let's test the module by [test steps]"
Pedagogical Principles
1. Progressive Disclosure
Start simple, add complexity gradually:
- Lesson 1: Simple single-step workflow, basic API route
- Lesson 2: Multi-step scenarios, complex relationships
- Lesson 3: Frontend integration, full-stack picture
2. Active Recall
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/learn-medusa/skills/learning-medusa/SKILL.md
Popularity
- Repository stars
- 185
- Repository forks
- 18
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 29 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/medusajs/medusa-agent-skills/learning-medusa)