qmd-corrector

Audit and fix YAML and Div syntax errors in Quarto .qmd files.

Updated May 10, 2026
One-click install
npx skills add https://github.com/c-kraus/thws-skills --skill qmd-corrector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qmd-corrector
Source: https://github.com/c-kraus/thws-skills/tree/main/qmd-corrector
Command: npx skills add https://github.com/c-kraus/thws-skills --skill qmd-corrector

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents Quarto lecture files from failing in Moodle rendering or PDF generation due to subtle YAML or Div syntax issues that may otherwise slip through unnoticed.

Core Features & Use Cases

  • Systematic .qmd Audit: Scans the target file for YAML frontmatter validity, common Div container rules (flip-cards, drag-exercises, case-studies, details/quick-check/video/widget), math formatting issues, and iframe/widget syntax.
  • In-place Auto-fixes: Corrects detected structural violations directly in the file so the rendered output matches the intended logic.
  • Structured Quality Report: Produces a detailed report listing what was found, what was fixed, and what needs human review.

Quick Start

Tell the skill which .qmd file to fix, for example: "Run qmd-corrector on /path/to/lecture.qmd and fix any issues in-place."

Frequently Asked Questions about qmd-corrector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Quarto .qmd YAML frontmatter errors that break Moodle rendering?

To fix Quarto .qmd YAML frontmatter errors that break Moodle rendering, you need an auditing tool that scans and corrects structural syntax violations in-place, ensuring the rendered output matches the intended logic without silent failures.

Why does my Quarto file fail PDF generation due to Div container syntax?

Quarto files fail PDF generation due to invalid Div container syntax for elements like flip-cards or drag-exercises. An automated .qmd audit can detect and repair these structural violations directly to restore proper rendering.

Can I automatically lint and repair .qmd files before publishing to Moodle?

Yes, you can automatically lint and repair .qmd files before publishing to Moodle by running a systematic audit that checks math formatting, iframe syntax, and Div containers, applying in-place auto-fixes for detected structural violations.

What is the best way to validate Quarto lecture files for syntax issues?

The best way to validate Quarto lecture files for syntax issues is to perform a systematic .qmd audit that produces a structured quality report, detailing exactly what was found, what was fixed automatically, and what requires human review.

How do I preserve my original .qmd file when applying syntax corrections?

To preserve your original .qmd file when applying syntax corrections, you can specify a save-as path during the audit process, allowing the tool to write the corrected formatting to a new file while keeping the original intact.

Does the Quarto .qmd corrector support widget and iframe syntax validation?

Yes, the Quarto .qmd corrector supports widget and iframe syntax validation, systematically scanning these elements alongside math formatting and details blocks to prevent rendering failures in Moodle or PDF outputs.