effect-layers
CommunityMaster memoization for Effect Layers in tests.
Authorlucas-barake
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Effect Layer memoization can lead to unintended sharing across layer compositions. This guide explains identity-based caching, how to escape it with Layer.fresh, and how to control memoization using Layer.memoize and ManagedRuntime to ensure predictable test and runtime behavior.
Core Features & Use Cases
- Identity-based memoization ensures a single instance per layer reference within a build.
- Layer.fresh escapes memoization, enabling multiple independent instances when needed.
- Layer.memoize enables lazy construction with deterministic caching within a scope.
- ManagedRuntime allows sharing or isolating memoization across runs for stable tests and production workflows.
- Patterns for testing describe per-block isolation via it.layer and shared infrastructure via globalSetup.
Quick Start
Apply Layer.merge with your base layers and use Layer.fresh only when you need separate instances to escape memoization.
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-layers Download link: https://github.com/lucas-barake/dotai/archive/main.zip#effect-layers 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 223,000+ vetted skills library on demand.