Skip to content
effect-patterns-hub logo

Effect Patterns Hub

effect-patterns-hub

Complete catalog of 130+ Effect-TS patterns from EffectPatterns repository. Use when looking for specific implementation patterns, best practices, or real-world examples. Complements other skills with concrete, curated patterns.

SKILL.md

Full skill instructions

Effect Patterns Hub

Purpose: Provide quick access to 130+ curated Effect-TS patterns from the EffectPatterns repository. Use this skill to find specific implementation patterns, compare approaches, and reference best practices.

Triggers

  • Looking for a specific Effect pattern or idiom
  • Need real-world examples of Effect concepts
  • Want to see multiple approaches to the same problem
  • Comparing implementation strategies
  • Learning new Effect features

Pattern Library Location

Local Patterns: .claude/​skills/​effect-patterns-hub/​patterns/
Documentation: docs/​effect-patterns/
Count: 130+ patterns in MDX format

Quick Decision Tree

I need to...

Create Effects
Transform & Compose
Control Flow
Error Handling
Concurrency
Services & Dependency Injection
Resource Management
Streaming
Schema & Validation
Data Types
Pattern Matching
HTTP & Web
Testing
Observability
Runtime & Execution
Configuration
Time & Scheduling
Project Setup
Advanced Concepts

Pattern Categories

By Skill Level

Beginner (Getting Started)

  • Constructor patterns (succeed, fail, sync, async)
  • Basic combinators (map, flatMap, tap)
  • Simple error handling (catch, catchTag)
  • Effect.gen basics
  • runPromise/​runSync

Intermediate (Building Applications)

  • Services and layers
  • Schema validation
  • HTTP servers and clients
  • Resource management
  • Concurrency basics (Effect.all, fork)
  • Testing with mocks

Advanced (Production Systems)

  • Complex layer composition
  • Custom runtimes
  • Streaming pipelines
  • Graceful shutdown
  • OpenTelemetry integration
  • Performance optimization (Chunk, Ref)

By Use Case

Domain Modeling

  • Schema definitions
  • Brand types
  • Tagged errors
  • Option/​Either for optional/​fallible values

API Development

  • HTTP server setup
  • Route handling
  • Request validation
  • Error handling
  • Response formatting

Data Processing

  • Stream processing
  • Batch operations
  • Parallel processing
  • Resource-safe pipelines

Application Architecture

  • Service layer design
  • Dependency injection
  • Module composition
  • Configuration management

Testing

  • Mock layers
  • Test utilities
  • Testable services

Observability

  • Structured logging
  • Distributed tracing
  • Custom metrics
  • Performance monitoring

Search Patterns

By Keyword

Use Grep to search patterns by keyword:

# Find patterns about error handling
grep -l "error" patterns/​*.mdx

# Find patterns about concurrency
grep -l "concurrent\|parallel\|fiber" patterns/​*.mdx

# Find patterns about HTTP
grep -l "http\|server\|client" patterns/​*.mdx

# Find patterns about testing
grep -l "test\|mock" patterns/​*.mdx

By Frontmatter Tags

All patterns include metadata:

  • title: Human-readable name
  • id: Unique identifier (filename without extension)
  • skillLevel: beginner, intermediate, advanced
  • useCase: domain-modeling, error-handling, concurrency, etc.
  • summary: Brief description
  • tags: Keywords for searching
  • related: Links to related patterns

Common Searches

"How do I create an Effect from..."

  • → Search constructor patterns: grep -l "constructor" patterns/​*.mdx
  • → Check constructor-*.mdx files

"How do I handle errors when..."

  • → Search error handling: grep -l "error\|catch\|retry" patterns/​*.mdx
  • → Check handle-*.mdx and pattern-catchtag.mdx

"How do I run multiple things concurrently?"

  • → Search concurrency: grep -l "concurrent\|parallel\|all\|fork" patterns/​*.mdx
  • → Check run-effects-in-parallel-with-all.mdx

"How do I work with services?"

  • → Search services: grep -l "service\|layer\|dependency" patterns/​*.mdx
  • → Check model-dependencies-as-services.mdx, understand-layers-for-dependency-injection.mdx

"How do I validate data?"

  • → Search schema: grep -l "schema\|validate\|parse" patterns/​*.mdx
  • → Check define-contracts-with-schema.mdx, parse-with-schema-decode.mdx

Integration with Other Skills

Foundations → Patterns Hub

When you need concrete examples for foundation concepts, check patterns:

  • effect-foundations teaches concepts → patterns show implementation

Architect → Patterns Hub

When designing systems, reference architectural patterns:

  • Layer composition → organize-layers-into-composable-modules.mdx
  • Service design → model-dependencies-as-services.mdx
  • Scoped resources → scoped-service-layer.mdx

Engineer → Patterns Hub

When implementing features, find relevant patterns:

  • HTTP endpoints → handle-get-request.mdx, validate-request-body.mdx
  • Error handling → retry-based-on-specific-errors.mdx
  • Concurrency → run-effects-in-parallel-with-all.mdx

Tester → Patterns Hub

When writing tests, reference testing patterns:

  • Mock services → mocking-dependencies-in-tests.mdx
  • Test layers → use-default-layer-for-tests.mdx
  • Testable design → write-tests-that-adapt-to-application-code.mdx

Usage Workflow

  1. Identify Need: "I need to [do something] with Effect"
  2. Check Decision Tree: Find relevant section above
  3. Read Pattern: Use Read tool on the pattern file
  4. Adapt to Context: Apply pattern to your specific use case
  5. Check Related: Follow related links in pattern frontmatter
  6. Consult Agent: If unclear, use @effect-engineer or @effect-architect

Anti-Pattern Detection

If you find yourself:

  • Using imperative loops → Check process-collection-in-parallel-with-foreach.mdx
  • Mixing promises and Effects → Check constructor-try-trypromise.mdx, solve-promise-problems-with-effect.mdx
  • Long andThen chains → Check avoid-long-andthen-chains.mdx, use-gen-for-business-logic.mdx
  • Leaking requirements → Check model-dependencies-as-services.mdx
  • Manual resource cleanup → Check safely-bracket-resource-usage.mdx

Pattern File Structure

Each pattern file follows this structure:

---
title: Human-readable title
id: kebab-case-id
skillLevel: beginner | intermediate | advanced
useCase: primary-use-case
summary: Brief description
tags:
  - keyword1
  - keyword2
related:
  - related-pattern-id-1
  - related-pattern-id-2
author: Author name
---

# Title

## Guideline
What to do

## Rationale
Why do it this way

## Good Example
✅ Recommended approach

## Bad Example
❌ What to avoid

## Related Patterns
Links to related patterns

Maintenance

Patterns are synced from EffectPatterns repository.

To update patterns:

cd /​tmp
git clone --depth=1 https://github.com/​PaulJPhilp/​EffectPatterns.git
cp -r EffectPatterns/​content/​published/​* /​Users/​pooks/​Dev/​crate/​.claude/​skills/​effect-patterns-hub/​patterns/
cp -r EffectPatterns/​content/​published/​* /​Users/​pooks/​Dev/​crate/​docs/​effect-patterns/

Summary

  • 130+ patterns covering all Effect-TS concepts
  • Decision tree for quick pattern lookup
  • Integration with existing skills and agents
  • Searchable by keyword, use case, skill level
  • Examples showing good and bad practices
  • Related patterns for deeper exploration

Use this skill as your go-to reference for "How do I... with Effect?"

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View