templates/basic/.claude/skills/mercur-cli/SKILL.md
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`.
npx skillsauth add mercurjs/mercur mercur-cliInstall 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:
blocks.jsoncreate — create a new Mercur projectinit — create blocks.json in an existing projectsearch — search the registryview — inspect a block before installationadd — install a blockdiff — compare local installed block files against the registrysearch, view, add, diff) from the project root where blocks.json lives.medusa commands (db:generate, db:migrate) from packages/api using bunx medusa.apps/admin or apps/vendor.npx @mercurjs/cli@latest search --query <keyword>
npx @mercurjs/cli@latest view <block-name>
npx @mercurjs/cli@latest add <block-name>
Important: When CLI asks to overwrite middlewares.ts, always decline (n) and merge manually.
npx @mercurjs/cli@latest diff <block-name>
addFollow the block docs output, but verify everything against the actual installed files:
src/api/middlewares.ts.bunx medusa db:generate <module> and bunx medusa db:migrate from packages/api.bun add <package> in the correct workspace..env.add outputs the block docs after installation — read them carefully but verify against installed files.search command with --query "" returns all available blocks.search or viewmiddlewares.ts overwrite from CLIdocumentation
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
Discover, evaluate, install, and verify Mercur blocks in the basic starter using `blocks.json` aliases and CLI workflows.