What problem does it solve? Setting up AI language model providers in Effect applications involves juggling API keys, HTTP clients, model configuration, and fallback logic. This Skill provides the correct patterns for wiring Anthropic, OpenAI, OpenAI-compatible, and OpenRouter providers into Effect layers without common mistakes like hardcoded keys or missing HTTP client layers. ## Core Features & Use Cases - Provider Layer Setup: Build client and model layers for Anthropic, OpenAI, OpenAI-compatible endpoints, and OpenRouter using Config.Redacted for secrets and FetchHttpClient for transport. - Multi-Provider Fallback: Use ExecutionPlan to retry cheaper models first and fall back to more capable ones, with observable attempt lifecycle events. - Stateful Chat & Streaming: Maintain conversation history with Chat.fromPrompt, export and restore sessions as JSON, and stream text deltas through Effect Streams. - Use Case: Build an AiWriter service that drafts announcements with GPT-5.2, falls back to Claude Opus on failure, keeps a chat session with history, and wraps all AiError values into a domain-specific tagged error. ## Quick Start Ask the agent to set up an Anthropic language model layer with an API key from Config and use it to generate text in an Effect program.