medusajs/medusa-agent-skills/building-admin-dashboard-customizations
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 planning, researching, or implementing Medusa Admin dashboard UI (widgets, custom pages, forms, tables, data loading, navigation). REQUIRED for all admin UI work in ALL modes (planning, implementation, exploration). Contains design patterns, component usage, and data loading patterns that MCP servers don't provide.
Install
npx vskill@latest install medusajs/medusa-agent-skills/building-admin-dashboard-customizationsSKILL.md
Medusa Admin Dashboard Customizations
Build custom UI extensions for the Medusa Admin dashboard using the Admin SDK and Medusa UI components.
Note: "UI Routes" are custom admin pages, different from backend API routes (which use building-with-medusa skill).
When to Apply
Load this skill for ANY admin UI development task, including:
- Creating widgets for product/order/customer pages
- Building custom admin pages
- Implementing forms and modals
- Displaying data with tables or lists
- Adding navigation between pages
Also load these skills when:
- building-with-medusa: Building backend API routes that the admin UI calls
- building-storefronts: If working on storefront instead of admin dashboard
CRITICAL: Load Reference Files When Needed
The quick reference below is NOT sufficient for implementation. You MUST load relevant reference files before writing code for that component.
Load these references based on what you're implementing:
- Creating widgets? → MUST load
references/data-loading.mdfirst - Building forms/modals? → MUST load
references/forms.mdfirst - Displaying data in tables/lists? → MUST load
references/display-patterns.mdfirst - Selecting from large datasets? → MUST load
references/table-selection.mdfirst - Adding navigation? → MUST load
references/navigation.mdfirst - Styling components? → MUST load
references/typography.mdfirst
Minimum requirement: Load at least 1-2 reference files relevant to your specific task before implementing.
When to Use This Skill vs MedusaDocs MCP Server
⚠️ CRITICAL: This skill should be consulted FIRST for planning and implementation.
Use this skill for (PRIMARY SOURCE):
- Planning - Understanding how to structure admin UI features
- Component patterns - Widgets, pages, forms, tables, modals
- Design system - Typography, colors, spacing, semantic classes
- Data loading - Critical separate query pattern, cache invalidation
- Best practices - Correct vs incorrect patterns (e.g., display queries on mount)
- Critical rules - What NOT to do (common mistakes like conditional display queries)
Use MedusaDocs MCP server for (SECONDARY SOURCE):
- Specific component prop signatures after you know which component to use
- Available widget zones list
- JS SDK method details
- Configuration options reference
Why skills come first:
- Skills contain critical patterns like separate display/modal queries that MCP doesn't emphasize
- Skills show correct vs incorrect patterns; MCP shows what's possible
- Planning requires understanding patterns, not just API reference
Critical Setup Rules
SDK Client Configuration
CRITICAL: Always use exact configuration - different values cause errors:
pnpm Users ONLY
CRITICAL: Install peer dependencies BEFORE writing any code:
npm/yarn users: DO NOT install these packages - already available.
Rule Categories by Priority
| Priority | Category | Impact | Prefix | |
|---|---|---|---|---|
| 1 | Data Loading | CRITICAL | data- | |
| 2 | Design System | CRITICAL | design- | |
| 3 | Data Display | HIGH (includes CRITICAL price rule) | display- | |
| 4 | Typography | HIGH | typo- | |
| 5 | Forms & Modals | MEDIUM | form- | |
| 6 | Selection Patterns | MEDIUM | select- |
Quick Reference
1. Data Loading (CRITICAL)
data-sdk-always- ALWAYS use Medusa JS SDK for ALL API requests - NEVER use regular fetch() (missing auth headers causes errors)data-sdk-method-choice- Use existing SDK methods for built-in endpoints (sdk.admin.product.list()), usesdk.client.fetch()for custom routesdata-display-on-mount- Display queries MUST load on mount (no enabled condition based on UI state)data-separate-queries- Separate display queries from modal/form queriesdata-invalidate-display- Invalidate display queries after mutations, not just modal queriesdata-loading-states- Always show loading states (Spinner), not empty statesdata-pnpm-install-first- pnpm users MUST install @tanstack/react-query BEFORE coding
2. Design System (CRITICAL)
design-semantic-colors- Always use semantic color classes (bg-ui-bg-base, text-ui-fg-subtle), never hardcodeddesign-spacing- Use px-6 py-4 for section padding, gap-2 for lists, gap-3 for itemsdesign-button-size- Always use size="small" for buttons in widgets and tablesdesign-medusa-components- Always use Medusa UI components (Container, Button, Text), not raw HTML
3. Data Display (HIGH)
display-price-format- CRITICAL: Prices from Medusa are stored as-is ($49.99 = 49.99, NOT in cents). Display them directly - NEVER divide by 100
4. Typography (HIGH)
typo-text-component- Always use Text component from @medusajs/ui, never plain span/p tagstypo-labels- Use<Text size="small" leading="compact" weight="plus">for labels/headingstypo-descriptions- Use<Text size="small" leading="compact" className="text-ui-fg-subtle">for descriptionstypo-no-heading-widgets- Never use Heading for small sections in widgets (use Text instead)
5. Forms & Modals (MEDIUM)
form-focusmodal-create- Use FocusModal for creating new entitiesform-drawer-edit- Use Drawer for editing existing entitiesform-disable-pending- Always disable actions during mutations (disabled={mutation.isPending})form-show-loading- Show loading state on submit button (isLoading={mutation.isPending})
6. Selection Patterns (MEDIUM)
select-small-datasets- Use Select component for 2-10 options (statuses, types, etc.)select-large-datasets- Use DataTable with FocusModal for large datasets (products, categories, etc.)select-search-config- Must pass search configuration to useDataTable to avoid "search not enabled" error
Critical Data Loading Pattern
ALWAYS follow this pattern - never load display data conditionally:
Why this matters:
- On page refresh, modal is closed, so conditional query doesn't run
- User sees empty state instead of their data
- Display depends on modal interaction (broken UX)
Common Mistakes Checklist
Before implementing, verify you're NOT doing these:
Data Loading:
- [ ] Using regular fetch() instead of Medusa JS SDK (causes missing auth header errors)
- [ ] Not using existing SDK methods for built-in endpoints (e.g., using sdk.client.fetch("/admin/products") instead of sdk.admin.product.list())
- [ ] Loading display data conditionally based on modal/UI state
- [ ] Using a single query for both display and modal
- [ ] Forgetting to invalidate display queries after mutations
- [ ] Not handling loading states (showing empty instead of spinner)
- [ ] pnpm users: Not installing @tanstack/react-query before coding
Design System:
- [ ] Using hardcoded colors instead of semantic classes
- [ ] Forgetting size="small" on buttons in widgets
- [ ] Not using px-6 py-4 for section padding
- [ ] Using raw HTML elements instead of Medusa UI components
Data Display:
- [ ] CRITICAL: Dividing prices by 100 when displaying (prices are stored as-is: $49.99 = 49.99, NOT in cents)
Typography:
- [ ] Using plain span/p tags instead of Text component
- [ ] Not using weight="plus" for labels
- [ ] Not using text-ui-fg-subtle for descriptions
- [ ] Using Heading in small widget sections
Forms:
- [ ] Using Drawer for creating (should use FocusModal)
- [ ] Using FocusModal for editing (should use Drawer)
- [ ] Not disabling buttons during mutations
- [ ] Not showing loading state on submit
Selection:
- [ ] Using DataTable for <10 items (overkill)
- [ ] Using Select for >10 items (poor UX)
- [ ] Not configuring search in useDataTable (causes error)
Reference Files Available
Load these for detailed patterns:
Each reference contains:
- Step-by-step implementation guides
- Correct vs incorrect code examples
- Common mistakes and solutions
- Complete working examples
Integration with Backend
⚠️ CRITICAL: ALWAYS use the Medusa JS SDK for ALL API requests - NEVER use regular fetch()
Admin UI connects to backend API routes using the SDK:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 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/medusa-dev/skills/building-admin-dashboard-customizations/SKILL.md
Popularity
- Repository stars
- 210
- Repository forks
- 26
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 7 May 2026, 6 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/building-admin-dashboard-customizations)