By avsm
Accelerate OCaml development workflows: initialize dune/opam projects with CI, migrate from ocamlbuild, enforce idiomatic code style and Result patterns, add fuzz/Alcotest suites, integrate RFCs into docs, profile memory, harden security, publish to opam/npm, and leverage ocamllsp for code intelligence.
npx claudepluginhub avsm/ocaml-claude-marketplace --plugin ocaml-devFetch an IETF RFC and integrate it into the project with OCamldoc citations
Initialize a new OCaml project with dune, opam, CI, and standard files
Set up npm publishing for OCaml projects via js_of_ocaml/wasm_of_ocaml
Convert an ocamlbuild/topkg project to dune build system
Refactor and tidy OCaml code to be more idiomatic and maintainable
Use when writing or modifying OCaml code to annotate AI involvement. Triggers on any code generation, editing, or autonomous agent output in .ml/.mli files. Also use when creating or updating .opam files for packages containing AI-involved code.
Designing and implementing robust command-line interfaces using OCaml's cmdliner library. Use when Claude needs to: (1) Design a new CLI or subcommand layout, (2) Implement cmdliner terms and combinators, (3) Enforce clear, predictable, orthogonal options, (4) Produce high-quality --help output and error messages, (5) Integrate cmdliner CLIs into dune-based OCaml projects.
OCaml coding style and refactoring patterns. Use when the user asks to tidy, clean up, refactor, or improve OCaml code, reviewing code quality, enforcing naming conventions, or reducing complexity.
Migrating OCaml projects from ocamlbuild/topkg to dune. Use when discussing _tags files, .mllib files, pkg/pkg.ml, topkg, or build system migration.
OCaml 5 algebraic effects design patterns. Use when Claude needs to: (1) Design APIs that interact with effect-based schedulers, (2) Decide between effects vs exceptions, (3) Integrate libraries with Eio or affect, (4) Handle suspension vs error cases in streaming code, (5) Understand the layered effect design principle
Eio concurrency patterns for OCaml applications. Use when Claude needs to: (1) Write concurrent OCaml code with Eio, (2) Handle network operations with cohttp-eio, (3) Manage resource lifecycles with switches, (4) Implement rate limiting or synchronization, (5) Create parallel operations with fibers, (6) Test async code with Eio_mock, (7) Integrate with bytesrw for streaming, or any other Eio-based concurrency tasks
OCaml fuzz testing with Crowbar for protocol implementations. Use when Claude needs to: (1) Write fuzz tests for parsers and encoders, (2) Test roundtrip invariants (parse(encode(x)) = x), (3) Verify boundary conditions and error handling, (4) Test state machines and transitions, (5) Organize fuzz test suites for large codebases, (6) Run long-lived AFL campaigns with Crowbar
JSON type-safe encoding and decoding using the OCaml jsont library. Use when Claude needs to: define typed JSON codecs for OCaml record types, parse JSON strings to OCaml values, or serialize OCaml values to JSON, or work with nested JSON structures
OCaml Logs library patterns for structured logging. Use when Claude needs to: (1) Add logging to OCaml modules, (2) Create per-module log sources, (3) Use appropriate log levels, (4) Add structured tags to log messages
OCaml memtrace profiling for allocation hotspot analysis. Use when Claude needs to: (1) Add memtrace instrumentation to OCaml executables, (2) Run targeted benchmarks with tracing enabled, (3) Identify allocation hotspots from trace output, (4) Optimize code to reduce boxing and allocations, (5) Validate optimizations with before/after comparisons
Publishing OCaml to npm via js_of_ocaml and wasm_of_ocaml. Use when discussing browser targets, JavaScript compilation, WASM output, npm packages, or the two-branch workflow.
Fixing odoc documentation warnings and errors. Use when running dune build @doc, resolving reference syntax issues, cross-package references, ambiguous references, hidden fields, or @raise tags in OCaml documentation.
OCaml development guidance for building robust, type-safe applications. Use when Claude needs to: (1) Write OCaml code following modern best practices, (2) Design module interfaces (.mli files), (3) Handle errors with result types, (4) Work with dune build system, (5) Use common OCaml libraries (eio, fmt, logs, cmdliner, yojson, cohttp-eio), or any other OCaml development tasks
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
Terminal progress bars and spinners using the OCaml progress library. Use when Claude needs to: (1) Add progress bars to long-running CLI operations, (2) Show download/upload progress with bytes and speed, (3) Create multi-line progress displays, (4) Integrate progress reporting with Eio concurrency
Standards for OCaml project metadata files. Use when initializing a new OCaml library/module, preparing for opam release, setting up CI, discussing project structure, or ensuring proper .mli/.ocamlformat files exist.
OCaml Result type patterns using OCaml 5.x stdlib. Use when Claude needs to: (1) Handle errors with Result types, (2) Chain Result operations with let*, (3) Extract values from Ok/Error, (4) Refactor code using local let* bindings to use Result.Syntax
Working with IETF RFCs in OCaml projects. Use when mentioning RFC numbers, implementing internet standards, adding specification documentation, or discussing protocol compliance.
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 strategies for OCaml libraries. Use when discussing tests, alcotest, eio mocks, test structure, or test-driven development in OCaml projects.
Creating OCaml library tutorials using .mld documentation format with MDX executable examples. Use when discussing tutorials, documentation, .mld files, MDX, or interactive documentation.
A collection of Claude Code plugins for OCaml development, based initially on the experiences in https://anil.recoil.org/notes/2025-aoah
Add this marketplace to Claude Code:
/plugin marketplace add avsm/ocaml-claude-marketplace
Then install the OCaml development plugin:
/plugin install ocaml-dev@ocaml-claude-marketplace
Comprehensive OCaml development toolkit including:
Slash Commands:
/init-ocaml [name] - Initialize a new OCaml project with dune, opam, CI, and standard files/port-to-dune - Migrate ocamlbuild/topkg projects to dune/add-rfc <number> - Fetch an IETF RFC and integrate with ocamldoc citations/ocaml-npm - Set up npm publishing for js_of_ocaml/wasm_of_ocaml projects/tidy - Refactor OCaml code to be more idiomaticSkills (auto-invoked):
Project & Build:
Code Quality:
OCaml 5 & Concurrency:
Library-Specific:
Testing & Profiling:
OxCaml Extensions:
LSP Integration:
.ml, .mli, .mly, .mll filesCreate ~/.claude/ocaml-config.json for personalized settings:
{
"author": {
"name": "Your Name",
"email": "you@example.com"
},
"license": "ISC",
"ci_platform": "github",
"git_hosting": {
"type": "github",
"org": "your-username"
},
"ocaml_version": "5.2.0"
}
If not configured, commands will prompt for required values.
The plugin includes CI templates for:
Select your preferred platform in the configuration.
ISC License
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Access thousands of AI prompts and skills directly in your AI coding assistant. Search prompts, discover skills, save your own, and improve prompts with AI.
Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.
Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.
Orchestrate multi-agent teams for parallel code review, hypothesis-driven debugging, and coordinated feature development using Claude Code's Agent Teams
Complete developer toolkit for Claude Code