edit-quarto-markdown-files | Skill Performance & Reviews | TopRankSkills

TopRank Skills

Home / Skills / tools / edit-quarto-markdown-files

edit-quarto-markdown-files

maintained by crossxwill

star 5 account_tree 0 verified_user MIT License
bolt View GitHub

name: edit-quarto-markdown-files description: Edit Quarto (.qmd) and Markdown (.md) files with proper nested code block handling to prevent parser errors and truncated output; standalone utility with no skill dependencies.

When to Use

  • Editing .qmd (Quarto) files
  • Editing .md (Markdown) files
  • Creating or modifying documentation with code examples
  • Any file containing nested markdown code blocks

Critical: Nested Markdown Code Blocks

When editing markdown files that contain code blocks, you must use four backticks (````) for the outer fence to properly nest three-backtick code examples inside.

Why This Matters

If you use three backticks for both the outer fence and inner code examples, the markdown parser will incorrectly close the outer block at the first inner closing fence, causing:

  • Truncated or malformed output
  • Lost content after the first code example
  • Broken formatting in rendered documents

Correct Pattern

Use four backticks for the outer fence when showing code block examples:

## Example Section

Here is how to write Python code:

```python
def hello():
    print("Hello, world!")
```

And here is R code:

```r
hello <- function() {
  print("Hello, world!")
}
```

Incorrect Pattern (Causes Truncation)

Do NOT use three backticks for both outer and inner fences:

## Example Section

Here is Python code:

```python  <!-- This closes the outer block! -->
def hello():
    print("Hello, world!")

## Quarto-Specific Guidelines

### YAML Front Matter
Quarto files start with YAML front matter between `---` delimiters:

````qmd
---
title: "Document Title"
format: html
execute:
  echo: true
---

# Content starts here

Executable Code Chunks

Quarto code chunks can have execution options:

```{python}
#| label: fig-example
#| fig-cap: "Example figure"
import matplotlib.pyplot as plt
plt.plot([1, 2, 3])
```

Cross-References

Use @fig-, @tbl-, @sec- prefixes for cross-references:

See @fig-example for the plot.
See @tbl-results for the data.
See @sec-methods for methodology.

Best Practices

  1. Always use four backticks when your content contains code block examples
  2. Preserve YAML front matter - don't accidentally modify document metadata
  3. Maintain consistent indentation in nested lists and code chunks
  4. Use proper Quarto chunk options with #| syntax for execution control
  5. Test rendering after edits to ensure code blocks display correctly

File Extensions Reference

Extension Description
.qmd Quarto markdown document
.md Standard markdown
.Rmd R Markdown (similar to Quarto)
.ipynb Jupyter notebook (can be edited with Quarto)

Example Edit Task

When asked to add a code example to a markdown file, structure your edit like this:

## New Section

Here's how to load data in Python:

```python
import pandas as pd
df = pd.read_csv("data.csv")
print(df.head())
```

Output:
```
   col1  col2
0     1     a
1     2     b
```

This ensures all nested code blocks render correctly without truncation.

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!

Skill Details

GitHub Stars 5
GitHub Forks 0
Created Jan 2026
Last Updated il y a 5 mois
tools tools ide plugins

Related Skills

writing-skills
chevron_right
codex
chevron_right
smart-illustrator
chevron_right
ast-index
chevron_right
packmind-standard-creator
chevron_right

Build your own?

Join 12,000+ developers contributing to the Claude ecosystem.