effect-optics
CommunityCompose type-safe deep updates with Optics.
Software Engineering#effect-ts#schema validation#type-safe#traversal#optics#immutable updates#tagged unions
Authormpsuesser
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Effect Optics solves the pain of safely reading and immutably updating deeply nested TypeScript data without rewriting large object spread blocks or risking incorrect updates.
Core Features & Use Cases
- Composable optics (Iso, Lens, Prism, Optional, Traversal): Build focused accessors for nested fields and structured transformations.
- Safe navigation and updating: Choose the right optic kind for always-present fields, optional fields, tagged unions, records/indices, and collections.
- Practical patterns for real codebases: Reuse a single optic path for multiple transforms, update discriminated unions by
_tag, and traverse/filter arrays with validation.
Quick Start
Use the effect-optics skill to build an optic chain with Optic.id<S>() and then call replace or modify to update nested values immutably while keeping types and failure modes aligned with the chosen optic kind.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: effect-optics Download link: https://github.com/mpsuesser/pi-effect-harness/archive/main.zip#effect-optics Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.