Agent skill
quarto-authoring
Writing and authoring Quarto documents (.qmd), including code cell options, figure and table captions, cross-references, callout blocks (notes, warnings, tips), citations and bibliography, page layout and columns, Mermaid diagrams, YAML metadata configuration, and Quarto extensions. Also covers converting and migrating R Markdown (.Rmd), bookdown, blogdown, xaringan, and distill projects to Quarto, and creating Quarto websites, books, presentations, and reports.
Install this agent skill to your Project
npx add-skill https://github.com/posit-dev/skills/tree/main/quarto/quarto-authoring
Metadata
Additional technical details for this skill
- author
- Mickaël Canouil (@mcanouil)
- version
- 1.1
SKILL.md
Quarto Authoring
This skill is based on Quarto CLI v1.8.26.
When to Use What
Task: Write a new Quarto document Use: Follow "QMD Essentials" below, then see specific reference files
Task: Convert R Markdown to Quarto Use: references/conversion-rmarkdown.md
Task: Migrate bookdown project Use: references/conversion-bookdown.md
Task: Migrate xaringan slides Use: references/conversion-xaringan.md
Task: Migrate distill article Use: references/conversion-distill.md
Task: Migrate blogdown site Use: references/conversion-blogdown.md
Task: Add cross-references Use: references/cross-references.md
Task: Configure code cells Use: references/code-cells.md
Task: Add figures with captions Use: references/figures.md
Task: Create tables Use: references/tables.md
Task: Add citations and bibliography Use: references/citations.md
Task: Add callout blocks Use: references/callouts.md
Task: Add diagrams (Mermaid, Graphviz) Use: references/diagrams.md
Task: Control page layout Use: references/layout.md
Task: Use shortcodes Use: references/shortcodes.md
Task: Add conditional content Use: references/conditional-content.md
Task: Use divs and spans Use: references/divs-and-spans.md
Task: Configure YAML front matter Use: references/yaml-front-matter.md
Task: Find and use extensions Use: references/extensions.md
Task: Apply markdown linting rules Use: references/markdown-linting.md
QMD Essentials
Basic Document Structure
---
title: "Document Title"
author: "Author Name"
date: today
format: html
---
Content goes here.
A Quarto document consists of two main parts:
- YAML Front Matter: Metadata and configuration at the top, enclosed by
---. - Markdown Content: Main body using standard markdown syntax.
Divs and Spans
Divs use fenced syntax with three colons:
::: {.class-name}
Content inside the div.
:::
Spans use bracketed syntax:
This is [important text]{.highlight}.
Details: references/divs-and-spans.md
Code Cell Options Syntax
A code cell starts with triple backticks and a language identifier between curly braces. Code cells are code blocks that can be executed to produce output.
Quarto uses the language's comment symbol + | for cell options. Options use dashes, not dots (e.g., fig-cap not fig.cap).
- R, Python:
#| - Mermaid:
%%| - Graphviz/DOT:
//|
```{r}
#| label: fig-example
#| echo: false
#| fig-cap: "A scatter plot example."
plot(x, y)
```
Common execution options:
| Option | Description | Values |
|---|---|---|
eval |
Evaluate code | true, false |
echo |
Show code | true, false, fenced |
output |
Include output | true, false, asis |
warning |
Show warnings | true, false |
error |
Show errors | true, false |
include |
Include in output | true, false |
Set document-level defaults in YAML front matter:
execute:
echo: false
warning: false
Details: references/code-cells.md
Cross-References
Labels must start with a type prefix. Reference with @:
- Figure:
fig-prefix, e.g.,#| label: fig-plot→@fig-plot - Table:
tbl-prefix, e.g.,#| label: tbl-data→@tbl-data - Section:
sec-prefix, e.g.,{#sec-intro}→@sec-intro - Equation:
eq-prefix, e.g.,{#eq-model}→@eq-model
```{r}
#| label: fig-plot
#| fig-cap: "A caption for the plot."
plot(1)
```
See @fig-plot for the results.
Details: references/cross-references.md
Callout Blocks
Five types: note, warning, important, tip, caution.
::: {.callout-note}
This is a note callout.
:::
::: {.callout-warning}
## Custom Title
This is a warning with a custom title.
:::
Details: references/callouts.md
Figures
{#fig-name fig-alt="Alt text"}
Subfigures:
::: {#fig-group layout-ncol=2}
{#fig-sub1}
{#fig-sub2}
Main caption for the group.
:::
Details: references/figures.md
Tables
::: {#tbl-example}
| Column 1 | Column 2 |
| -------- | -------- |
| Data 1 | Data 2 |
Table caption.
:::
Details: references/tables.md
Citations
According to @smith2020, the results show...
Multiple citations [@smith2020; @jones2021].
Configure in YAML:
bibliography: references.bib
csl: apa.csl
Details: references/citations.md
Common Workflows
Creating an HTML Document
title: "My Report"
author: "Your Name"
date: today
format:
html:
toc: true
code-fold: true
theme: cosmo
Creating a PDF Document
title: "My Report"
format:
pdf:
documentclass: article
papersize: a4
Creating a RevealJS Presentation
---
title: "My Presentation"
format: revealjs
---
## First Slide
Content here.
## Second Slide
More content.
Setting Up a Quarto Project
Create _quarto.yml in the project root:
project:
type: website
website:
title: "My Site"
navbar:
left:
- href: index.qmd
text: Home
- href: about.qmd
text: About
format:
html:
theme: cosmo
Resources
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
create-release-checklist
Create a release checklist and GitHub issue for an R package. Use when the user asks to "create a release checklist" or "start a release" for an R package.
release-post
Create professional package release blog posts following Tidyverse or Shiny blog conventions. Use when the user needs to: (1) Write a release announcement blog post for an R or Python package for tidyverse.org or shiny.posit.co, (2) Transform NEWS/changelog content into blog format, (3) Generate acknowledgments sections with contributor lists, (4) Format posts following specific blog platform requirements. Supports both Tidyverse (hugodown) and Shiny (Quarto) blog formats with automated contributor fetching and comprehensive style guidance.
shiny-bslib-theming
Advanced theming for Shiny apps using bslib and Bootstrap 5. Use when customizing app appearance with bs_theme(), Bootswatch themes, custom colors, typography, brand.yml integration, Bootstrap Sass variables, custom Sass/CSS rules, dark mode and color modes, dynamic theme switching, real-time theming, theme inspection, or making R plots match the app theme with thematic.
shiny-bslib
Build modern Shiny dashboards and applications using bslib (Bootstrap 5). Use when creating new Shiny apps, modernizing legacy apps (fluidPage, fluidRow/column, tabsetPanel, wellPanel, shinythemes), or working with bslib page layouts, grid systems, cards, value boxes, navigation, sidebars, filling layouts, theming, accordions, tooltips, popovers, toasts, or bslib inputs. Assumes familiarity with basic Shiny.
quarto-alt-text
Generate accessible alt text for data visualizations in Quarto documents. Use when the user wants to add, improve, or review alt text for figures in .qmd files. Triggers for requests about accessibility, figure descriptions, fig-alt, screen reader support, or making Quarto documents more accessible.
brand-yml
Create and use brand.yml files for consistent branding across Shiny apps and Quarto documents. Use when working with brand styling, colors, fonts, logos, or corporate identity in Shiny or Quarto projects. Covers: (1) Creating new _brand.yml files from brand guidelines, (2) Applying brand.yml to Shiny for R apps with bslib, (3) Applying brand.yml to Shiny for Python apps with ui.Theme, (4) Using brand.yml in Quarto documents, presentations, dashboards, and PDFs, (5) Modifying existing brand.yml files, (6) Troubleshooting brand integration issues. Includes complete specifications and framework-specific integration guides.
Didn't find tool you were looking for?