跳到主要内容

Lang Ocaml

Navigate, test, and build OCaml via Dune.

Skill metadata​

SourceBundled (installed by default)
Pathskills/software-development/lang-ocaml
Version1.0.0
AuthorVibeOS
LicenseMIT
Platformslinux, macos, windows

Reference: full SKILL.md​

信息

The following is the complete skill definition that VibeOS loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.

OCaml Language Pack Skill

Drive OCaml work with the project index and standard CLI recipes. LSP hint: ocaml-lsp (editor-side when applicable). Zero new core tools.

What this language is (beginner)​

Функциональный язык с мощной системой типов. Часто пишут компиляторы, анализаторы и «правильные» инструменты.

Лучше всего для:

  • компиляторы и инструменты
  • DSL / статический анализ
  • типобезопасные CLI
  • исследовательский systems-код

When to Use​

Выбирай этот pack, если:

  • есть dune-project / *.opam
  • команда на OCaml
  • нужен типобезопасный toolchain/compiler-ish код

Manifests (автодетект репозитория): dune-project, dune-workspace, *.opam

Обычно рядом: Иногда рядом с C; opam switch для зависимостей.

См. также skill choose-language-pack, если цель ещё не ясна. Сначала можно ранжировать packs: vibeos language recommend "…".

When NOT to use​

  • продуктовый веб → TypeScript / Python
  • практичный BEAM → Elixir / Gleam
  • системный safety → Rust

Prerequisites​

vibeos pack apply lang-ocaml --apply
vibeos pack apply project-intelligence --apply

How to Run​

vibeos project index build
dune build
dune runtest
opam exec -- dune build

Quick Reference​

GoalCommand
Apply packvibeos pack apply lang-ocaml --apply
Doctorvibeos language doctor ocaml
Primary testdune runtest
Choose guideskill choose-language-pack
Recommendvibeos language recommend "…"

Procedure​

  1. Если язык ещё не выбран для нового проекта — сначала choose-language-pack или vibeos language recommend.
  2. Work from the project root that matches pack manifests.
  3. Index query → read_file → edit → path-scoped tests when iterating.
  4. Prefer the package manager / toolchain already locked in the repo.
  5. Explain non-obvious toolchain choices in plain language for the user.

Pitfalls​

  • Prefer dune over raw ocamlc.
  • Keep opam switch project-local when possible.
  • Do not invent core tools; stay on terminal + read_file + index CLI.

Verification​

vibeos language doctor ocaml
vibeos project index status