Skip to content
effect-research logo

Effect-TS Research Protocol

effect-research

Effect-TS specialized research via deepwiki and submodules. Query Effect-TS/effect, tim-smart/effect-atom for verified patterns. Enforces grounded verification before implementation.

SKILL.md

Full skill instructions

Effect-TS Research Protocol

Purpose: Specialized research workflow for Effect-TS, effect-atom, and related ecosystem. Ensures verified patterns before implementation.

Quick Start: Research Workflow

┌─────────────────────────────────────────────────────────────────┐
│  EFFECT RESEARCH WORKFLOW                                        │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  1. ADMIT UNCERTAINTY                                            │
│     "My Effect knowledge is from May 2025..."                    │
│                                                                  │
│  2. QUERY DEEPWIKI (Verification Style)                          │
│     "Is [PATTERN] still correct for [USE CASE]?"                 │
│     Repos: Effect-TS/​effect, tim-smart/​effect-atom               │
│                                                                  │
│  3. CROSS-REFERENCE SUBMODULES                                   │
│     ../​../​submodules/​website/  → Human docs (priority)           │
│     ../​../​submodules/​effect/   → Test patterns                   │
│     ../​../​submodules/​effect-atom/ → Atom patterns                │
│                                                                  │
│  4. CHECK CODEBASE PRECEDENT                                     │
│     .edin/​EFFECT_PATTERNS.md                                     │
│     src/​lib/​*/  → Working implementations                        │
│                                                                  │
│  5. IMPLEMENT WITH CONFIDENCE                                    │
│     [VERIFIED] pattern from step 2-4                             │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

deepwiki Queries for Effect

Available Repos

Repodeepwiki NameContent
Effect CoreEffect-TS/​effectEffect, Schema, Stream, Layer, etc.
effect-atomtim-smart/​effect-atomAtom, Registry, React integration

Query Patterns

Service Definition:

mcp__deepwiki__ask_question
  repoName: "Effect-TS/​effect"
  question: "What is the current recommended pattern for defining Effect
             services with Effect.Service<>()? I believe it uses
             double-parenthesis syntax. Is this still accurate?"

Schema Patterns:

mcp__deepwiki__ask_question
  repoName: "Effect-TS/​effect"
  question: "For discriminated unions, should I use Schema.TaggedStruct
             or Schema.TaggedClass? When would I choose one over the other?"

Atom Integration:

mcp__deepwiki__ask_question
  repoName: "tim-smart/​effect-atom"
  question: "What is the correct way to use Atom.runtime with Effect
             services? I want to create operation atoms that can yield
             services from a Layer."

Stream Patterns:

mcp__deepwiki__ask_question
  repoName: "Effect-TS/​effect"
  question: "Is Stream.fromQueue still the recommended way to create
             streams from async sources? What about backpressure handling?"

Submodule Deep Dives

Website Submodule (Human-Authored Docs)

Location: ../​../​submodules/​website/​content/​src/​content/​docs/​docs/

Key Directories:

docs/
├── introduction/        # Getting started
├── guides/              # Best practices
├── concurrency/         # Fibers, Queue, Semaphore
├── state-management/    # Ref, SynchronizedRef
├── stream/              # Stream creation, transformation
├── schema/              # Schema definition, validation
└── additional-resources/ # Migration, myths

Common Queries:

# Find service documentation
find ../​../​submodules/​website -name "*.mdx" | xargs grep -l "Effect.Service"

# Find schema documentation
cat ../​../​submodules/​website/​content/​src/​content/​docs/​docs/​schema/​*.mdx

# Find state management docs
ls ../​../​submodules/​website/​content/​src/​content/​docs/​docs/​state-management/

Effect Submodule (Test Patterns)

Location: ../​../​submodules/​effect/​packages/

Key Test Directories:

packages/
├── effect/​test/           # Core Effect tests
├── sql-sqlite-bun/​test/   # SQLite integration (modern patterns)
├── sql-drizzle/​test/      # Drizzle ORM patterns
├── platform/​test/         # Platform services
└── experimental/​test/     # EventLog, DevTools

Common Queries:

# Find service test patterns
grep -r "Effect.Service" ../​../​submodules/​effect/​packages/​*/​test/

# Find SQL transaction patterns
grep -r "transaction" ../​../​submodules/​effect/​packages/​sql-sqlite-bun/​test/

# Find Stream test patterns
find ../​../​submodules/​effect/​packages/​effect/​test -name "*Stream*"

effect-atom Submodule (Atom Patterns)

Location: ../​../​submodules/​effect-atom/​packages/​atom/

Key Files:

packages/​atom/
├── src/​Atom.ts           # Atom implementation
├── src/​Registry.ts       # Registry implementation
├── test/​Atom.test.ts     # Atom test patterns
├── test/​Result.test.ts   # Result handling
└── test/​AtomRpc.test.ts  # RPC patterns

Common Queries:

# Atom test patterns
cat ../​../​submodules/​effect-atom/​packages/​atom/​test/​Atom.test.ts

# Registry patterns
grep -r "Registry.make" ../​../​submodules/​effect-atom/​packages/​atom/​test/

# React integration
cat ../​../​submodules/​effect-atom/​packages/​atom-react/​src/​index.ts

Research Templates by Topic

Topic: Service Definition

## Research: Effect Service Definition

**Question**: What's the current pattern for Effect.Service<>()?

**Step 1: deepwiki Verification**

mcp__deepwiki__ask_question repoName: "Effect-TS/​effect" question: "I believe Effect.Service<MyService>()('id', { effect, dependencies }) is the current syntax. Is this accurate? Has anything changed regarding service definition in recent versions?"


**Step 2: Submodule Cross-Reference**
```bash
# Check website docs
grep -r "Effect.Service" ../​../​submodules/​website/​content/​src/​content/​docs/

# Check test patterns
grep -r "Effect.Service" ../​../​submodules/​effect/​packages/​sql-sqlite-bun/​test/

Step 3: Codebase Precedent

grep -r "Effect.Service" src/​lib/​*/
cat .edin/​EFFECT_SERVICE_PATTERNS.md

### Topic: Schema Definition

```markdown
## Research: Schema Patterns

**Question**: TaggedStruct vs TaggedClass - when to use which?

**Step 1: deepwiki Verification**

mcp__deepwiki__ask_question repoName: "Effect-TS/​effect" question: "When should I use Schema.TaggedStruct vs Schema.TaggedClass? My understanding: TaggedStruct for pure data, TaggedClass when I need methods. Is this correct?"


**Step 2: Submodule Cross-Reference**
```bash
cat ../​../​submodules/​website/​content/​src/​content/​docs/​docs/​schema/​*.mdx
grep -r "TaggedStruct\|TaggedClass" ../​../​submodules/​effect/​packages/​effect/​src/​Schema.ts

### Topic: Atom + React Integration

```markdown
## Research: Atom.runtime Pattern

**Question**: How do I create operation atoms with Atom.runtime?

**Step 1: deepwiki Verification**

mcp__deepwiki__ask_question repoName: "tim-smart/​effect-atom" question: "What's the correct way to use Atom.runtime.fn() to create operation atoms that can yield Effect services? I want to compose a Layer and create callable atoms."


**Step 2: Submodule Cross-Reference**
```bash
cat ../​../​submodules/​effect-atom/​packages/​atom/​test/​Atom.test.ts
grep -r "runtime" ../​../​submodules/​effect-atom/​packages/​atom/​src/

Step 3: Codebase Precedent

grep -r "Atom.runtime\|runtimeAtom" src/​lib/​*/​atoms/
cat src/​lib/​slider/​atoms/​index.ts

### Topic: Stream Patterns

```markdown
## Research: Effect Streams

**Question**: Creating streams from async sources with backpressure

**Step 1: deepwiki Verification**

mcp__deepwiki__ask_question repoName: "Effect-TS/​effect" question: "What's the recommended way to create Effect Streams from async sources like WebSockets? I'm considering Stream.async and Stream.fromQueue. Which handles backpressure better?"


**Step 2: Submodule Cross-Reference**
```bash
cat ../​../​submodules/​website/​content/​src/​content/​docs/​docs/​stream/​*.mdx
find ../​../​submodules/​effect/​packages/​effect/​test -name "*Stream*" | xargs head -50

---

## Verification Checklist

Before implementing any Effect pattern:

### Service Patterns
- [ ] Verified Effect.Service<>() syntax via deepwiki
- [ ] Checked submodule test for working example
- [ ] Confirmed dependencies array behavior
- [ ] Verified `.Default` layer generation

### Schema Patterns
- [ ] Verified Schema.* function exists in current API
- [ ] Checked for transform/​encode/​decode behavior
- [ ] Confirmed branded type syntax
- [ ] Verified with Schema.is runtime check

### Atom Patterns
- [ ] Verified Atom.runtime API via deepwiki
- [ ] Checked effect-atom tests for pattern
- [ ] Confirmed Registry.make() usage
- [ ] Verified React hook compatibility

### Layer Patterns
- [ ] Verified Layer composition functions
- [ ] Checked Layer.mergeAll, Layer.provide order
- [ ] Confirmed dependency resolution
- [ ] Tested with Effect.runPromise

---

## Common Pitfalls

### ❌ Assuming Effect.Ref for React State

```typescript
// WRONG - Don't use Ref when React consumes state
const stateRef = yield* Ref.make(initial)

Correct: Use Atom.make() when React is the consumer

❌ Single-parenthesis Effect.Service

// WRONG
class MyService extends Effect.Service<MyService>("id", {}) {}

// CORRECT (double parenthesis)
class MyService extends Effect.Service<MyService>()("id", {}) {}

❌ Missing as const on service returns

// WRONG
return { method }

// CORRECT
return { method } as const

❌ Trusting cached mental models

// WRONG
"I know how Effect.Service works..."

// CORRECT
[UNCERTAIN] Let me verify the current Effect.Service API...

Integration with Other Skills

After ResearchUse Skill
Service pattern verified/​effect-service-authoring
Schema pattern verified/​effect-schema-mastery
Atom pattern verified/​effect-atom-integration
Stream pattern verified/​effect-stream-patterns
Match pattern verified/​effect-match-patterns

Quick Commands

# Research service patterns
mcp__deepwiki__ask_question repoName="Effect-TS/​effect" question="Effect.Service current API"

# Research atom patterns
mcp__deepwiki__ask_question repoName="tim-smart/​effect-atom" question="Atom.runtime usage"

# Cross-reference website docs
find ../​../​submodules/​website -name "*.mdx" | xargs grep -l "TOPIC"

# Cross-reference test patterns
find ../​../​submodules/​effect/​packages -name "*.test.ts" | xargs grep -l "TOPIC"

# Check codebase precedent
grep -r "PATTERN" src/​lib/​*/
cat .edin/​EFFECT_PATTERNS.md

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