mercur-blocks

Installs, verifies, and updates Mercur blocks in the basic starter using CLI workflows.

1|Updated Sep 15, 2026
One-click install
npx skills add https://github.com/amoai-tech/mdeai --skill mercur-blocks-amoai-tech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mercur-blocks
Source: https://github.com/amoai-tech/mdeai/tree/main/commerce/mercur/.claude/skills/mercur-blocks
Command: npx skills add https://github.com/amoai-tech/mdeai --skill mercur-blocks-amoai-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @mercurjs/cli.

What problem does it solve? Adding Mercur blocks to the basic starter involves error-prone steps: inaccurate block docs, destructive CLI overwrites of middlewares.ts, missing migrations, and misplaced UI routes. This Skill provides a disciplined workflow to evaluate, install, and verify blocks without breaking the project. ## Core Features & Use Cases - Block Discovery and Evaluation: Search and view blocks via the Mercur CLI before installing, mapping impact to the api, admin, and vendor aliases. - Safe Installation Workflow: Decline CLI middleware overwrites, merge middleware manually with correct export names and import paths, and apply config, env vars, and migrations from block docs. - Post-Install Verification: Check file placement, medusa-config registration, db:generate/db:migrate needs, UI route locations, and startup errors with bun run dev. - Use Case: When adding a reviews block, use this Skill to view it first, install it, manually merge its middleware into src/api/middlewares.ts, generate migrations for its custom module, and verify the API starts cleanly. ## Quick Start Use the mercur-blocks skill to search for, install, and verify the reviews block in my Mercur basic starter.

Frequently Asked Questions about mercur-blocks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I install a Mercur block in the basic starter?

Run npx @mercurjs/cli@latest add <block> from the project root where blocks.json lives. Afterward, apply the block docs configuration, merge middleware manually, run migrations if needed, and verify startup with bun run dev from packages/api.

How do I search for Mercur blocks before installing?

Use npx @mercurjs/cli@latest search --query <keyword> to find blocks, then npx @mercurjs/cli@latest view <block> to inspect its docs and files. This lets you identify which aliases and workspaces the block will touch before committing.

Should I accept the CLI overwrite of middlewares.ts?

No, always decline the CLI overwrite because it replaces the entire middlewares.ts file. Instead, read the installed middleware file for the correct export name and path, then manually add the import and spread it into the existing routes array.

Why does my Mercur block not work after installation?

Common causes include wrong middleware import paths from inaccurate docs, missing db:generate and db:migrate for custom modules with models directories, unregistered modules in medusa-config.ts, or UI routes placed in src/pages instead of src/routes.

How do I check what changed when updating a Mercur block?

Run npx @mercurjs/cli@latest diff <block> to review drift between the installed version and the update. Never skip the diff step, and watch for file conflicts where multiple blocks write the same file such as workflow hooks.