From predicate
Provides formatting, structure, and execution rules for Quarto markdown documents, including callouts, multi-column layouts, tabsets, and code chunks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/predicate:quartoThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Quarto is a superset of Pandoc Markdown. It prioritizes semantic structure over visual formatting.
Quarto is a superset of Pandoc Markdown. It prioritizes semantic structure over visual formatting.
Golden Rule: Never use raw HTML tags (
<div>,<img>,<br>) unless absolutely necessary. Use Pandoc Fenced Divs and Spans.
Official Documentation: quarto.org/docs is the authoritative reference. Consult it for edge cases, advanced features, or when this skill lacks specifics.
Quarto uses Fenced Divs (:::) to define layout, callouts, and structural blocks. More colons (:::::) enable nesting.
Convert standard Markdown blockquotes (>) into semantic callouts.
| Type | Syntax | Use Case |
|---|---|---|
| Note | ::: {.callout-note} | Non-critical info |
| Tip | ::: {.callout-tip} | Best practices/optimizations |
| Important | ::: {.callout-important} | Key constraints |
| Warning | ::: {.callout-warning} | Failure modes |
| Caution | ::: {.callout-caution} | Data loss risks |
Features:
## heading inside, or the title="..." attribute.collapse="true" for expandable callouts (collapsed by default).appearance="simple" or appearance="minimal" for alternate styles.icon=false to suppress the default icon.::: {.callout-caution collapse="true" appearance="simple"}
## Warning Title
Collapsible content.
:::
Do not use HTML tables or CSS grids for layout. Use Quarto layout divs.
:::: {.columns}
::: {.column width="40%"}
Left content (e.g., text)
:::
::: {.column width="60%"}
Right content (e.g., image or code)
:::
::::
Group content into switchable tabs using the .panel-tabset class.
::: {.panel-tabset}
## Python
Python code here...
## R
R code here...
:::
Control content width using column classes:
| Class | Width |
|---|---|
.column-body | Default text column |
.column-page | Extends into page margins |
.column-screen | Full viewport width |
.column-margin | Right margin (for notes, asides) |
::: {.column-margin}
This appears in the margin.
:::
::: {.column-page}

:::
Quarto requires specific ID prefixes for automatic numbering. Do not manually number sections, figures, or tables.
You MUST use these prefixes in curly braces {#...} to enable referencing:
| Element | Prefix | Example ID | Reference Syntax |
|---|---|---|---|
| Figures | fig- | {#fig-arch} | @fig-arch |
| Tables | tbl- | {#tbl-stats} | @tbl-stats |
| Sections | sec- | {#sec-deploy} | @sec-deploy |
| Equations | eq- | {#eq-perf} | @eq-perf |
| Listings | lst- | {#lst-main} | @lst-main |
| Theorems | thm- | {#thm-main} | @thm-main |
| Lemmas | lem- | {#lem-helper} | @lem-helper |
| Corollaries | cor- | {#cor-result} | @cor-result |
| Propositions | prp- | {#prp-claim} | @prp-claim |
| Conjectures | cnj- | {#cnj-open} | @cnj-open |
| Definitions | def- | {#def-term} | @def-term |
| Examples | exm- | {#exm-basic} | @exm-basic |
| Exercises | exr- | {#exr-prob1} | @exr-prob1 |
| Solutions | sol- | {#sol-ans} | @sol-ans |
| Algorithms | alg- | {#alg-sort} | @alg-sort |
LaTeX Warning: Avoid underscores (
_) in IDs. They cause issues when rendering to PDF.
Reserved Prefixes (full list): fig, tbl, lst, tip, nte, wrn, imp, cau, thm, lem, cor, prp, cnj, def, exm, exr, sol, rem, alg, eq, sec
Wrong: See [Figure 1](#figure-1)
Right: See @fig-arch
Images require an ID and a caption (the alt text) to be treated as a Figure.
{#fig-arch}
Subfigures use a parent div with layout-ncol:
::: {#fig-panels layout-ncol=2}
{#fig-first}
{#fig-second}
Panel caption here.
:::
Tables must have a caption definition (: ...) and an ID to be referenceable.
| Component | Status |
| :-------- | :----- |
| API | Stable |
: System Status {#tbl-status}
Column Widths: Use tbl-colwidths to control proportions:
: Caption {#tbl-id tbl-colwidths="[60,40]"}
For complex cells (lists, code blocks, multiple paragraphs), use grid tables:
+---------------+---------------+
| Fruit | Advantages |
+===============+===============+
| Bananas | - Portable |
| | - Bright |
+---------------+---------------+
| Oranges | - Vitamin C |
| | - Tasty |
+---------------+---------------+
: Grid table with lists {#tbl-grid}
Distinguish between Display Code and Executable Code.
Use standard triple backticks for static snippets.
```rust
fn main() { ... }
```
Use curly braces {python} to indicate the engine should execute the block. Use hash-pipes #| for options.
```{python}
#| label: fig-plot
#| fig-cap: "Performance metrics"
#| echo: false
import matplotlib.pyplot as plt
plt.plot([1,2,3])
```
Options can be set globally (in YAML execute: block) or per-cell (with #|).
| Option | Values | Effect |
|---|---|---|
eval | true, false | Whether to run the code |
echo | true, false, fenced | Show source code in output |
output | true, false, asis | Show/suppress output; asis = raw markdown |
warning | true, false | Show/hide warnings |
error | true, false | Allow errors (true continues on error) |
include | true, false | Include cell in output at all |
code-fold | true, false, show | Collapsible source code |
Do not use images for diagrams if they can be defined as code. Quarto renders Mermaid natively.
```{mermaid}
%%| label: fig-flow
%%| fig-cap: "Authentication Flow"
sequenceDiagram
User->>API: Request
API-->>User: Response
```
Every .qmd file should start with YAML frontmatter.
---
title: "Technical Specification"
author: "Engineering Team"
date: last-modified
format:
html:
toc: true
number-sections: true
code-fold: true
theme: cosmo
pdf:
toc: true
number-sections: true
---
execute:
echo: true # Show code by default
warning: false # Hide warnings
freeze: auto # Only re-execute changed documents
_quarto.yml)For multi-document projects (books, websites):
project:
type: book # or: website, manuscript, default
book:
title: "My Book"
chapters:
- index.qmd
- intro.qmd
- part: "Main Content"
chapters:
- chapter1.qmd
- chapter2.qmd
Use Quarto shortcodes {{< ... >}} for special elements.
| Shortcode | Purpose |
|---|---|
{{< pagebreak >}} | Force a page break (PDF/Docx) |
{{< include _file.qmd >}} | Embed another file (partial) |
{{< embed notebook.ipynb#cell >}} | Embed output from another notebook/qmd |
{{< video src >}} | Embed video players |
{{< var version >}} | Insert variable from _variables.yml |
{{< meta title >}} | Insert value from document metadata |
{{< env VAR_NAME >}} | Insert environment variable |
Include/Embed Rules:
Quarto uses Pandoc citation syntax with a bibliography file.
YAML Setup:
---
bibliography: references.bib
csl: apa.csl # Optional: citation style
---
Citation Syntax:
| Syntax | Renders As |
|---|---|
[@smith2023] | (Smith 2023) |
@smith2023 | Smith (2023) inline |
[@smith2023, p. 42] | (Smith 2023, p. 42) |
[-@smith2023] | (2023) — suppress author |
[@a; @b] | Multiple citations |
Embed format-specific content (ignored in other formats):
```{=latex}
\begin{center}
LaTeX-only content
\end{center}
```
```{=html}
<details><summary>HTML-only</summary>Content</details>
```
Inline: Use `\LaTeX`{=latex} for inline raw content.
Apply attributes to inline text using [text]{.class #id key="value"}.
This is [important text]{.highlight} with inline styling.
| Anti-Pattern | Description | Remedy |
|---|---|---|
| Raw HTML | <div class="alert"> | Use ::: {.callout-note} |
| Hardcoded Numbers | "As seen in Figure 3" | Use "As seen in @fig-xyz" |
| Manual TOC | Writing out a list of links | Use toc: true in YAML |
| Remote Images | Hotlinking images | Download to /images or use repo-relative paths |
| Empty Lines | Using <br> for spacing | Use CSS classes or margin attributes |
| Underscores in IDs | {#my_figure_1} | Use hyphens: {#my-figure-1} |
title, format, and toc.> **Note:** with ::: {.callout-note} blocks.{#fig-name} to all image links that need captions.[Link](#heading) to @sec-heading.mermaid blocks where possible.::: {.panel-tabset}.[@key] with a .bib file._quarto.yml to define structure.Quarto supports multiple output formats via the format: key:
| Format | Value | Notes |
|---|---|---|
| HTML | html | Default, interactive |
pdf | Requires LaTeX | |
| Word | docx | MS Word |
| Presentation | revealjs | Slides via Reveal.js |
| Book | book | Multi-chapter (in _quarto.yml) |
| Typst | typst | Modern PDF alternative |
format:
html: default
pdf:
documentclass: article
revealjs:
theme: dark
npx claudepluginhub nrdxp/predicate --plugin predicateCreates Quarto documents for reproducible reports, presentations, or websites. Covers YAML configuration, code chunks, cross-references, and rendering for HTML, PDF, or Word output.
Generates interactive Quarto HTML reports from research experiment data and findings, with figures, data exploration, blogpost structure, and writing guidelines.
Creates scientific documents and diagrams using markdown with embedded Mermaid. Default format for version-controlled documentation, enabling clean diffs and no build steps.