effect-option

Clarify when to use Option<T> versus nullable types in Effect codebases.

5|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/agentxm/axm --skill effect-option
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-option
Source: https://github.com/agentxm/axm/tree/main/.axm/extensions/%40axm/skills/effect-option/src
Command: npx skills add https://github.com/agentxm/axm --skill effect-option

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many TypeScript codebases using Effect struggle to decide whether optional data should be modeled with Option<T> or as nullable values (T | null | undefined), leading to scattered conventions and subtle bugs.

Core Features & Use Cases

  • Establishes clear guidance for when to wrap values in Option versus using nullable types.
  • Demonstrates safe interop boundaries with external APIs, DOM, and JSON serialization.
  • Use case: modeling a user profile where some fields may be absent but the application must still reason about presence vs absence reliably.

Quick Start

Provide a concise example converting an external payload into Effect<Option<YourType>, Error> and handling missing data with a sensible default.

Frequently Asked Questions about effect-option

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
When should I use Option<T> vs nullable types in Effect?

Option<T> is best when your application must explicitly reason about presence versus absence reliably. Nullable types like T | null | undefined are suitable for simpler optional properties where explicit functional handling is unnecessary.

How do I handle Option types when serializing JSON for external APIs in Effect?

To handle Option types during JSON serialization for external APIs, establish safe interop boundaries by converting Option<T> values into nullable types before transmission, preserving internal semantics while ensuring external API compatibility.

Should I use nullable types or Option for modeling optional properties in TypeScript?

Modeling optional properties in TypeScript with Option clarifies presence versus absence reliably, preventing subtle bugs caused by scattered nullable conventions. Option<T> forces explicit handling, whereas nullable types allow implicit undefined or null bypasses.

How do I convert an external API payload into an Effect Option?

Convert an external API payload into an Effect Option by parsing the input data and wrapping potentially missing fields in Option<T>. Handle missing data by providing a sensible default or propagating an Error within the Effect context.

What are the limitations of using nullable types instead of Option in Effect?

Using nullable types instead of Option in Effect limits your ability to reliably reason about data absence, leading to scattered conventions and subtle bugs. Nullable types lack explicit functional constructs for safe chaining and presence handling.

Does the effect-option Skill work with external DOM APIs?

Yes, the effect-option Skill works with external DOM APIs by demonstrating safe interop boundaries. It guides you on how to convert nullable DOM values into Option<T> types to preserve internal semantics and ensure type-safe data transformations.