跳到技能内容
词映 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/effects

OCaml 5 effects skill for Claude Code: Design a streaming reader

Design streaming code with suspension at the data source and a plain input interface for the parser. This makes it easier to test parsing with in-memory data.

中文

Install in Claude Code

Use Claude Code with an OCaml 5 example. Running an implementation that uses Eio or affect requires the corresponding library.

  1. Download the repository snapshot at the linked commit. Copy plugins/ocaml-dev/skills/effects/ into .claude/skills/effects/ in your practice project and keep its reference files.
  2. Check that SKILL.md is directly inside .claude/skills/effects/. Open Claude Code from the project root.
  3. Enter /effects to try the example below.

Example task

Run /effects and describe a two-byte length header. Compare bytes arriving in separate chunks, a delay before byte two, and a permanent end after byte one. Ask for an interface and test design.

What to check

The design waits for delayed data at the source and treats a permanently truncated header as a separate case. It includes tests for both outcomes.

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

Frequently asked question

Where should a streaming reader wait for the next chunk?

Let the data source handle waiting. The parser reads through the interface and can be tested against complete and truncated input.

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