effect-resilience

Implement retry, timeout, and polling with Effect schedules and backoff.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/aitchwhy/dotfiles --skill effect-resilience
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-resilience
Source: https://github.com/aitchwhy/dotfiles/tree/main/config/agents/skills/effect-resilience
Command: npx skills add https://github.com/aitchwhy/dotfiles --skill effect-resilience

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adds retry, timeout, and polling patterns using Effect for robust flows.

Core Features & Use Cases

  • Retry with schedules
  • Timeouts with typed errors
  • Polling loops with conditions
  • XState integration patterns

Quick Start

Try a sample program with Effect.retry and Schedule patterns.

Frequently Asked Questions about effect-resilience

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

FAQPage Schema
How do I retry failed asynchronous operations with exponential backoff?

Retry failed async operations using Effect.retry combined with Schedule combinators like exponential backoff and jitter. Effect handles typed errors and automatically re-executes your operation according to the schedule you define, preventing cascading failures.

Can I set timeouts on Effect operations with typed error handling?

Yes, Effect.timeout enforces time limits on async operations and returns typed errors when exceeded. This lets you fail fast and distinguish timeout failures from other error types in your error handling logic.

What's the best way to implement polling loops for status checks?

Use Effect.repeat with polling schedules to loop over status checks until a condition is met. Combine it with Schedule.spaced or Schedule.recurs to control polling frequency and iteration limits without manual loop management.

How do I integrate Effect resilience patterns with XState v5?

Wrap Effect operations in fromPromise within XState v5 state machines. This lets you apply Effect.retry, Effect.timeout, and Effect.repeat patterns to promises invoked by XState, maintaining typed error handling across state transitions.

What anti-patterns does Effect scheduling help avoid?

Effect Schedule combinators prevent common pitfalls like unbounded retries, missing jitter in backoff (causing thundering herd), and hardcoded delays. Using Schedule forces explicit retry logic, error typing, and failure boundaries into your async flow.

When should I use polling over event-driven approaches?

Polling works best for external service status checks, rate-limited APIs, or systems without webhook support. Effect.repeat with scheduling lets you poll efficiently with controlled frequency, though event-driven patterns are preferable when the source emits notifications directly.