/boxel-cli:dev-bfm-syntaxfrom boxel-cli
BFM reference: render surfaces, base syntax, :card/::card directives, mermaid, math ($...$ / $$...$$), alerts, footnotes, and code highlighting.
Ships in boxel-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
BFM is the markdown dialect Boxel reads and writes. It extends CommonMark + GitHub Flavored Markdown with:
:card[URL], ::card[URL | spec]) for embedding cards$...$ / $$...$$ (KaTeX)> [!NOTE], > [!WARNING], etc.)BFM is the same dialect everywhere Boxel parses or emits markdown:
.md files stored in a realm (rendered by the base realm's MarkdownTemplate)MarkdownField values (inline markdown stored in a card's JSON)markdown format output of any card (served via Accept: text/markdown or produced by "Copy as Markdown")The same text copies cleanly between these surfaces.
Standard CommonMark plus GFM. The common subset you can rely on:
# H1 … ###### H6) — marker and text must be on the same line. BFM auto-assigns user-content-* IDs to headings so they're anchorable.\n), horizontal rules*em*, **strong**), inline code (`x`), fenced code blocks-/+/*, ordered 1. — note . not ))[text](url) and images |-separated), strikethrough (~~x~~), autolinksmarked-extended-tables)In addition to card directives, BFM enables several marked extensions. Anywhere BFM renders, these work:
Fenced code blocks tagged mermaid render as SVG diagrams (lazily loaded client-side):
```mermaid
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Do thing]
B -->|No| D[Skip]
```
Server-rendered output emits a `<pre class="mermaid">…source…</pre>` placeholder that the client replaces with rendered SVG on mount. If mermaid fails to parse the source, the placeholder stays visible as plain text — safe but ugly, so validate your diagram syntax.
### Math (KaTeX)
LaTeX-style math via `$...$` (inline) and `$$...$$` (block). Both use KaTeX under the hood.
```md
Inline math: the area is $\pi r^2$ square units.
Block math on its own lines:
$$
E = mc^2
$$
Inline rules:
$ or $$ with no whitespace immediately inside ($ x $ won't match; $x$ will)Block rules:
$$ and closing $$ each on their own lineRendering is lazy: the parser emits a .math-placeholder element with the raw LaTeX in data-math, and KaTeX is loaded and invoked client-side on mount. Escape a literal $ in prose as \$ to prevent it being interpreted as math.
Blockquote-based callout syntax:
> [!NOTE]
> Useful information.
> [!TIP]
> Helpful advice.
> [!IMPORTANT]
> Crucial context.
> [!WARNING]
> Caution required.
> [!CAUTION]
> Risk of harm.
Here's a claim.[^1]
[^1]: And here's the backing source.
Fenced code blocks with a language tag (e.g. ts ```) are highlighted via the Monaco editor's tokenizer when Monaco is available on the page. Falls back to plain <pre>when it isn't. Themermaid language is special-cased (see above).
Two forms reference a card by its full URL:
:card[URL]Renders the target card in atom format, inline with surrounding text.
Written by :card[https://my.realm/Author/jane] for the team.
Use inline form when the card should flow with the sentence.
::card[URL] or ::card[URL | spec]Renders the target card in a block slot, separated from surrounding prose. Default format is embedded.
See the latest post:
::card[https://my.realm/BlogPost/first-look]
The optional | spec after the URL controls size/format. The grammar:
| Spec | Meaning |
|---|---|
| (no spec) | Default — embedded |
embedded | Embedded format (explicit) |
isolated | Isolated format (full detailed view) |
fitted | Fitted format at its container's natural size |
fitted <WxH> | Fitted at an exact width × height in px, e.g. fitted 400x200 |
fitted <named> | Fitted at a named size constant, e.g. fitted strip |
<WxH> | Bare dimensions (fitted implied), e.g. 400x200 |
<named> | Bare named constant (fitted implied), e.g. strip |
w:<N> h:<N> (or either alone) | Explicit width/height in px. Width accepts %, e.g. w:50% h:200 |
Named size constants map to preset dimensions:
| Category | Constants |
|---|---|
| Shorthand aliases | strip (→ single-strip, 250×40), tile (→ regular-tile, 250×170), grid-tile (→ cardsgrid-tile, 170×250) |
| Badges | small-badge 150×40, medium-badge 150×65, large-badge 150×105 |
| Strips | single-strip 250×40, double-strip 250×65, triple-strip 250×105, double-wide-strip 400×65, triple-wide-strip 400×105 |
| Tiles | small-tile 150×170, regular-tile 250×170, cardsgrid-tile 170×250, tall-tile 150×275, large-tile 250×275 |
| Cards | compact-card 400×170, full-card 400×275, expanded-card 400×445 |
Featured authors:
::card[https://my.realm/Author/jane | fitted 300x120]
::card[https://my.realm/Author/mohammed | strip]
::card[https://my.realm/Essay/manifesto | isolated]
If a spec fails to parse, the renderer emits the directive with no format override, so the card falls back to embedded with no error — validate specs before shipping.
If the renderer can't resolve a card URL (deleted, permissions, offline), the directive falls back to a muted pill badge showing the URL. Don't rely on card directives for content that must render without the Boxel runtime — plain markdown links ([text](url)) are safe everywhere.
Card directives inside fenced or inline code are not converted — they render as literal text. Use this when you need to show directive syntax in documentation.
[, ], (, ), |, :, #, *, `, _, ~, !, <, >, leading +/-, and line-start 1. all have meaning. See the dev-markdown-format skill for markdownEscape and helper functions.{{!-- prettier-ignore --}}.# Heading
A paragraph with **bold**, _italic_, `code`, and a [link](https://example.com).
Inline card: :card[https://my.realm/Author/jane]
Block card (embedded default):
::card[https://my.realm/BlogPost/first-look]
Block card with size:
::card[https://my.realm/Author/jane | fitted 300x120]
- bullet
- another
1. ordered
2. another
| col | col |
| --- | --- |
| a | b |
Inline math: $\pi r^2$
Block math:
$$
E = mc^2
$$
> [!NOTE]
> GFM alert.
Footnote reference.[^1]
[^1]: And its definition.
```mermaid
flowchart TD
A --> B
```
// highlighted by Monaco when available
const answer = 42;
What SKILL.md sets; muted values are Claude Code's defaults
15 skills in this plugin
/boxel-apiUse when calling Boxel realm-server APIs from code — primarily federated search across realms. Documents the boxel-cli programmatic surface (`BoxelCLIClient`) and the matching CLI commands. Read this whenever you need to query a realm's index./boxel-commandUse when running a Boxel host command via the realm server's prerenderer — invoking commands like `get-card-type-schema`, `evaluate-module`, `instantiate-card`, or any other module exposed at `@cardstack/boxel-host/commands/.../default`. Documents `boxel run-command` and the matching `client.runCommand()` method./boxel-designBoxel UI design discovery. Use when designing or redesigning a Boxel app, choosing a visual direction, or pushing past default look-and-feel before generating code.Other plugins' skills for the same job
npx claudepluginhub review-bench/cardstack_boxel --plugin boxel-cli