Repository inventory

andrueandersoncs/claude-skill-effect-ts

Skills indexed from this repository, with install-style signals scoped to the repo.
13 skills65 GitHub stars0 weekly installsTypeScriptGitHubOwner profile

Overview

This skill explains how Effect optimizes API calls through batching, caching, and deduplication. It shows how to define request types and resolvers, enable automatic batching, and use built-in caching utilities like Effect.cached and the Cache service. The goal is to eliminate N+1 request patterns and reduce redundant network or database work.

How this skill works

Effect inspects request operations and can aggregate many individual requests into a single batched resolver call, allowing one network/database call to satisfy multiple logical requests. It also memoizes effect results and request outcomes within a query context, preventing duplicate concurrent work and enabling TTL-based or manual invalidation. You can opt in or out of batching and provide custom caches or resolvers with access to contextual services.

When to use it

  • When facing N+1 query problems across loops or forEach operations
  • When multiple callers request the same resource concurrently and you want deduplication
  • When API or DB supports batch endpoints to reduce round trips
  • When you need short-term memoization of expensive computations or network calls
  • When you want fine-grained control over cache TTL, capacity, or invalidation

Best practices

  • Use batched RequestResolvers at API boundaries to group related IDs into a single call
  • Prefer Effect.cached or cachedWithTTL for inexpensive, read-heavy values to reduce repeated fetches
  • Set TTLs to balance freshness and performance; use invalidate hooks for known changes
  • Rely on automatic request deduplication within a query context to avoid duplicate inflight work
  • Disable batching or request caching selectively for operations that must run independently

Example use cases

  • Batching user lookups when iterating todos to avoid N+1 requests to /api/users
  • Using RequestResolver.makeBatched to POST an array of ids and distribute results to individual requests
  • Caching application config with Effect.cached so subsequent reads are instantaneous
  • CachedWithTTL for current user data with automatic expiry after a short interval
  • Creating a Cache service to control capacity, TTL, manual invalidation, and statistics

FAQ

Batched resolvers map results back to each original request, preserving per-request success or failure semantics. Ensure your batch endpoint returns results in a stable mapping or include identifiers in responses.

How do I force fresh data despite caching?

Use cachedInvalidateWithTTL to manually invalidate, or create/attach a custom cache and call invalidate. You can also disable request caching with Effect.withRequestCaching(false).

13 skills

batching-caching
Api

This skill helps you optimize API usage by automatically batching requests and caching results to reduce N+1 queries.

BackendDataPerformanceTypescript
streams
Analytics

This skill helps you understand and work with Effect's Streams API, including creation, transformation, backpressure, and consumption of real-time data.

BackendDataDebuggingPerformance+1
api-docs
Api

This skill fetches and explains Effect-TS API docs from the official site, returning function signatures, parameters, and usage examples.

DebuggingDocsProductivityWriting+1
runtime
Backend

This skill helps you understand and manage Effect's Runtime execution, including default and managed runtimes, services, and configuration.

DevopsMonitoringObservabilityTypescript
pattern-matching
Backend

This skill helps you write robust pattern-matching with Effect Match, ensuring exhaustive, type-safe branches and minimal imperative code.

Code ReviewPerformanceRefactorTesting+1
resource-management
Data

This skill helps you manage resources safely with acquireRelease, scope, and finalizers, ensuring cleanup even on errors or interruption.

DatabaseDevopsObservabilityOperations+1
error-management
Backend

This skill helps you reason about Effect error handling, distinguish failures, and implement typed, recoverable errors and defects.

DebuggingMonitoringObservabilityTypescript
effect-ai
Ai

This skill helps you integrate and orchestrate AI/LLM services with type-safe tooling, execution planning, and structured outputs for robust AI apps.

ApiAutomationBackendPlanning+2
platform
Api

This skill helps you understand and use Effect platform abstractions for HTTP, filesystem, key-value storage, and terminal I/O across environments.

BackendCliDevopsDocs+2
configuration
Backend

This skill helps you manage effect configuration safely by loading, validating, and composing environment variables and JSON config.

DevopsDocsSecurityTypescript
effect-core
Api

This skill helps you create and compose Effect programs in TypeScript, guiding you through creation, composition, and running of Effects.

BackendCode ReviewDebuggingFrontend+2
scheduling
Automation

This skill helps you understand and implement scheduling patterns, retry policies, and backoff strategies using Effect.

BackendPerformanceTypescript
data-types
Data

This skill helps you understand Effect's built-in data types and structures, enabling precise reasoning about Option, Either, Cause, Exit, and more.

DebuggingDocsTypescript
More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational