effect

Implements Effect v4 TypeScript services, schemas, and workflows using verified source references.

Updated Jun 27, 2026
One-click install
npx skills add https://github.com/HKUST-QUANT-SOCIETY/quantcode --skill effect-hkust-quant-society
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect
Source: https://github.com/HKUST-QUANT-SOCIETY/quantcode/tree/main/frontend/.opencode/skills/effect
Command: npx skills add https://github.com/HKUST-QUANT-SOCIETY/quantcode --skill effect-hkust-quant-society

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Effect v4 and effect-smol APIs differ significantly from older Effect v2/v3 versions, and AI-generated code often relies on outdated patterns or hallucinated APIs. This Skill grounds all Effect-related work in the actual current source code, preventing incorrect implementations. ## Core Features & Use Cases - Source-Verified API Usage: Clones and searches the effect-smol repository to verify exact APIs, examples, and naming patterns before writing code. - Idiomatic Patterns: Enforces current conventions like Effect.gen for workflows, Effect.fn for named effects, Schema for data shapes, and Schema.TaggedErrorClass for typed errors. - Testing Guidance: Directs use of testEffect helpers and it.live for filesystem, git, HTTP, and process tests, with explicit layer composition. - Use Case: When asked to add a new service method with typed errors to an Effect-based codebase, the Skill first checks the effect-smol source and existing repo patterns, then implements the service using current v4 APIs with proper layer wiring. ## Quick Start Ask the assistant to implement a new Effect service with typed errors and tests, verifying all APIs against the effect-smol source first.

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 so missing dependencies remain visible, and verify APIs against the effect-smol source before implementing.

How to model typed errors in Effect Schema?

Use Schema.TaggedErrorClass to define typed domain errors when modeling new error surfaces. Combine this with branded schemas for IDs and Effect Schema for API and domain data shapes to keep error handling type-safe.

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

Effect v4 and effect-smol introduce changed APIs and naming patterns that differ from older versions and blog examples. Always verify against the current effect-smol source rather than relying on memory or older documentation.

How do I test Effect services with filesystem or HTTP dependencies?

Use testEffect from the repo's test library for services, layers, and scoped resources, and it.live for real filesystem, git, HTTP servers, and child processes. Prefer explicit test layers over ad hoc managed runtimes, and run tests from package directories.

Why should Effect code avoid any types and unchecked casts?

Using any, non-null assertions, or unchecked casts defeats Effect's typed error and dependency tracking. The guidelines require verifying against actual source and using Schema-based typing instead of forcing types to compile.