create-quarto-report

Create a Quarto document for reproducible reports, presentations, or websites. Covers YAML configuration, code chunk options, output formats, cross-references, and rendering. Use when creating a reproducible analysis report, building a presentation with embedded code, generating HTML, PDF, or Word documents from code, or migrating an existing R Markdown document to Quarto.

9 stars

Best use case

create-quarto-report is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Create a Quarto document for reproducible reports, presentations, or websites. Covers YAML configuration, code chunk options, output formats, cross-references, and rendering. Use when creating a reproducible analysis report, building a presentation with embedded code, generating HTML, PDF, or Word documents from code, or migrating an existing R Markdown document to Quarto.

Teams using create-quarto-report should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/create-quarto-report/SKILL.md --create-dirs "https://raw.githubusercontent.com/pjt222/agent-almanac/main/i18n/caveman-lite/skills/create-quarto-report/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/create-quarto-report/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How create-quarto-report Compares

Feature / Agentcreate-quarto-reportStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Create a Quarto document for reproducible reports, presentations, or websites. Covers YAML configuration, code chunk options, output formats, cross-references, and rendering. Use when creating a reproducible analysis report, building a presentation with embedded code, generating HTML, PDF, or Word documents from code, or migrating an existing R Markdown document to Quarto.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Create Quarto Report

Set up and write a reproducible Quarto document for analysis reports, presentations, or websites.

## When to Use

- Creating a reproducible analysis report
- Building a presentation with embedded code
- Generating HTML, PDF, or Word documents from code
- Migrating from R Markdown to Quarto

## Inputs

- **Required**: Report topic and target audience
- **Required**: Output format (html, pdf, docx, revealjs)
- **Optional**: Data sources and analysis code
- **Optional**: Citation bibliography (.bib file)

## Procedure

### Step 1: Create Quarto Document

Create `report.qmd`:

```yaml
---
title: "Analysis Report"
author: "Author Name"
date: today
format:
  html:
    toc: true
    toc-depth: 3
    code-fold: true
    theme: cosmo
    self-contained: true
execute:
  echo: true
  warning: false
  message: false
bibliography: references.bib
---
```

**Got:** File `report.qmd` exists with valid YAML frontmatter including title, author, date, format configuration, and execution options.

**If fail:** Validate the YAML header by checking for matching `---` delimiters and correct indentation. Ensure `format:` key matches one of the supported Quarto output formats (`html`, `pdf`, `docx`, `revealjs`).

### Step 2: Write Content with Code Chunks

````markdown
## Introduction

This report analyzes the relationship between variables X and Y.

## Data

```{r}
#| label: load-data
library(dplyr)
library(ggplot2)

data <- read.csv("data.csv")
glimpse(data)
```

## Analysis

```{r}
#| label: fig-scatter
#| fig-cap: "Scatter plot of X vs Y"
#| fig-width: 8
#| fig-height: 6

ggplot(data, aes(x = x_var, y = y_var)) +
  geom_point(alpha = 0.6) +
  geom_smooth(method = "lm") +
  theme_minimal()
```

As shown in @fig-scatter, there is a positive relationship.

## Results

```{r}
#| label: tbl-summary
#| tbl-cap: "Summary statistics"

data |>
  summarise(
    mean_x = mean(x_var),
    sd_x = sd(x_var),
    mean_y = mean(y_var),
    sd_y = sd(y_var)
  ) |>
  knitr::kable(digits = 2)
```

See @tbl-summary for descriptive statistics.
````

**Got:** Content sections contain properly formatted code chunks with `{r}` language identifier and `#|` chunk options for labels, captions, and dimensions.

**If fail:** Verify code chunks use the ```` ```{r} ```` syntax (not inline backticks), that `#|` options are inside the chunk (not in the YAML header), and that label prefixes match cross-reference types (`fig-` for figures, `tbl-` for tables).

### Step 3: Configure Chunk Options

Common chunk-level options (use `#|` syntax):

```
#| label: chunk-name        # Required for cross-references
#| echo: false               # Hide code
#| eval: false               # Show but don't run
#| output: false             # Run but hide output
#| fig-width: 8              # Figure dimensions
#| fig-height: 6
#| fig-cap: "Caption text"   # Enable @fig-name references
#| tbl-cap: "Caption text"   # Enable @tbl-name references
#| cache: true               # Cache expensive computations
```

**Got:** Chunk options are applied at the chunk level using `#|` syntax, and labels follow naming conventions required for cross-referencing.

**If fail:** Ensure chunk options use `#|` syntax (Quarto-native), not the legacy `{r, option=value}` R Markdown syntax. Verify that label names contain only alphanumeric characters and hyphens.

### Step 4: Add Cross-References and Citations

```markdown
See @fig-scatter for the visualization and @tbl-summary for statistics.

This approach follows @smith2023 methodology.

::: {#fig-combined layout-ncol=2}
![Plot A](plot_a.png){#fig-plotA}
![Plot B](plot_b.png){#fig-plotB}

Combined figure caption
:::
```

**Got:** Cross-references (`@fig-name`, `@tbl-name`) resolve to the correct figures and tables, and citations (`@key`) match entries in the `.bib` file.

**If fail:** Verify that referenced labels exist in code chunks with the correct prefix (`fig-`, `tbl-`). For citations, check that `.bib` keys match exactly (case-sensitive) and that `bibliography:` is set in the YAML header.

### Step 5: Render the Document

```bash
quarto render report.qmd

# Specific format
quarto render report.qmd --to pdf
quarto render report.qmd --to docx

# Preview with live reload
quarto preview report.qmd
```

**Got:** Output file generated in the specified format.

**If fail:**
- Missing quarto: Install from https://quarto.org/docs/get-started/
- PDF errors: Install TinyTeX with `quarto install tinytex`
- R package errors: Ensure all packages are installed

### Step 6: Multi-Format Output

```yaml
format:
  html:
    toc: true
    theme: cosmo
  pdf:
    documentclass: article
    geometry: margin=1in
  docx:
    reference-doc: template.docx
```

Render all formats: `quarto render report.qmd`

**Got:** All specified output formats generate successfully, each with correct styling and layout for the target format.

**If fail:** If one format fails while others succeed, check format-specific requirements: PDF needs a LaTeX engine (install with `quarto install tinytex`), DOCX needs a valid reference template if specified, and format-specific YAML options must be correctly nested under each format key.

## Validation

- [ ] Document renders without errors
- [ ] All code chunks execute correctly
- [ ] Cross-references resolve (figures, tables, citations)
- [ ] Table of contents is accurate
- [ ] Output format is appropriate for the audience

## Pitfalls

- **Missing label prefix**: Cross-referenceable figures need `fig-` prefix in label, tables need `tbl-`
- **Cache invalidation**: Cached chunks won't re-run when upstream data changes. Delete `_cache/` to force.
- **PDF without LaTeX**: Install TinyTeX or use `format: pdf` with `pdf-engine: weasyprint` for CSS-based PDF
- **R Markdown syntax in Quarto**: Use `#|` chunk options instead of `{r, echo=FALSE}` style

## Related Skills

- `format-apa-report` - APA-formatted academic reports
- `build-parameterized-report` - parameterized multi-report generation
- `generate-statistical-tables` - publication-ready tables
- `write-vignette` - Quarto vignettes in R packages

Related Skills

generate-tour-report

9
from pjt222/agent-almanac

Generate a Quarto-based tour report with embedded maps, daily itineraries, logistics tables, and accommodation/transport details. Produces a self-contained HTML or PDF document suitable for offline use during travel. Use when compiling a planned tour into a shareable document, creating an offline-accessible travel guide, documenting a completed trip with photos and statistics, or producing a professional tour proposal for a group or client.

generate-status-report

9
from pjt222/agent-almanac

Generate a project status report by reading existing artifacts (charter, backlog, sprint plan, WBS), calculating metrics, identifying blockers, and summarizing progress with RAG indicators for schedule, scope, budget, and quality. Use at the end of a sprint or reporting period, when stakeholders request a health update, before steering committee or governance meetings, or when a new blocker or risk materializes mid-project.

format-apa-report

9
from pjt222/agent-almanac

Format a Quarto or R Markdown report following APA 7th edition style. Covers apaquarto/papaja packages, title page, abstracts, citations, tables, figures, and reference formatting. Use when writing an academic paper in APA format, creating a psychology or social science research report, generating reproducible manuscripts with embedded analysis, or preparing a thesis or dissertation chapter.

create-work-breakdown-structure

9
from pjt222/agent-almanac

Create a Work Breakdown Structure (WBS) and WBS Dictionary from project charter deliverables. Covers hierarchical decomposition, WBS coding, effort estimation, dependency identification, and critical path candidates. Use after a project charter is approved, when planning a classic or waterfall project with defined deliverables, breaking a large initiative into manageable work packages, or establishing a basis for effort estimation and resource planning.

create-team

9
from pjt222/agent-almanac

Create a new team composition file following the agent-almanac team template and registry conventions. Covers team purpose definition, member selection, coordination pattern choice, task decomposition design, machine-readable configuration block, registry integration, and README automation. Use when defining a multi-agent workflow, composing agents for a complex review process, or creating a coordinated group for recurring collaborative tasks.

create-spatial-visualization

9
from pjt222/agent-almanac

Create interactive maps, elevation profiles, and spatial visualizations from GPX tracks, waypoints, or route data using R (sf, leaflet, tmap) or Observable (D3, deck.gl). Covers data import, coordinate system handling, map styling, and export to HTML or image formats. Use when visualizing a planned or completed tour route on an interactive map, creating elevation profiles for hiking or cycling routes, overlaying waypoints and POIs on a basemap, or building a web-based trip dashboard.

create-skill

9
from pjt222/agent-almanac

Create a new SKILL.md file following the Agent Skills open standard (agentskills.io). Covers frontmatter schema, section structure, writing effective procedures with Expected/On failure pairs, validation checklists, cross-referencing, and registry integration. Use when codifying a repeatable procedure for agents, adding a new capability to the skills library, converting a guide or runbook into agent-consumable format, or standardizing a workflow across projects or teams.

create-r-package

9
from pjt222/agent-almanac

Scaffold a new R package with complete structure including DESCRIPTION, NAMESPACE, testthat, roxygen2, renv, Git, GitHub Actions CI, and development configuration files (.Rprofile, .Renviron.example, CLAUDE.md). Follows usethis conventions and tidyverse style. Use when starting a new R package from scratch, converting loose R scripts into a structured package, or setting up a package skeleton for collaborative development.

create-r-dockerfile

9
from pjt222/agent-almanac

Create a Dockerfile for R projects using rocker base images. Covers system dependency installation, R package installation, renv integration, and optimized layer ordering for fast rebuilds. Use when containerizing an R application or analysis, creating reproducible R environments, deploying R-based services (Shiny, Plumber, MCP server), or setting up consistent development environments across machines.

create-pull-request

9
from pjt222/agent-almanac

Create and manage pull requests using GitHub CLI. Covers branch preparation, writing PR titles and descriptions, creating PRs, handling review feedback, and merge/cleanup workflows. Use when proposing changes from a feature or fix branch for review, merging completed work into the main branch, requesting code review from collaborators, or documenting the purpose and scope of a set of changes.

create-multistage-dockerfile

9
from pjt222/agent-almanac

Create multi-stage Dockerfiles that separate build and runtime environments for minimal production images. Covers builder/runtime stage separation, artifact copying, scratch/distroless/alpine targets, and size comparison. Use when production images are too large, when build tools are included in the final image, when you need separate dev and prod images from one Dockerfile, or when deploying to constrained environments like edge or serverless.

create-glyph

9
from pjt222/agent-almanac

Create R-based pictogram glyphs for skill, agent, or team icons in the visualization layer. Covers concept sketching, ggplot2 layer composition using the primitives library, color strategy, registration in the appropriate glyph mapping file and manifest, rendering via the build pipeline, and visual verification of the neon-glow output. Use when a new entity has been added and needs a visual icon for the force-graph visualization, an existing glyph needs replacement, or when batch-creating glyphs for a new domain.