effect

Implements Effect v4 TypeScript services, schemas, and tests using verified source patterns.

72|19|Updated Jun 6, 2026
One-click install
npx skills add https://github.com/sure-scale/doc-haus --skill effect-sure-scale
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect
Source: https://github.com/sure-scale/doc-haus/tree/main/.opencode/skills/effect
Command: npx skills add https://github.com/sure-scale/doc-haus --skill effect-sure-scale

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Effect's API surface changes between versions, and AI assistants often generate outdated v2/v3 patterns from memory. This Skill grounds all Effect-related code generation and answers in the actual effect-smol source repository, eliminating hallucinated APIs and stale patterns. ## Core Features & Use Cases - Source-Verified Answers: Clones and searches the effect-smol repository to verify exact APIs, examples, and naming patterns before writing any Effect code. - Idiomatic Code Generation: Produces Effect v4 patterns including Effect.gen workflows, Effect.fn named effects, Schema-based domain modeling, and explicit layer composition. - Testing Guidance: Applies repo-specific test helpers like testEffect and it.live for filesystem, HTTP, child process, and timing behavior. - Use Case: When adding a new service method to the codebase, the Skill checks the effect-smol source and existing repo conventions first, then writes a typed service with branded ID schemas and TaggedErrorClass errors that match house style. ## Quick Start Ask the assistant to implement a new Effect service or refactor existing code to Effect v4 patterns, and it will verify every API against the effect-smol source before writing code.

Frequently Asked Questions about effect

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

FAQPage Schema
How do I write Effect v4 services in TypeScript?

Use Effect.gen with generator functions for multi-step workflows and Effect.fn or Effect.fnUntraced for named reusable service methods. Keep layer composition explicit and verify API usage against the effect-smol source repository before implementing.

How to test Effect services and workflows?

Use the testEffect helper from packages/opencode/test/lib/effect.ts for services, layers, and scoped resources. Use it.live for filesystem, HTTP servers, child processes, and real-time behavior, and run tests from package directories rather than the repo root.

What is the difference between Effect v4 and older v2/v3 APIs?

Effect v4 (effect-smol) introduces API and naming changes that make older blog examples and v2/v3 patterns unreliable. This Skill requires checking the current effect-smol source instead of relying on memory or outdated documentation.

How do I model typed errors in Effect Schema?

Use Schema.TaggedErrorClass for typed domain errors and branded schemas for IDs when modeling new error surfaces. Prefer Effect Schema for all API and domain data shapes instead of ad hoc type definitions.

Why does generated Effect code use outdated APIs?

AI models often recall Effect v2/v3 patterns from training data. The fix is to clone the effect-smol repository into .opencode/references and search it for exact current APIs before answering or implementing.