effect-best-practices

Enforce Effect-TS patterns for services, errors, layers, and atoms.

1|Updated Apr 13, 2015
One-click install
npx skills add https://github.com/tyler-dot-earth/.dotfiles --skill effect-best-practices-tyler-dot-earth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: effect-best-practices
Source: https://github.com/tyler-dot-earth/.dotfiles/tree/main/agents/skills/effect-best-practices
Command: npx skills add https://github.com/tyler-dot-earth/.dotfiles --skill effect-best-practices-tyler-dot-earth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Enforces consistent Effect-TS patterns for services, errors, layers, and atoms to improve type safety, testability, and maintainability.

Core Features & Use Cases

  • Defines a Service-based architecture using Effect.Service with automatic accessors, dependencies, and a Default Layer.
  • Encourages explicit error definitions with Schema.TaggedError and catchTag/catchTags for precise error handling.
  • Provides patterns for Layer composition, Option handling, Atom state patterns, and Observability basics.
  • Reference patterns are provided in references/*.md to guide implementation and testing.

Quick Start

Refactor existing services to use Effect.Service with automatic accessors, declare dependencies, and adopt Schema.TaggedError with catchTag usage.

Frequently Asked Questions about effect-best-practices

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

FAQPage Schema
How do I structure Effect-TS services to improve type safety and testability?▼

Effect-TS error handling is best managed by defining explicit error types with Schema.TaggedError and handling them precisely using catchTag and catchTags, ensuring robust and type-safe error management across your application.

What is the best way to handle errors in Effect-TS?▼

Effect-TS error handling is best managed by defining explicit error types with Schema.TaggedError and handling them precisely using catchTag and catchTags, ensuring robust and type-safe error management across your application.

How do I compose layers and manage dependencies in Effect-TS?▼

Compose Effect-TS layers by establishing clear layer dependencies and utilizing a Default Layer, which allows you to cleanly modularize service construction and wire dependencies throughout your architecture.

Can I use Effect-TS patterns for state management with React?▼

Yes, you can apply Effect-TS patterns for state management with React by implementing observable state patterns and Atom guidance, ensuring consistent and observable state synchronization across your user interface.

Does Effect-TS provide built-in observability and tracing for services?▼

Effect-TS supports observability and tracing by applying Effect.fn tracing within your service architecture, allowing you to monitor execution flows and establish observable state patterns across your application.

When should I refactor existing services to use Effect.Service?▼

You should refactor existing services to use Effect.Service when you need to standardize service definitions, enforce consistent architecture, and adopt Schema.TaggedError with catchTag usage to improve maintainability.