No slash command · from Stencila
Guides writing Stencila Markdown (.smd) and executable documents, covering code chunks, inline expressions, parameters, figures, tables, and metadata. Useful when creating or editing .smd files.
Ships in Stencila. 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.
Read when SKILL.md points to them.
Stencila Markdown (.smd) is CommonMark plus a small set of extensions for
executable, reproducible documents. Stencila also parses MyST (.myst) and
Quarto (.qmd) Markdown; prefer .smd for new documents unless the user
already works in one of those ecosystems, in which case keep their format.
The Markdown parser auto-detects the flavour, so --from is rarely needed.
Minimum CLI version: 2.14. Verify a document parses with:
NO_COLOR=1 stencila convert doc.smd --to json --yes > /dev/null
The constructs below are the ones worth double-checking; everything else (headings, emphasis, links, lists, block quotes) is standard Markdown.
execA fenced code block with the exec keyword executes when the document is
rendered, and its outputs become part of the document:
```python exec
import pandas as pd
data = pd.read_csv("data.csv")
data.describe()
```
Without exec a code block is static, display-only code. Do not confuse
exec with demo: demo parses-and-renders the block content as document
source without executing anything — it is for documentation that shows
source alongside rendered output.
Execution modes go after exec (e.g. always to re-run on every execution,
lock to preserve existing outputs):
```r exec always
plot(data)
```
Backtick code with a language tag and exec in braces embeds a computed
value in prose:
The answer is `6 * 7`{python exec}.
Without exec (e.g. `2 * pi`{python}) it is just static inline code
with a language.
Named inputs that can be supplied at render time with
stencila render doc.smd out.html -- --name=value:
Analysis for &[year]{int def=2024} using threshold &[cutoff]{num def=0.05}.
YAML frontmatter carries metadata (title, authors, description):
---
title: Analysis of penguin morphology
description: Bill dimensions across three species.
---
# Introduction
Captioned, labelled figures and tables wrap content in ::: figure /
::: table blocks; code chunks inside them produce the figure or table
content:
::: figure 1
```r exec
plot(y ~ x)
```
Y against X.
:::
Read the relevant reference before writing a construct you are not sure about — they are generated from Stencila's own documentation and are authoritative:
| Topic | Reference |
|---|---|
| Document structure, headings, paragraphs | references/basics.md |
| Static code blocks and inline code | references/code.md |
| Executable chunks, expressions, modes, parameters | references/execution.md |
| Including other documents, calling with arguments | references/include-call.md |
| Math (TeX and AsciiMath, block and inline) | references/math.md |
| Figures, captions, labels | references/figures.md |
| Tables, captioned tables | references/tables.md |
| Lists, checklists | references/lists.md |
| Admonitions / callouts | references/admonitions.md |
| Sections and semantic structure | references/sections.md |
| Frontmatter metadata | references/metadata.md |
| Images, audio, video | references/media.md |
| Footnotes | references/notes.md |
After writing or editing a Stencila document:
NO_COLOR=1 stencila lint doc.smd --as json --yesexecution skill for how execution and staleness work).Never report an executable document as finished without executing it.
references/admonitions.md (opens in a new tab)references/basics.md (opens in a new tab)references/code.md (opens in a new tab)references/execution.md (opens in a new tab)references/figures.md (opens in a new tab)references/include-call.md (opens in a new tab)references/lists.md (opens in a new tab)references/math.md (opens in a new tab)references/media.md (opens in a new tab)references/metadata.md (opens in a new tab)references/notes.md (opens in a new tab)references/sections.md (opens in a new tab)references/tables.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
13 skills in this plugin
/conversionConverting documents between formats with stencila convert - lossless vs lossy targets, quantifying conversion losses, decoding options, and ingesting documents by DOI, arXiv, or PubMed Central identifier. Use when converting to or from DOCX, PDF, LaTeX, JATS, IPYNB, MyST, Quarto or other formats, or importing published papers./convertConvert a document between formats, reporting any conversion losses./doctorCheck the health of the Stencila CLI installation - version, available upgrades, kernels, linters, external tools, and workspace configuration. The first thing to run when anything Stencila-related is not working.npx claudepluginhub stencila/stencila --plugin stencilaOther plugins' skills for the same job