templates/basic/.claude/skills/mercur-blocks/SKILL.md
Discover, evaluate, install, and verify Mercur blocks in the basic starter using `blocks.json` aliases and CLI workflows.
npx skillsauth add mercurjs/mercur mercur-blocksInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when:
In the basic starter:
api -> packages/api/srcadmin -> apps/admin/srcvendor -> apps/vendor/srcThink about block impact by alias destination, not just by name.
middlewares.ts — always decline and merge manually.bun run dev from packages/api and check for startup errors before moving on.packages/api/src, apps/admin/src, or apps/vendor/src?packages/api/medusa-config.ts need module or provider registration?src/api/middlewares.ts?
./actual/folder/middlewares not a generic path from docs.db:generate <module> and db:migrate?
models/ directory — if it does, migrations are needed.src/routes/ (not src/pages/) for the dashboard SDK to detect them.export const config: RouteConfig for sidebar visibility?Block docs may contain inaccurate information. Always verify:
./admin/middlewares when the actual file is at ./admin/<feature>/middlewares.export const name in the installed file.dependencies array.db:generate / db:migrate in docs.When adding a block's middleware to src/api/middlewares.ts:
middlewares.ts.routes array.Do NOT accept CLI's middleware overwrite — it replaces the entire file.
npx @mercurjs/cli@latest search --query <keyword>
npx @mercurjs/cli@latest view <block>
npx @mercurjs/cli@latest add <block>
npx @mercurjs/cli@latest diff <block>
Run CLI commands from the project root where blocks.json lives.
Run medusa commands (db:generate, db:migrate) from packages/api.
diff when reviewing block updatesdocumentation
Analyze a Mercur 1.x project and guide migration to 2.0. Self-contained — works without access to the mercur monorepo.
documentation
Plan and execute migration from Mercur 1.x to 2.0. Classifies project difficulty, reads relevant migration docs, and follows stop conditions.
development
Review code changes for contract compliance, type safety, and regression risk. Use after completing any non-trivial implementation, before merging PRs, or when asked to review code quality across any mercur package.
tools
Use Mercur CLI commands correctly inside a project created from the Mercur basic starter. Use when choosing between `create`, `init`, `add`, `search`, `view`, and `diff`.