plugins/ocaml-dev/skills/tutorials/SKILL.md
Creating OCaml library tutorials using .mld documentation format with MDX executable examples. Use when discussing tutorials, documentation, .mld files, MDX, or interactive documentation.
npx skillsauth add avsm/ocaml-claude-marketplace tutorialsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Invoke this skill when:
OCaml tutorials should:
(mdx
(files tutorial.mld)
(libraries your_library_name))
(documentation
(package your_package_name)
(mld_files index tutorial))
Enable MDX:
(using mdx 0.4)
Add MDX as doc dependency:
(package
(name your_package)
(depends
...
(mdx :with-doc)
(odoc :with-doc)))
{0 Topic Name Tutorial}
Introduction text.
{1 Section Title}
Section content.
{2 Subsection Title}
Subsection content.
Use {@ocaml[...]} for executable examples:
{@ocaml[
# let x = 1 + 1;;
val x : int = 2
]}
# are input;; to terminate expressionsUse {v ... v} for verbatim blocks:
{v
name: Alice
age: 30
v}
{!Library.function_name} - Function reference
{!Library.Module.type_name} - Type reference
{{!Library}API reference} - Link with custom text
{ul
{- Item one}
{- Item two}
}
{ol
{- First item}
{- Second item}
}
{b bold text}
{i italic text}
{1 Setup}
{@ocaml[
# #require "library_name";;
# open Library;;
]}
dune build @check # Verify syntax
dune build @doc # Build documentation
dune runtest # Run MDX tests (if configured)
Use fully qualified names: {!Library.of_string} not {!of_string}
Enable in dune-project: (using mdx 0.4)
Run code manually, update expected output. Use <abstr> for abstract values.
tools
Working with the OxCaml extensions to OCaml. Use when the oxcaml compiler is available and you need high-performance, unboxing, stack allocation, data-race-free parallelism
development
Testing strategies for OCaml libraries. Use when discussing tests, alcotest, eio mocks, test structure, or test-driven development in OCaml projects.
development
Security hardening for OCaml libraries through systematic vulnerability research. Use when Claude needs to: (1) Research CVEs in similar implementations (C, Rust, Go, Python) and add regression tests, (2) Add fuzz tests for parsers and encoders, (3) Audit integer handling and buffer operations, (4) Test boundary conditions and malformed input, (5) Review cryptographic usage, (6) Add defensive checks against common vulnerability classes
testing
Working with IETF RFCs in OCaml projects. Use when mentioning RFC numbers, implementing internet standards, adding specification documentation, or discussing protocol compliance.