Skip to main content

effect

Guides production TypeScript work with current Effect APIs and explicit Effect architecture; use when implementing, reviewing, debugging, or refactoring Effect schemas, services, layers, config, schedules, caches, streams, HTTP clients, or tests, but not for non-Effect TypeScript or an explicitly older API surface.

소스 정보

저장소
getsentry/skillet
최근 소스 활동
2026년 7월 22일 22:48
감지된 SKILL.md 언어
영어
스타
12
포크
2

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
42 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
effect
description
Guides production TypeScript work with current Effect APIs and explicit Effect architecture; use when implementing, reviewing, debugging, or refactoring Effect schemas, services, layers, config, schedules, caches, streams, HTTP clients, or tests, but not for non-Effect TypeScript or an explicitly older API surface.
spec_hash
42534c7af095
# Effect Ground every recommendation in the target project. Inspect repository instructions, the pinned `effect` version, installed package source, and local conventions before choosing APIs. Prefer project evidence over remembered signatures. ## Choose the Relevant Guidance Read only the references needed for the task, and combine them when concerns overlap: - Schema, records, variants, brands, and typed errors: `references/SCHEMA.md` - Services, layers, modules, scope ownership, and `Effect.fn`: `references/SERVICES_LAYERS.md` - Configuration and providers: `references/CONFIG.md` - Schedules, retry, repeat, polling, and pacing: `references/SCHEDULING.md` - Cache, memoization, in-flight dedupe, and request batching: `references/CACHING.md` - Streams, queues, PubSub, SubscriptionRef, and long-lived consumers: `references/STREAMS.md` - HTTP clients, decoding, retries, and rate limits: `references/HTTP_CLIENTS.md` - Effect-aware tests, TestClock, layers, and synchronization: `references/TESTING.md` ## Model Data and Failures - Use `Schema.Struct(...)` for application records. - Use brands for scalar IDs and constrained values. - Use tagged Schema variants and unions for values that cross boundaries. - Decode unknown boundary data with `Schema.decodeUnknownEffect(...)`. - Model expected failures with `Schema.TaggedErrorClass`. - Never use casts or throwing construction to skip validation at untrusted boundaries. ## Build Explicit Services and Layers - Keep business rules in named workflows and services. - Represent dependencies explicitly in the Effect environment. - Build implementations with layers that own resource lifetime. - Keep HTTP and transport handlers focused on decoding, context, invocation, and response mapping. - Wrap public or non-trivial service methods with named `Effect.fn` calls. - Do not hide required authority, credentials, persistence, or transports behind defaults. ## Choose Runtime Primitives by Meaning - Use `Config` for runtime configuration and override it with providers in tests. - Use `Schedule` for retry, repeat, polling, pacing, and backoff. - Use `Cache` or Effect memoization when their ownership and eviction model fit. - Use request batching only when the backend exposes a real batch operation. - Use Queue, PubSub, SubscriptionRef, and Stream according to producer, consumer, broadcast, and backpressure needs. - Keep long-lived fibers scoped to the layer or resource that owns them. ## Keep Boundaries Truthful - Wrap HTTP clients, SDKs, CLIs, and external systems in named Effect boundaries. - Decode persisted and external values before treating them as domain data. - Preserve distinct transport, status, decode, and domain failures. - Retry only proven transient failures on idempotent operations with a bounded policy. - Keep exhausted failures visible unless the boundary has a real fallback. - Keep provider and network calls outside authoritative database transactions. ## Test Deterministically - Use Effect-aware tests and explicit test layers. - Fork time-dependent work before advancing `TestClock`. - Coordinate concurrent work with Deferred, Queue, Latch, Ref, fibers, or explicit hooks. - Never add arbitrary real sleeps when deterministic synchronization can express the condition. ## Preserve Types and Dependencies Solve missing requirements through explicit service and layer composition. Do not use `as any`, non-null assertions, broad cause recovery, `Layer.mergeAll`, `provideMerge`, or default authority merely to make code compile. ## Before Editing 1. Identify every Effect concern in the task. 2. Read the matching references and project-local source. 3. Choose APIs supported by the pinned version. 4. Make the smallest architecture-preserving change. 5. Run the project's typecheck and focused tests.
GitHub에서 보기