building-admin-dashboard-customizations

medusajs/medusa-agent-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/medusajs/medusa-agent-skills --skill building-admin-dashboard-customizations
0 commentsdiscussion
summary

Custom UI extensions for Medusa Admin dashboard using the Admin SDK and Medusa UI components.

  • Load this skill FIRST for any admin UI work (planning, implementation, exploration); MCP servers provide API reference only, not design patterns or data loading strategies
  • CRITICAL: Always use Medusa JS SDK for all API requests (never regular fetch); separate display queries from modal queries and invalidate display data after mutations
  • Implement widgets on existing pages or create custom UI
skill.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.md first
  • Building forms/modals? → MUST load references/forms.md first
  • Displaying data in tables/lists? → MUST load references/display-patterns.md first
  • Selecting from large datasets? → MUST load references/table-selection.md first
  • Adding navigation? → MUST load references/navigation.md first
  • Styling components? → MUST load references/typography.md first

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:

// src/admin/lib/client.ts
import Medusa from "@medusajs/js-sdk"

export const sdk = new Medusa({
  baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
  debug: import.meta.env.DEV,
  auth: {
    type: "session",
  },
})

pnpm Users ONLY

CRITICAL: Install peer dependencies BEFORE writing any code:

# Find exact version from dashboard
pnpm list @tanstack/react-query --depth=10 | grep @medusajs/dashboard
# Install that exact version
pnpm add @tanstack/react-query@[exact-version]

# If using navigation (Link component)
pnpm list react-router-dom --depth=10 | grep @medusajs/dashboard
pnpm add react-router-dom@[exact-version]

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()), use sdk.client.fetch() for custom routes
  • data-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 queries
  • data-invalidate-display - Invalidate display queries after mutations, not just modal queries
  • data-loading-states - Always show loading states (Spinner), not empty states
  • data-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 hardcoded
  • design-spacing - Use px-6 py-4 for section padding, gap-2 for lists, gap-3 for items
  • design-button-size - Always use size="small" for buttons in widgets and tables
  • design-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 tags
  • typo-labels - Use <Text size="small" leading="compact" weight="plus"> for labels/headings
  • typo-descriptions - Use <Text size="small" leading="compact" className="text-ui-fg-subtle"> for descriptions
  • typo-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 entities
  • form-drawer-edit - Use Drawer for editing existing entities
  • form-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:

// ✅ CORRECT - Separate queries with proper responsibilities
const RelatedProductsWidget = ({ data: product }) => {
  const [modalOpen, setModalOpen] = useState(false)

  // Display query - loads on mount
  const { data: displayProducts } = useQuery({
    queryFn: () => fetchSelectedProducts(selectedIds),
    queryKey: ["related-products-display", product.id],
    // No 'enabled' condition - loads immediately
  })

  // Modal query - loads when needed
  const { data: modalProducts } = useQuery({
    queryFn: () => sdk.admin.product.list({ limit: 10, offset: 0 }),
    queryKey: ["products-selection"],
    enabled: modalOpen, // OK for modal-only data
  })

  // Mutation with proper invalidation
  const updateProduct = useMutation({
    mutationFn: updateFunction,
    onSuccess: () => {
      // Invalidate display data query to refresh UI
      queryClient.invalidateQueries({ queryKey: ["related-products-display", product.id] })
      // Also invalidate the entity query
      queryClient.invalidateQueries({ queryKey: ["product", product.id] })
      // Note: No need to invalidate modal selection query
    },
  })

  return (
    <Container>
      {/* Display uses displayProducts */}
      {displayProducts?.map(p => <div key={p.id}>{p.title}</div>)}

      <FocusModal open={modalOpen} onOpenChange={setModalOpen}>
        {/* Modal uses modalProducts */}
      </FocusModal>
    </Container>
  )
}

// ❌ WRONG - Single query with conditional loading
const BrokenWidget = ({ data: product }) => {
  const [modalOpen, setModalOpen] = useState(false)

  const { data } = useQuery({
how to use building-admin-dashboard-customizations

How to use building-admin-dashboard-customizations on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add building-admin-dashboard-customizations
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/medusajs/medusa-agent-skills --skill building-admin-dashboard-customizations

The skills CLI fetches building-admin-dashboard-customizations from GitHub repository medusajs/medusa-agent-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/building-admin-dashboard-customizations

Reload or restart Cursor to activate building-admin-dashboard-customizations. Access the skill through slash commands (e.g., /building-admin-dashboard-customizations) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.447 reviews
  • Henry Haddad· Dec 24, 2024

    building-admin-dashboard-customizations reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Charlotte Agarwal· Dec 12, 2024

    building-admin-dashboard-customizations is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Omar White· Nov 27, 2024

    building-admin-dashboard-customizations fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Henry Lopez· Nov 15, 2024

    building-admin-dashboard-customizations is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Henry Ndlovu· Nov 3, 2024

    building-admin-dashboard-customizations reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Henry Nasser· Oct 22, 2024

    Registry listing for building-admin-dashboard-customizations matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Omar Menon· Oct 18, 2024

    We added building-admin-dashboard-customizations from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Charlotte Chawla· Oct 6, 2024

    Keeps context tight: building-admin-dashboard-customizations is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Oshnikdeep· Sep 21, 2024

    We added building-admin-dashboard-customizations from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Min Liu· Sep 21, 2024

    We added building-admin-dashboard-customizations from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

showing 1-10 of 47

1 / 5