ocaml-docs

Fix odoc reference syntax and disambiguation errors in OCaml documentation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OCaml documentation often emits odoc warnings and errors during dune build, making it hard to keep docs in sync across modules and libraries.

Core Features & Use Cases

  • Reference syntax fixes: resolves ambiguous or incorrect odoc references.
  • Cross-package references: ensures external dependencies link correctly and missing exports are addressed.
  • @raise tag guidance: corrects @raise usage to point to the right exceptions.
  • Odoc v3 prerequisites guidance: helps pin proper versions for odoc and dune to enable advanced rules.

Quick Start

Run dune build @doc in your OCaml project and follow the guided fixes to clean up odoc warnings.

Frequently Asked Questions about ocaml-docs

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

FAQPage Schema
How do I fix odoc warnings during a dune build in OCaml?

Fix odoc warnings during a dune build by correcting odoc reference syntax and disambiguation. This process resolves cross-package references, hidden fields, and @raise tag issues to ensure precise OCaml documentation generation.

Why are my OCaml cross-package references failing in odoc?

OCaml cross-package references fail in odoc due to incorrect reference syntax or missing exports. Resolving these odoc warnings requires fixing ambiguous references and ensuring external dependencies link correctly across modules and libraries.

Do I need specific dune and odoc versions to validate OCaml documentation syntax?

You need pinned versions of dune using odoc-v3 rules and a staging version of odoc to validate OCaml documentation syntax. These prerequisites reliably parse and validate documentation references and syntax.

What is the correct way to use the @raise tag in OCaml documentation?

The correct way to use the @raise tag in OCaml documentation is to point to the right exceptions. Adjusting the odoc reference syntax ensures the @raise tag properly resolves to the intended exception definitions.

What is the best way to eliminate odoc errors across modules and libraries?

The best way to eliminate odoc errors across modules and libraries is running dune build @doc and applying guided fixes. This addresses reference syntax, cross-package links, and hidden fields to clean up documentation warnings.