Documentation Index
Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
Use this file to discover all available pages before exploring further.
Skills
Every Mercur project created with@mercurjs/cli@latest create includes a set of skills — reusable prompt modules that teach your AI coding tool how to work with Mercur correctly.
Skills encode domain knowledge, enforce patterns, and catch common mistakes. Instead of prompting your AI with “please follow the Mercur conventions for forms”, the skill handles it automatically.
How skills work
Skills are markdown files in your project’s.claude/skills/ directory. They’re loaded by Claude Code (and compatible tools) in two ways:
- Slash command — type
/skill-nameto invoke a skill explicitly - Auto-trigger — the AI detects that your task matches a skill’s description and loads it automatically
Included skills
Every project created from the Mercur starter template includes these skills:| Skill | What it does | When it triggers |
|---|---|---|
mercur-cli | Guides correct usage of CLI commands (create, init, add, search, view, diff) | Working with the Mercur CLI |
mercur-blocks | Discovers, evaluates, installs, and verifies blocks using blocks.json aliases | Adding or updating blocks |
migration-guide | Analyzes a 1.x project and walks through migration to 2.0 step by step | Upgrading from Mercur 1.x |
dashboard-page-ui | Enforces correct routing, page composition, and i18n for dashboard pages | Building admin or vendor pages |
dashboard-form-ui | Enforces form structure, validation, submission guards, and UI conventions | Building forms in dashboards |
dashboard-tab-ui | Enforces tab structure, validation scope, and wizard conventions | Adding tabs to multi-step forms |
medusa-ui-conformance | Keeps custom UI aligned with @medusajs/ui patterns and local wrappers | Adding reusable UI components |
Using skills
Invoke explicitly
Type the slash command in Claude Code:Let it auto-trigger
Just describe your task naturally:mercur-blocks skill and activates it automatically.
Pass arguments
Some skills accept arguments:Where skills live
SKILL.md file with frontmatter metadata and the skill content.
Creating custom skills
You can create your own skills to encode project-specific patterns and workflows.1. Create the skill directory
2. Write the skill file
Create.claude/skills/my-custom-skill/SKILL.md:
3. Key conventions
- Directory name must be
kebab-caseand match thenamein frontmatter - File must be named
SKILL.md(uppercase) - Description is the primary trigger — write it clearly so the AI knows when to activate
- Keep skills focused on one domain; split broad skills into smaller ones
Frontmatter options
| Field | Required | Purpose |
|---|---|---|
name | Yes | Must match directory name |
description | Yes | Primary trigger — AI uses this to decide relevance |
allowed-tools | No | Restrict available tools (e.g., Read, Grep, Glob for review-only skills) |
argument-hint | No | Hint shown in slash command menu (e.g., "[block-name]") |
Using skills with other AI tools
Skills ship in.claude/skills/ — this is the canonical location, tracked in git. They’re plain markdown files, so any AI coding tool that reads project-level prompts can use them.
OpenAI Codex
Codex reads skills from.codex/skills/. Symlink to .claude/skills/:
SKILL.md files and triggers them the same way.
Cursor
Cursor reads project rules from.cursor/rules/. You can convert skills to Cursor rules:
globs) can be added for file-pattern triggering.