Get the FREE Ultimate OpenClaw Setup Guide →

effect-lookup

npx machina-cli add skill guillempuche/ai-standards/effect-lookup --openclaw
Files (1)
SKILL.md
8.2 KB

Effect Library Lookup

Quick reference for finding and understanding Effect TypeScript library APIs from local source code.

Source Code Access

Source code is available locally and on GitHub. Check local first, fall back to GitHub if not available.

RepoLocal pathGitHub
Effectopensrc/repos/github.com/effect-ts/effect/https://github.com/effect-ts/effect
EffectPatternsopensrc/repos/github.com/PaulJPhilp/EffectPatterns/https://github.com/PaulJPhilp/EffectPatterns

When to Use This Skill

Use this skill when:

  • Looking up Effect function signatures or implementations
  • Finding examples of Effect patterns (Effect.gen, Layer, Context, etc.)
  • Understanding how Effect modules work internally
  • Checking API availability or deprecation status
  • Learning Effect idioms from source code

How to Look Up Effect APIs

1. Use the Effect Docs MCP Server (Fastest)

The effect-docs MCP server provides indexed documentation:

mcp__effect-docs__effect_docs_search: Search for Effect concepts
mcp__effect-docs__get_effect_doc: Get specific documentation by ID

2. Search the Local Source

For implementation details, search the local source at opensrc/repos/github.com/effect-ts/effect/:

# Find a specific function
grep -r "export const myFunction" opensrc/repos/github.com/effect-ts/effect/packages/effect/src/

# Find usage patterns
grep -rn "Effect.gen" opensrc/repos/github.com/effect-ts/effect/packages/effect/src/

# Find type definitions
grep -rn "interface MyType" opensrc/repos/github.com/effect-ts/effect/packages/effect/src/

3. Read Source Files Directly

Core modules are at: opensrc/repos/github.com/effect-ts/effect/packages/effect/src/<Module>.ts

Example: To understand Effect.map, read opensrc/repos/github.com/effect-ts/effect/packages/effect/src/Effect.ts

Quick Reference

TaskReference
Module categoriesreferences/modules.md
Common patternsreferences/patterns.md

Package Structure

opensrc/repos/github.com/effect-ts/effect/
├── packages/
│   ├── effect/               # Core Effect library
│   │   └── src/              # Source files (Effect.ts, Layer.ts, etc.)
│   ├── platform/             # Cross-platform utilities (HTTP, FileSystem)
│   ├── platform-node/        # Node.js platform implementation
│   ├── platform-browser/     # Browser platform implementation
│   ├── cli/                  # CLI building utilities
│   ├── sql/                  # SQL database utilities
│   ├── sql-pg/               # PostgreSQL implementation
│   ├── sql-kysely/           # Kysely integration
│   ├── rpc/                  # Remote procedure calls
│   ├── cluster/              # Distributed computing
│   ├── opentelemetry/        # OpenTelemetry integration
│   ├── experimental/         # Experimental features
│   └── ai/                   # AI integrations (OpenAI, Anthropic, etc.)

Core Modules Quick Lookup

Effect System

ModuleFilePurpose
EffectEffect.tsCore effect type and combinators
LayerLayer.tsDependency injection layers
ContextContext.tsType-safe service context
ScopeScope.tsResource management
RuntimeRuntime.tsEffect execution

Data Types

ModuleFilePurpose
OptionOption.tsOptional values
EitherEither.tsSuccess/failure values
ChunkChunk.tsImmutable arrays
HashMapHashMap.tsImmutable hash maps
HashSetHashSet.tsImmutable hash sets
ListList.tsImmutable linked lists

Concurrency

ModuleFilePurpose
FiberFiber.tsLightweight threads
QueueQueue.tsConcurrent queues
RefRef.tsMutable references
SemaphoreSemaphore.tsConcurrency limiting
PubSubPubSub.tsPublish/subscribe

Schema & Validation

ModuleFilePurpose
SchemaSchema.tsData validation & encoding
ParseResultParseResult.tsParsing results
ArbitraryArbitrary.tsProperty-based testing

Streaming

ModuleFilePurpose
StreamStream.tsEffectful streams
SinkSink.tsStream consumers
ChannelChannel.tsBidirectional streaming

Scheduling & Time

ModuleFilePurpose
ScheduleSchedule.tsRetry/repeat schedules
DurationDuration.tsTime durations
DateTimeDateTime.tsDate/time handling
ClockClock.tsTime service
CronCron.tsCron expressions

Configuration

ModuleFilePurpose
ConfigConfig.tsType-safe configuration
ConfigProviderConfigProvider.tsConfiguration sources

Common Lookup Patterns

Find Function Signature

# In Effect.ts, functions are well-documented with JSDoc
grep -A 20 "export const map" opensrc/repos/github.com/effect-ts/effect/packages/effect/src/Effect.ts

Find Type Definition

# Look for interface or type alias
grep -n "interface Effect<" opensrc/repos/github.com/effect-ts/effect/packages/effect/src/Effect.ts

Find Examples in Tests

# Tests often have practical examples
grep -rn "Effect.gen" opensrc/repos/github.com/effect-ts/effect/packages/effect/test/

Check Platform APIs

# HTTP client/server
ls opensrc/repos/github.com/effect-ts/effect/packages/platform/src/Http*.ts

# FileSystem
cat opensrc/repos/github.com/effect-ts/effect/packages/platform/src/FileSystem.ts

EffectPatterns Knowledge Base

Community-driven patterns and architectural guides at opensrc/repos/github.com/PaulJPhilp/EffectPatterns/.

# Browse pattern categories
ls opensrc/repos/github.com/PaulJPhilp/EffectPatterns/content/

# Search for a specific pattern
grep -rn "Layer" opensrc/repos/github.com/PaulJPhilp/EffectPatterns/content/

# Read docs
ls opensrc/repos/github.com/PaulJPhilp/EffectPatterns/docs/

Covers: getting started, core concepts, error management, resource management, concurrency, streams, scheduling, domain modeling, schema, platform, HTTP APIs, data pipelines, testing, and observability.

External References

Tips for Effective Lookups

  1. Start with MCP search - Use effect_docs_search for conceptual questions
  2. Read JSDoc comments - Effect source has excellent inline documentation
  3. Check tests for examples - Test files show real usage patterns
  4. Use module tables above - Quickly navigate to the right source file
  5. Platform packages - HTTP, FileSystem, etc. are in @effect/platform
  6. EffectPatterns - Use for architectural patterns and best practices

Source

git clone https://github.com/guillempuche/ai-standards/blob/main/skills/effect-lookup/SKILL.mdView on GitHub

Overview

Effect Library Lookup provides quick references to Effect TypeScript APIs, patterns, and source code. It helps you quickly locate function signatures, understand common patterns (Effect.gen, Layer, Context), and verify implementation details from local sources or GitHub.

How This Skill Works

How it works: Use the effect-docs MCP server for indexed documentation, or read local sources at opensrc/repos/github.com/effect-ts/effect/packages/effect/src. For implementation details, grep for 'export const' functions and patterns like Effect.gen, then open core modules such as Effect.ts to see the actual code.

When to Use It

  • Looking up Effect function signatures or implementations
  • Finding examples of Effect patterns (Effect.gen, Layer, Context, etc.)
  • Understanding how Effect modules work internally
  • Checking API availability or deprecation status
  • Learning Effect idioms from source code

Quick Start

  1. Step 1: Check documentation via the MCP server using mcp__effect-docs__effect_docs_search or mcp__effect-docs__get_effect_doc
  2. Step 2: Locate code locally with grep, e.g. grep -rn "export const" opensrc/repos/github.com/effect-ts/effect/packages/effect/src/
  3. Step 3: Open core files like opensrc/repos/github.com/effect-ts/effect/packages/effect/src/Effect.ts to see actual implementations

Best Practices

  • Start with the MCP docs server to get indexed concepts before diving into code
  • Prefer local source checks first to ensure version alignment, then verify on GitHub
  • Use precise search terms like 'export const', 'Effect.gen', and file paths under packages/effect/src
  • Read core modules (Effect.ts, Layer.ts, Context.ts) to understand core primitives
  • Cross-check deprecation notices by correlating code with documentation references

Example Use Cases

  • grep -r "export const myFunction" opensrc/repos/github.com/effect-ts/effect/packages/effect/src/
  • grep -rn "Effect.gen" opensrc/repos/github.com/effect-ts/effect/packages/effect/src/
  • Open opensrc/repos/github.com/effect-ts/effect/packages/effect/src/Effect.ts to study Effect.map
  • Check local vs GitHub references for API availability in opensrc/repos/github.com/effect-ts/effect
  • Read patterns.md to understand common idioms used across Effect modules

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers