一键导入
ocaml-opam-tinyflags-add-flag
Add a TinyFlags flag to an OCaml project with implementation, tests, and rollout notes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add a TinyFlags flag to an OCaml project with implementation, tests, and rollout notes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Remove a stale TinyFlags flag and simplify OCaml call sites.
Review TinyFlags flag definitions and call sites for safe OCaml rollouts.
| name | ocaml-opam-tinyflags-add-flag |
| description | Add a TinyFlags flag to an OCaml project with implementation, tests, and rollout notes. |
Use this skill when adding a feature flag to an OCaml project that depends on
agentxm-example-tinyflags.
Tinyflags.t flag set from a
(name, flag) list (typically lib/<pkg>/flags.ml or similar).Boolean (Tinyflags.Bool.make_exn ...) or a
VariantFlag (Tinyflags.Variant.make_exn ...) entry.kebab-case flag names that mirror the call-site behavior.test/ for default behavior and
rollout behavior. Run via dune runtest or
dune exec ./test/<name>.exe..opam description when the flag is
user-facing.Use Tinyflags.Bool.make_exn ~default:false () for a disabled-by-default
feature.
Use Tinyflags.Bool.make_exn ~default:false ~rollout:10 () for a percentage
rollout. Rollout bucketing is deterministic on the Tinyflags.Context.t
[id] field — thread a stable identifier (user, session, account) through
the request boundary.
Use
Tinyflags.Variant.make_exn ~default:"classic" ["classic"; "semantic"]
when the call site needs a named treatment instead of true / false.
Use ~rollout to allocate traffic:
Tinyflags.Variant.make_exn
~default:"classic"
~rollout:[ ("semantic", 10) ]
[ "classic"; "semantic" ]
~default argument (boolean) or ~default
argument (variant) tied to a member of the variant list.int in 0..100.match branches are not introduced.