--- name: writing-for-markdown-okf-schema-studio description: Write or generate a Markdown document (implementation plan, report, design note, README, spec, runbook) that renders well in Markdown OKF Schema Studio, the VS Code Markdown preview. Use when asked to write, draft or generate a .md file for Markdown OKF Schema Studio, to make a document look good in it, or to choose diagrams, charts, cards, tabs or admonitions for it. --- # Writing Markdown for Markdown OKF Schema Studio Markdown OKF Schema Studio is a VS Code extension that renders Markdown as a styled page (themes Cream, White, Dark) and lets the reader click a block to edit it. You already know CommonMark, GFM, MyST, Mermaid, PlantUML, SVG and Vega-Lite. This skill says only what the extension renders, what it does not, and how to choose. Every example here is rendered by its own pipeline in a test. - **OKF**, the Open Knowledge Format: a folder with sub-folders of Markdown files that carry YAML front matter. - **OKF-Schema**: a separate tool that provides JSON Schemas for OKF bundles (https://github.com/gsemet/okf-schema) and validates the front matter of the Markdown files. Full validation needs it installed: `uv tool install okf-schema` (commands `okf-schema`, `okfkb`, `okfreq`). The extension only helps to visualise the schema (field descriptions, enum values) and does not replace the validator. - OKF-Schema and Markdown OKF Schema Studio have the same author. ## Install the extension The skill only writes the documents; the reader needs the extension to see them. If it is missing, tell the user to install it from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=GaetanSemet.markdown-okf-schema-studio), with `code --install-extension GaetanSemet.markdown-okf-schema-studio`, or by searching for "Markdown OKF-Schema Studio" in the Extensions view. ## What renders | Family | Syntax rendered | | --- | --- | | GFM | headings, tables with `:--` `--:` alignment, task lists `- [ ]`, footnotes `[^1]`, alerts `> [!NOTE]` (also TIP, IMPORTANT, WARNING, CAUTION), autolinks, `~~strike~~` | | Code | fenced code with a language (highlighted), `{code-block}` with `:caption:`, `:linenos:` | | Math | `$x^2$`, `$$ ... $$`, `{math}` | | Admonitions | `:::{note}` `tip` `warning` `important` `danger` ... with an optional title; fold with `:class: dropdown`; `{versionadded}` `{versionchanged}` `{deprecated}` | | Layout | `{card}` (`:header:` `:footer:`), `{grid}` + `{grid-item-card}`, `{tab-set}` + `{tab-item}`, `{figure}`, `{list-table}` | | Inline | `{kbd}`, `{ref}` to a `(name)=` label above a heading, definition lists (`Term` then `: text`) | | Diagrams | `mermaid` fence, `plantuml` fence (built in, no Java), `{uml} file.puml` | | Charts | `vega-lite` and `vega` fences, JSON or YAML, inline `values` or a relative CSV, TSV, JSON file | | Images | `` and `{figure}` for local PNG, JPEG, SVG files (raw SVG: see below) | | Navigation | `[TOC]` or `[[_TOC_]]` alone on a line, or `{contents}` (`:depth: 2`, `:local:`) | | README HTML | `
`, ``, `