跳到技能内容
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
词映 AI导航
工具库Skills 技能
我的收藏
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
Skills directory/avsm/ocaml-claude-marketplace/result

OCaml Result skill for Claude Code: Chain parsing and validation

Handle expected failures with explicit Ok and Error values. The skill covers Result chains, value extraction, and choosing a default when one is appropriate.

中文

Install in Claude Code

Use a local OCaml project. The example refers to Result.Syntax in the OCaml 5.4 library reference. Check your compiler version before running it.

  1. Download the repository snapshot at the linked commit. Copy the entire plugins/ocaml-dev/skills/result/ directory into .claude/skills/result/ in your practice project.
  2. Check that SKILL.md is directly inside .claude/skills/result/. Open Claude Code from the project root.
  3. Enter /result to start the example below.

Example task

Run /result and ask for a function that parses an integer and then checks it is positive. Supply 3, abc, and 0 as separate test inputs.

What to check

Expect Ok 3 for 3, a parse error for abc, and a range error for 0. The second step receives a value only after parsing succeeds.

Original SKILL.md on GitHub · Updated 2026-11-11

Frequently asked question

Should I use Result.get_ok on data supplied by users?

Handle expected parse failures by matching Ok and Error or by chaining with Result.bind. Result.get_ok raises when its argument is Error.

词映 AI 导航Skills 技能
工具分类全部工具已本地化技能选型指南AI 快讯