ocaml-tutorials

Automate creation of interactive OCaml tutorials from .mld sources with MDX.

35|9|Updated Dec 25, 2025
One-click install
npx skills add https://github.com/avsm/ocaml-claude-marketplace --skill ocaml-tutorials-avsm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ocaml-tutorials
Source: https://github.com/avsm/ocaml-claude-marketplace/tree/main/plugins/ocaml-dev/skills/ocaml-tutorials
Command: npx skills add https://github.com/avsm/ocaml-claude-marketplace --skill ocaml-tutorials-avsm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OCaml library tutorials are often hard to author with a consistent structure and executable examples. This skill enables constructing MDX-enabled tutorials from .mld sources, providing an integrated workflow that combines narrative content with runnable code blocks and verifiable outputs.

Core Features & Use Cases

  • MDX-powered executable examples within .mld documentation to demonstrate OCaml library usage.
  • Clear file-structure guidance requiring doc/ directory, tutorial.mld, index.mld, and a properly configured dune-project for MDX.
  • Reproducible publishing workflow suitable for library authors, educators, and documentation teams who need verifiable tutorials.

Quick Start

Create an OCaml tutorial project by scaffolding doc/, tutorial.mld, index.mld, and update the dune-project for MDX support.

Frequently Asked Questions about ocaml-tutorials

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

FAQPage Schema
How do I create interactive OCaml tutorials with executable examples?

Create interactive OCaml tutorials by scaffolding a doc/ directory with tutorial.mld and index.mld files, then configuring dune for MDX support. This workflow combines narrative .mld documentation with runnable code blocks to produce verifiable, executable examples.

What is MDX and how does it work with .mld documentation?

MDX enables executable code blocks within .mld documentation files to verify OCaml library usage. It integrates narrative content with runnable code, allowing library authors to generate step-by-step tutorials with tested, reproducible outputs.

Do I need a specific directory structure to set up MDX for OCaml documentation?

Yes, MDX-enabled OCaml documentation requires a doc/ directory containing tutorial.mld and index.mld files, alongside a properly configured dune-project. This specific file structure ensures the reproducible publishing workflow functions correctly.

Can I use .mld files to generate reproducible OCaml library documentation?

Yes, .mld files are the source format for generating reproducible OCaml library documentation. By annotating .mld sources with MDX, you create an integrated workflow that validates code examples and produces verifiable tutorial outputs.

What's the best way to scaffold an OCaml tutorial project for library authors?

The best way to scaffold an OCaml tutorial project is creating the required doc/, tutorial.mld, and index.mld files, then updating the dune-project for MDX support. This establishes a reproducible publishing workflow tailored for library authors and educators.

Why use MDX for OCaml tutorials instead of standard markdown documentation?

Use MDX for OCaml tutorials because standard markdown cannot execute and verify code blocks. MDX integrates with .mld sources to run examples, ensuring library documentation remains accurate and reproducible during updates.